New on LowEndTalk? Please Register and read our Community Rules.
FFmpeg, harcoding subtitles and choosing the audio track?
I have a video which has multiple audio tracks (dual-audio) and multiple subtitles, I use the follow command to hardcode (burn-in) subtitles when converting from .MKV to .MP4
ffmpeg -i 'INPUT_OF_MKV' -acodec aac -crf 21 -preset veryfast -filter_complex subtitles='INPUT_OF_MKV:si=0' 'OUTPUT_IN_MP4.mp4'
This works fine for selecting the correct subtitles but I cannot seem to figure out how to choose the right audio track, it defaults it to the first audio track, but I would like to choose the 2nd one while burning-in subtitles. Any ideas?
Comments
You want to use -map.
https://trac.ffmpeg.org/wiki/Map
Did you try using stream specifiers (and take a look at how mapping works.)?
I guess you would need "-map 0:0" (stream 0 to stream 0) to map the right audio source to the right destination.
Thanks! Worked!
Yep, used a slightly different map technique but thanks again!