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

Peter White peter.white at posteo.net
Sat Jul 16 15:18:50 EEST 2016


Dear list,

I have found a curious issue with encoding 6-channel audio using
ffmpeg's libopus encoder. The bitrate is considerably higher than that
produced by opusenc. Please see below.
Both ffmpeg and opusenc use the latest stable release of libopus
1.1.3. And as far as I can tell, not providing any options should
result in the same default setting and hence the same bitrate.
Also, this only seems to happen with 6-channel audio, not 2-channel.
Maybe, more generally, it is an issue with files that have more than
two channels, but I only have 6- or 2-channel files so cannot say for
sure.
So can anybody tell me why that is and what can be done about it?


Best,
Peter

$ ffmpeg -y -i 6c.flac -c libopus 6c.ffmpeg_libopus.opus
ffmpeg version n3.1.1-3-g7da5900 Copyright (c) 2000-2016 the FFmpeg 
developers
   built with gcc 4.9.2 (Debian 4.9.2-10)
   configuration: --enable-gpl --enable-nonfree --enable-libfdk-aac 
--disable-runtime-cpudetect --enable-libx264 --enable-libvorbis 
--enable-gnutls --enable-opengl --enable-libopus
   libavutil      55. 28.100 / 55. 28.100
   libavcodec     57. 48.101 / 57. 48.101
   libavformat    57. 41.100 / 57. 41.100
   libavdevice    57.  0.101 / 57.  0.101
   libavfilter     6. 47.100 /  6. 47.100
   libswscale      4.  1.100 /  4.  1.100
   libswresample   2.  1.100 /  2.  1.100
   libpostproc    54.  0.100 / 54.  0.100
Input #0, flac, from '6c.flac':
   Metadata:
     TITLE           : Silicon Valley Season 1 Disc 1
     ENCODER         : Lavf57.41.100
   Duration: 00:29:21.39, start: 0.000000, bitrate: 118 kb/s
     Stream #0:0: Audio: flac, 48000 Hz, 5.1(side), s32 (24 bit)
[libopus @ 0x3b09320] No bit rate set. Defaulting to 320000 bps.
[opus @ 0x3b07f80] Using AVStream.codec to pass codec parameters to 
muxers is deprecated, use AVStream.codecpar instead.
Output #0, opus, to '6c.ffmpeg_libopus.opus':
   Metadata:
     TITLE           : Silicon Valley Season 1 Disc 1
     encoder         : Lavf57.41.100
     Stream #0:0: Audio: opus (libopus), 48000 Hz, 5.1, flt (24 bit), 
320 kb/s
     Metadata:
       encoder         : Lavc57.48.101 libopus
       TITLE           : Silicon Valley Season 1 Disc 1
Stream mapping:
   Stream #0:0 -> #0:0 (flac (native) -> opus (libopus))
Press [q] to stop, [?] for help
size=    2179kB time=00:01:00.09 bitrate= 297.1kbits/s speed=12.4x 
video:0kB audio:2168kB subtitle:0kB other streams:0kB global headers:0kB 
muxing overhead: 0.535601%

$ opusenc 6c.flac 6c.opusenc.opus
Encoding using libopus 1.1.3 (audio)
-----------------------------------------------------
    Input: 48kHz 6 channels
   Output: 6 channels (4 coupled, 2 uncoupled)
           20ms packets, 320kbit/sec VBR
  Preskip: 312

Encoding complete
-----------------------------------------------------
        Encoded: 1 minute and 0.1 seconds
        Runtime: 5 seconds
                 (12.02x realtime)
          Wrote: 2067616 bytes, 3005 packets, 63 pages
        Bitrate: 273.613kbit/s (without overhead)
  Instant rates: 6kbit/s to 625.6kbit/s
                 (15 to 1564 bytes per packet)
       Overhead: 0.585% (container+metadata)



More information about the ffmpeg-user mailing list