Extracting Subtitles from mkv file

I have installed MKVToolNix and Subtitle edit. I was able to extract subtitle using Subtitle edit through OCR. While it usable, it comes with a lot of errors.

Now I thought of using MKVToolNix to extract the subtitle. I can see it listed among audio and video tracks. But I am not sure how to get it out of the program.

After referring to a few guides on Google and here, I tried a few FFMPEG commands as well. None of them worked. For example

ffmpeg -i Movie.mkv -map 0:s:0:  subs.srt

It will be great if anyone can help me find a solution. Thanks.

PS : I use Ubuntu 18.04.


Solution 1:

I use MKVCleaver for this as it provides a simple GUI interface for mkvtoolnix on Windows.

You can simply drag and drop an MKV file (or files) on to it, click the check boxes for the tracks you want to extract, and then click "Extract Tracks".

By default your subtitle tracks will then be exported with the name FileName_TrackNo.ext. For DVD subtitles it will export two files, the index of subtitle time and position locations and the actual graphical subtitles.

You can then import these files into SubtitleEdit. I found it more reliable and accurate than SubtitleEdit alone, for some reason its DVD/MKV extractor is not entirely reliable.


For command line and alternative operating systems (you mention Ubuntu) you can use mkvextract which is a part of mkvtoolnix that you have already installed.

From an answer by Cornelius in Extract subtitles from mkv on AskUbuntu:

Run from terminal: mkvextract tracks <your_mkv_video> <track_numer>:<subtitle_file.srt>

Use mkvinfo to get information about tracks.

Though the comments suggest using mkvmerge -i <filename> to get a more directly usable track number for mkvextract. As you mention ffmpeg -i filename.mkv is also usable.

Solution 2:

MKVCleaver is a good option with a clear GUI. But since no one has corrected the ffmpeg command, you can also do it with that. You just had one extra colon at the end of the -map.

Here is a working command:

ffmpeg -i Movie.mkv -map 0:s:0 subs.srt

Solution 3:

I have used Inviska MKV Extract, which required MKVToolNix(52.0.0), on MacOS 10.14.6 and worked perfect. Just drag and drop a number of .mkv files, select what you need of each file, audio or subtitles, and click begin.