I'm transcoding my video using ffmpeg but I am unable to figure out how I can get both a 2 channel aac option (downmuxed) and a surround AC3 option in one go. My current command is:
ffmpeg -i input.mp4 \
-c:v libx265 -preset medium -crf 21 -pix_fmt yuv420p10le \
-tag:v hvc1 \
-c:a libfdk_aac -b:a 320k \
-c:a ac3 -b:a 512k \
movie_10bit.m4v
But I only get surround out of this. All help is much appreciated.
Go with the
-map
option toffmpeg
. Suppose input stream0:0
is the video stream and0:1
is the audio stream (find out byffmpeg -i input.mp4
). Use-map
to create one video stream and two audio streams in the output:-c:a:0
and-c:a:1
describe the codec for the two audio streams.