[FFmpeg-trac] #8417(avfilter:new): avfilter does not honor stream ids
FFmpeg
trac at avcodec.org
Mon Dec 9 08:33:14 EET 2019
#8417: avfilter does not honor stream ids
-------------------------------------+-------------------------------------
Reporter: Tupsi | Type: defect
Status: new | Priority: normal
Component: avfilter | Version:
Keywords: | unspecified
channel_layout | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
The audio filter is unable to honor mapping options of audio stream ids
(a:?). If you try to encode two audio streams in one file in one go with a
different number of channels (one 5.1 and one 2.0 in my case), you need to
pass a mapping_family and channel_layouts settings for each stream if you
use libopus, which seems not possible. If you add -loglevel debug, you can
see:
Applying option map (set input stream mapping) with argument 0:0.
Applying option map (set input stream mapping) with argument 0:1.
Applying option map (set input stream mapping) with argument 0:2.
Applying option c:a:0 (codec name) with argument libopus.
Applying option b:a:0 (video bitrate (please use -b:v)) with argument
160000.
Applying option c:a:1 (codec name) with argument libopus.
Applying option b:a:1 (video bitrate (please use -b:v)) with argument
96000.
Applying option c:s (codec name) with argument copy.
Applying option af:a:0 (set audio filters) with argument
aformat=channel_layouts=5.1.
Applying option af:a:1 (set audio filters) with argument
aformat=channel_layouts=stereo.
Successfully parsed a group of options.
Although you do not get a setting for stream one and two, but the 2nd
settings just overwrites the first one, resulting in both stream getting
encoded in stereo.
How to reproduce:
{{{
% ffmpeg -i input -map 0:1 -map 0:2 -map 0:3 -c:a:0 libopus -b:a:0 160000
-c:a:1 libopus -b:a:1 96000 -c:s copy -mapping_family:a:0 1 -af:a:0
aformat=channel_layouts=5.1 -mapping_family:a:1 0 -af:a:1
aformat=channel_layouts=stereo output
ffmpeg version N-95623-gf3fae82de9-g53c21c2d6b+2
built on Windows 10
}}}
Patches should be submitted to the ffmpeg-devel mailing list and not this
bug tracker.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8417>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list