If you have an MKV (Matroska Video) file, and it has embedded subtitles, you are in a bit of a quandry if you want to convert it to some other format. Handbrake will DETECT the subtitles, but won't burn them into the output file...apparently, the 'passthru' option for the subtitles won't work between those formats.
So, it becomes a multi-step process...still painless, and the quality remains good.
First, you need to determine the file info. You need to install the mkvtoolnix program set for whatever distro you're using. After that, run
You'll see output that includes track numbers. One will be audio, one will be video, and you'll see subtitles, if there are any. The languages won't be noted, though.
Second step: extract the subtitle(s) from the file. You do this by running:
Code:
mkvextract tracks <filename.mkv> X:<filename.srt>
Replace the X with whatever track # you're after. This only takes a minute or so, and you'll be left with the 'text' subtitle file.
Third step: burn the subtitle into the video file, creating one that has both. While you COULD play the file with a media player before, you'd have to manually select the subtitle...if the player allowed it. This will leave you with a file that has it on by default. Run:
Code:
ffmpeg -i <filename.mkv> -acodec copy -vf subtitles=<filename.srt> <new-output-filename.mkv>
This leaves you with one new MKV file, with the same audio/video quality as the first, except with the subtitles burned in.
Fourth step, and this is optional: convert it to another format. Since the subtitles are burned in, Handbrake, ffmpeg, or any other tool can easily convert it.
If there's a one-step process to do this, I'd love to know what it is. I tried several tools, and none seemed to work. MP4 is fairly tight compression, and a 3GB file went down to under 1GB after conversion, plus they play on my tablet/phone as well.