Choosing Audio Stream While Converting Via FFmpeg

2

I`ve got a .mkv file with two audio streams. But when I intent to convert it to a .mp4, the ffmpeg only chooses the first audio stream. How can I make ffmpeg to uses second one? Thanks a lot.

Mohsen

Posted 2016-05-03T04:05:19.537

Reputation: 23

Answers

1

Yes, see https://apple.stackexchange.com/questions/235376/how-do-i-add-vtt-subtitles-to-a-mp4-video-to-view-on-an-iphone-ios, https://trac.ffmpeg.org/wiki/HowToBurnSubtitlesIntoVideo and https://en.wikibooks.org/wiki/FFMPEG_An_Intermediate_Guide/subtitle_options. That is for subtitles but it gives examples. Try

ffmpeg -i input.mkv -map 0:v -map 0:a -c copy output.mp4

Use -map 0:a:1 if only the 2nd audio stream is required. (Or maybe it is -map 1:a.)

Chloe

Posted 2016-05-03T04:05:19.537

Reputation: 4 502

It's not -map 1:a. There's only one input file. – Gyan – 2016-05-03T05:28:42.777