[FFmpeg-trac] #4160(undetermined:new): problem encoding opus file with unusual channel mask

FFmpeg trac at avcodec.org
Sun Dec 7 12:08:34 CET 2014


#4160: problem encoding opus file with unusual channel mask
--------------------------------+----------------------------------------
             Reporter:  divide  |                    Owner:
                 Type:  defect  |                   Status:  new
             Priority:  normal  |                Component:  undetermined
              Version:  2.5     |               Resolution:
             Keywords:          |               Blocked By:
             Blocking:          |  Reproduced by developer:  0
Analyzed by developer:  0       |
--------------------------------+----------------------------------------

Comment (by Cigaes):

 There are several issues at work here.

 First, and this is not directly related to libopus, your channel layout is
 so strange that FFmpeg (more precisely libswresample) does not know what
 to do with it. I am not sure if this would be something that can be
 “fixed”.

 Second, the format for the header does not allow to express the whole
 range of channel layouts. This is the same for both Opus-in-Ogg and
 Matroska: only the standard Vorbis channel layouts can be expressed. In
 other words, you can not express FL+FR+BL in an Opus file, you can only
 express it as FL+FR+BL+BR (quad) with a BR channel that happens to be
 visibly silent. The decoder does not make any effort to remove the silent
 channel or even notify that it is silent.

 Third, because of the previous reason, the libopus mapping in FFmpeg does
 not make extra efforts to allow strange channel layout mappings.

 The way I see it, there are two enhancements that can be added to FFmpeg:

 - On the Opus decoder, add an option to remove silent channels from the
 output.

 - On the libopus encoder, make it possible to encode strange channel
 layouts by specifying the mapping more or less by hand.

 (Unfortunately, it seems that libopus is not subtle enough to detect when
 an input stereo stream has actually two identical channels.)

 Also, it seems there is an actual bug that makes libavfilter to prefer
 FL+FR+BL→6.1 over FL+FR+BR→quad because the BL+BR→SL+SR remapping counts
 as 2 remapped channels while BL counts only as one preserved channel. This
 looks like an easy fix.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/4160#comment:7>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list