[FFmpeg-trac] #5718(avcodec:open): ffmpeg not remapping channels for libopus automatically

FFmpeg trac at avcodec.org
Fri Jun 14 23:28:52 EEST 2024


#5718: ffmpeg not remapping channels for libopus automatically
-------------------------------------+-------------------------------------
             Reporter:  agressiv     |                    Owner:  (none)
                 Type:  defect       |                   Status:  open
             Priority:  important    |                Component:  avcodec
              Version:  git-master   |               Resolution:
             Keywords:  libopus      |               Blocked By:
  regression                         |
             Blocking:               |  Reproduced by developer:  1
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Comment (by Elliot Lee):

 Please don't use my previous patch. It's ill-advised and silently breaks
 stuff. For the short-term, the command-line workaround with aformat= is
 the best to use.

 The root of the problem is that the Opus format (https://www.rfc-
 editor.org/rfc/rfc7845.html#section-5.1.1 ) uses the Vorbis mapping family
 (https://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-810004.3.9 ) for
 doing more complex channel layouts. Unfortunately, the existing scheme
 only represents a few common channel layouts, and does not allow more than
 one channel layout for any given channel count.

 I think for the long term, what needs to be done is:
 1. Define an Opus channel mapping family (https://www.iana.org/assignments
 /opus-channel-mapping-families/opus-channel-mapping-families.xhtml) that
 can represent the rest of the AV_CHANNEL_LAYOUT_* channel layouts in
 ffmpeg/libavutil/channel_layout.h . ffmpeg is a good reference for this
 because it supports so many obscure channel layouts.
 2. Get libopus to know how to handle this new channel mapping family.
 3. Get ffmpeg using the new libopus to turn its internal channel layouts
 into the Opus channel layouts.

 So really, at this point more of this is a libopus task than an ffmpeg
 task. Anyone have contacts with the opus-codec people that can incorporate
 this idea on their roadmap?
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/5718#comment:29>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list