Opened 5 years ago

Closed 5 years ago

#8417 closed defect (invalid)

audio filter does not honor stream ids

Reported by: Tupsi Owned by:
Priority: normal Component: avfilter
Version: git-master Keywords: channel_layout
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

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.

Change History (3)

comment:1 by Tupsi, 5 years ago

Summary: avfilter does not honor stream idsaudio filter does not honor stream ids

comment:2 by Carl Eugen Hoyos, 5 years ago

Version: unspecifiedgit-master

Please provide the command line you tested together with the complete, uncut console output to make this a valid ticket.

comment:3 by Tupsi, 5 years ago

Resolution: invalid
Status: newclosed

I'll be damned but its working now I try to get you that commandline, so I must have done something wrong with the id adressing behid -af:...

So sorry for wasting your time, you can close the ticket. (or Ill try that myself)

Note: See TracTickets for help on using tickets.