[FFmpeg-trac] #8939(undetermined:new): libopus: mapping_family does not get set correctly for surround sound

FFmpeg trac at avcodec.org
Sun Oct 18 22:20:27 EEST 2020


#8939: libopus: mapping_family does not get set correctly for surround sound
-------------------------------------+-------------------------------------
             Reporter:  frk1337      |                     Type:  defect
               Status:  new          |                 Priority:  important
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:  libopus,     |               Blocked By:
  channellayout                      |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 ffmpeg does not set mapping_family correct for surround sound when using
 libopus. This leads to wrong surround sound (e.g. for me voice was coming
 from the back speakers).

 How to reproduce:
 {{{
 % ffmpeg -i 'source.mkv' -vn -sn -map 0:a:0 -c:a libopus ffmpeg.opus
 ffmpeg version N-99608-g6ef55f54fe Copyright (c) 2000-2020 the FFmpeg
 developers
 built with gcc 10.2.0 (GCC)
 configuration: --prefix=/usr --extra-cflags=-I/usr/include/tensorflow
 --disable-rpath --enable-gpl --enable-version3 --enable-nonfree --enable-
 shared --disable-static --disable-stripping --enable-gray --enable-
 avresample --enable-alsa --enable-avisynth --enable-bzlib --enable-
 chromaprint --enable-frei0r --enable-gcrypt --enable-gmp --enable-gnutls
 --enable-iconv --enable-ladspa --enable-libaom --enable-libaribb24
 --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
 --enable-libcelt --enable-libcdio --enable-libcodec2 --enable-libdav1d
 --enable-libdavs2 --enable-libdc1394 --enable-libfdk-aac --enable-libflite
 --enable-fontconfig --enable-libfreetype --enable-libfribidi --enable-
 libgme --enable-libgsm --enable-libiec61883 --enable-libilbc --enable-
 libjack --enable-libklvanc --enable-libkvazaar --enable-liblensfun
 --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
 --enable-libopencore-amrwb --disable-libopencv --enable-libopenh264
 --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-
 libpulse --enable-librabbitmq --enable-librav1e --enable-librsvg --enable-
 librubberband --enable-librtmp --enable-libshine --enable-libsmbclient
 --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt
 --enable-libssh --enable-libsvthevc --enable-libsvtav1 --enable-
 libtensorflow --enable-libtesseract --enable-libtheora --disable-libtls
 --enable-libtwolame --enable-libuavs3d --enable-libv4l2 --enable-
 libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis
 --enable-libvpx --enable-libsvtvp9 --enable-libwebp --enable-libx264
 --enable-libx265 --enable-libxavs --enable-libxavs2 --enable-libxcb
 --enable-libxcb-shm --enable-libxcb-xfixes --enable-libxcb-shape --enable-
 libxvid --enable-libxml2 --enable-libzimg --enable-libzmq --enable-libzvbi
 --enable-lv2 --enable-lzma --enable-decklink --disable-mbedtls --enable-
 libmysofa --enable-openal --enable-opencl --enable-opengl --disable-
 openssl --enable-pocketsphinx --enable-sndio --enable-sdl2 --enable-
 vapoursynth --enable-vulkan --enable-xlib --enable-zlib --enable-amf
 --enable-libdrm --enable-omx --enable-v4l2-m2m --enable-vaapi --enable-
 vdpau
 libavutil      56. 60.100 / 56. 60.100
 libavcodec     58.111.101 / 58.111.101
 libavformat    58. 62.100 / 58. 62.100
 libavdevice    58. 11.102 / 58. 11.102
 libavfilter     7. 87.100 /  7. 87.100
 libavresample   4.  0.  0 /  4.  0.  0
 libswscale      5.  8.100 /  5.  8.100
 libswresample   3.  8.100 /  3.  8.100
 libpostproc    55.  8.100 / 55.  8.100
 }}}

 Source file:

 Format                                   : DTS ES XXCH XLL
 Format/Info                              : Digital Theater Systems
 Commercial name                          : DTS-HD Master Audio
 Codec ID                                 : A_DTS
 Duration                                 : 3 h 48 min
 Bit rate mode                            : Variable
 Bit rate                                 : 4 742 kb/s
 Channel(s)                               : 7 channels
 Channel layout                           : C L R Ls Rs LFE Cb
 Sampling rate                            : 48.0 kHz
 Frame rate                               : 93.750 FPS (512 SPF)
 Bit depth                                : 24 bits
 Compression mode                         : Lossless
 Stream size                              : 7.56 GiB (13%)
 Title                                    : DTS-HD MA 6.1
 Language                                 : English
 Default                                  : Yes
 Forced                                   : No

 The command above sets the layout (6.1) correctly but does not set
 mapping_family correctly so the channels get coupled wrong (voice is
 coming from the back). Converting to wav and using opusenc directly leads
 correct mapping. As does manually specifing -mapping_family 1.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8939>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list