[FFmpeg-user] Downmixing an audio stream while keeping a copy of the original stream
Adam Baxter
voltagex at voltagex.org
Sat Dec 23 10:20:58 EET 2017
Hi all,
I've got a file that I'd like to do the following to:
Video stream: copy
Audio stream 1: convert to AAC, downmix to stereo
Audio stream 2: copy of original AC3 5.1 stream
The below command *seems* like it should work, but only the downmixed
stream ends up in output.mkv
ffmpeg -i "input.mkv" -map 0:v -c:v copy -map 0:a -c:a:1 copy -map 0:a
-c:a:0 aac -b:a:0 192k -ac:a:0 2 -filter_complex
"[a:0]pan=stereo|FL=FC+0.30*FL+0.30*BL|FR=FC+0.30*FR+0.30*BR" -c:a:1 copy
"output.mkv"
ffmpeg reports:
Stream mapping:
Stream #0:1 (ac3) -> pan
pan -> Stream #0:0 (aac)
Stream #0:0 -> #0:1 (copy)
and the final output file:
Input #0, matroska,webm, from 'output.mkv':
Metadata:
ENCODER : Lavf57.82.101
Duration: 00:45:22.58, start: 0.000000, bitrate: 2208 kb/s
Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp (default)
Metadata:
ENCODER : Lavc57.106.101 aac
DURATION : 00:45:22.581000000
Stream #0:1(eng): Video: h264 (High), yuv420p(tv,
bt709/unknown/unknown, progressive), 1280x720 [SAR 1:1 DAR 16:9], 25 fps,
25 tbr, 1k tbn, 50 tbc (default)
Any idea what I'm missing in my command? I'm using ffmpeg version
N-87353-g183fd30
Regards,
Adam
More information about the ffmpeg-user
mailing list