How to keep subtitles track while switching default audio track?

I've video files with 2 audio tracks (eng,jap) and 1 sub track (eng), I was trying to change the default audio track using ffmpeg (the default is English i want to make the Japanese is the default audio track)

I found that command

ffmpeg -i "input.mkv" -map 0:0 -map 0:2 -map 0:1 -disposition:a:0 default -disposition:a:1 none -c copy "output.mkv"

It worked fine, but then i found that the subtitle track is gone, so how can i keep it?

thank yuo

1 Answer

Map all streams with -map 0:

ffmpeg -i input.mkv -map 0 -disposition:a:0 default -disposition:a:1 none -c copy output.mkv

I'm guessing your input contains at least 4 streams (1 video, 2 audio, 1 subtitle) but you were only mapping 3 streams. -map 0 will include all of the streams from the input.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like