#11562 closed defect (invalid)

ffmpeg adds an extra audio stream to the output if apad filter_complex is used

Reported by: weihuaqd Owned by:
Priority: normal Component: ffmpeg
Version: 7.1 Keywords: filter_complex apad
Cc: weihuaqd Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug: ffmpeg adds an extra audio stream to the output if apad filter_complex is used. Here's the stream mapping:

Stream mapping:
  Stream #0:1 (aac) -> apad:default
  apad:default -> Stream #0:0 (aac)
  Stream #0:0 -> #0:1 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:2 (aac (native) -> aac (native))

How to reproduce:

ffmpeg -v 9 -loglevel 99 -i webcam_recording_original.mp4 -to 00:00:30 -map 0:v? -map 0:a? -filter_complex [0:a?]apad -shortest -y  test.mp4

This affects 6.* and 7.1.1.
4.4 works as expected.

Attachments (2)

webcam_recording_original.mp4 (1.5 MB ) - added by weihuaqd 17 months ago.
A sample input file
ffmpeg_output.txt (1.7 MB ) - added by weihuaqd 17 months ago.

Change History (3)

by weihuaqd, 17 months ago

A sample input file

by weihuaqd, 17 months ago

Attachment: ffmpeg_output.txt added

comment:1 by Gyan, 17 months ago

Resolution: invalid
Status: newclosed

If you're mapping the audio, use -af or -filter:a not filter_complex.

-map 0:a? -af apad

Read the chapter on stream selection.

Note: See TracTickets for help on using tickets.