[FFmpeg-user] libopus encoder produces bigger files than opusenc with 6-channel audio

Peter White peter.white at posteo.net
Mon Jul 18 18:43:12 EEST 2016

Am 18.07.2016 14:40 schrieb Carl Eugen Hoyos:
 > Peter White <peter.white <at> posteo.net> writes:
 >> And as far as I can tell, not providing any options should
 >> result in the same default setting and hence the same bitrate.
 > No, this not correct.
 > If you don't provide a bitrate (or constant quality) ffmpeg
 > will choose one that may or may not suite you.

But in this special case it really should result in the same
*defaults*. As far as I can tell from the docs of opusenc and ffmpeg,
the defaults in case there are no options provided are the same. For
6-channel audio the "target" bitrate is 320 kbit/s in both
applications. Have a look at the output in my original mail (for sake
of readbility shortened here):

$ ffmpeg -y -i 6c.flac -c libopus 6c.ffmpeg_libopus.opus
[libopus @ 0x3b09320] No bit rate set. Defaulting to 320000 bps.
size=    2179kB time=00:01:00.09 bitrate= 297.1kbits/s ...

$ opusenc 6c.flac 6c.opusenc.opus
   Output: 6 channels (4 coupled, 2 uncoupled)
           20ms packets, 320kbit/sec VBR
        Bitrate: 273.613kbit/s (without overhead)

So both programs autoselect 320 kbit/s as the nominal bitrate, yet
opusenc produces a considerably smaller file.

Now, this is only a short 1 min sample. The full length file (~30 min)
has bitrates of 282 kbits/s when encoded with ffmpeg and 245 kbit/s
with opusenc. That's round about a 15% smaller file for opusenc.

So, clearly ffmpeg must do something different, other than the bitrate
setting, when using libopus for encoding, despite the docs hinting
that the defaults should be the same:


And BTW, since you mentioned "constant quality", is that even possible
with opusenc yet? Haven't found any setting for it but would be vastly
thankful if you could tell me how, if I missed it.


More information about the ffmpeg-user mailing list