Saturday, January 15, 2011

Extracting Subtitles from a MKV

You have a .MKV (Matroska Video) video file with embedded subtitles and you need to extract them to separate .SRT (Subtitles) file. Here is how to do this with the help of freeware software.
You will need the following:
  1. a .MKV File with a built-in Subtitles track (how to check will follow shortly)
  2. Your favourite media player. For this post I use VLC Media Player 
  3. MKVToolnix – a set of cross platform tools for .MKV files (get them from here)
And here is how you get going.

Step #1 – Verify that your MKV file actually does have built-in subtitles
Screenshot #1
(Click to zoom)

The easiest way is to check is to open the file using VLC Player. Select Tools --> Media Info (or press Ctrl+J). Switch to the “Codec Details” tab. Expand all the items underneath until you find one with the type “Subtitle”.  An example can be seen in the screenshot on the right.

Another way of doing this is to use the mkvinfo tool from the MKVToolnix collection mentioned above. If you are, start up mkvinfo in graphical mode with the following command line:

mkvinfo –g {Press Enter}

Screenshot #2
(Click to zoom)

Then open up your .MKV file (Select File --> Open). You should see the same information as we saw before here too (see screenshot).

Important: Make a note of the “Track Number” for our subtitle track. In our case, the value is 3. This will come in handy with the extraction process.

Step #2 – Extract the Subtitles into a .SRT file
We will now use the mkvextract tool from the MKVToolnix kit. The exact command line format to use is:

mkvextract.exe tracks {path of the MKV file}  {track number we noted in the previous step}:{Filename to save the subtitles to}

In the case of my example, this will look like the following:

mkvextract.exe tracks "c:\My_MKV_Video_File.mkv"

Note the number used to prefix the .SRT filename. This is “Track Number” we noted in the previous step.
Going beyond
The mkvextract tool is just as capable of extracting other tracks - audio or video. All you need to do is use the right track number as prefix. So for instance, if the first track is audio, you can extract it with very little modification to the command we used before

mkvextract.exe tracks "c:\My_MKV_Video_File.mkv" 1:Audio_track.mp3

Again, note that we prefixed the MP3 filename with the right track number. We can also combine all of what we did above to extract both audio and subtitles in one single line:

mkvextract.exe tracks "c:\My_MKV_Video_File.mkv" 1:Audio_track.MP3

For more possibilities, look through the documentation of the mkvextract tool. And if this work for you or you did something cooler with this - I would love to hear from you. Please leave me a comment below.

See also: Extracting an MP3 from a Youtube video


  1. I have Windows 7 Ultimate 64 bit, mkvmerge GUI v4.8.0 and a .mkv file with a subtitle file that I want.

    When I load my video file I get all the different things under Tracks, chapter and tags. I uncheck all, except my chosen tracks of subtitles and as output filename I rename it from my_video.mkv to and then I press "Start muxing".

    Is there anything I can do to improve this ? I want norwegian subtitles and I get some funny letters...

  2. Eyolf, it doesn't work that way. You need to follow the steps outlined on this page i.e. identify the track you want, then use the command line to extract it.
    A couple of things I found that might be useful:
    1. If you're using VLC (as I did) to identify the track you want to extract, add 1 to the stream number when using the command line, as VLC starts at 0 (zero).
    2. By default the track extracts to the installed MKV toolkit's data folder.

    BTW Thanks to his Techie Self.

  3. This worked perfectly for me, unlike many other things I tried. Thanks for the quick, easy tutorial.

  4. Help anyone:
    I tried this command:
    mkvextract tracks c:\iso\wolmi.mkv

    Warning: Unsupported CodecID 'S_VOBSUB' for ID:3. The track will be skipped. Nothing To Do.

    Interestingly, the mkv doesn't show it's subtitle in VLC nor any player except KMPLAYER. Does this mean this mkv uses vobsub instead of text and mkvextract doesn't have an ocr to read it?

    Thanks anyone!!!

    1. That's correct. It's seems to be an extraction tool. No OCR.

  5. Perfect. Able to extract subtitle out. Thanks

  6. Love how the program closes before I can type anything into the command line, 10/10 best unusable software I've ever downloaded.

  7. thank you soooooooooo much :)

  8. How can a CLI app "close" before you can type? Too much GUI for you... (check both on Wikipedia willya)

  9. Great! As a beginner, I don't know where to type those commands.

  10.  you have no idea what you're doing, please don't blame it on this excellent piece of software

  11. @Benturath - Try opening a command prompt (Start > Run > cmd, and press Enter). However, if you've never run a Command at the prompt before I would tread very very carefully. But once you do, there's no going back to being a mouse-only user (I mean it's fun and addictive) :-)

  12. this
    is so greaaaaaaaaaaaaaaaat. thanks so much

  13. where can i find the extracted srt?

  14. You can specify the name and path of the srt file in the command line E.g. C:\

  15. Works like a charm!


  16. Perfect !!!! Thank you

  17. I was delighted to find this one.I could not unravel the official description of command-line operations.

    Just one problem. While I specify .srt subtitle files – as instructed here – I actually get.sub.

    I know that it is something that I am doing wrong, but I can't for the life of me figure it out. I tried adding some of the other switches on the official list. No luck.

  18. Perhaps you could post the command line you execute we can try and figure it out?

  19. first time so confuse and finally excited! thank you so much

  20. Alexis Garcia4/01/2013 6:14 a.m.

    Thank you for share. I was able to extract SRT from MKV in 5 seconds (i had the MKV in an SSD). Thanks!

  21. Thank you very much... ^_^
    this worked perfectly... :-)

  22. Thanks it works great,

    I was also wondered where the created .srt file was and it was in the c:MKVToolkit folder.

  23. Thanks! Now I don't need to play those .mkv files that lag my PC :3

  24. Delighted I could be of help to so many of you. And thanks for letting me know :)

  25. I wanted to extract some embedded subs and this article was the first thing I found. I admit I was unfamiliar with both MKVtoolnix and using the command prompt. The main article left me rather baffled but after reading Mayuresh's comment to Benturath I was able to get it all figured out. I guess I'm saying the article could have been more novice friendly to begin with.

    Afterwards I found a GUI for MKVtoolnix called MKVcleaver. I found that it makes the whole extraction process feel more straight forward for the command-prompt-inexperienced like myself. I used version 6.02 which I believe is currently the latest version.

    I hope it's alright for me to post a link...

    MKVcleaver home site:

    A second alternative to using the command prompt involves creating a shortcut to mkvextract.exe(found in your MKVtoolnix folder).

    2) Right-click the shortcut and choose Properties.

    3) under the 'Shortcut' tab you can put your command line in the "Target:" field.

    So if MKVtoolnix is installed to c:\ you would put this in the "Target:" field:

    C:\MKVToolNix\mkvextract.exe tracks "c:\My_MKV_Video_File.mkv" 3:c:\

    That way, when you have a .mkv file to extract a track from, you can edit that "Target:" field to have the .mkv file location and track number/filetype.

    4)Then click Apply at the bottom of the preferences window and double-click the shortcut. It will run the .exe with the command line.

    Thanks to Mayuresh for getting me pointed in the right direction.

  26. I can't change the command, I mean it says .idx not .srt?
    How can I change that?!

  27. Having issue with extracting Codec ID: S_HDMV/PGS to SRT.
    1: mkvinfo -g identifies the track # as 3
    2: using command line: F:\>mkvextract.exe tracks "f:\GOTS3D1.mkv"
    3: returns: Error: No track with the ID 3 was found in the source file.
    4: I created the MKV using Handbrake but need the SRT to view sub on ROKU stream
    5: Also tried track 0, 1, or 2. A file is created for the other tracks but 0 should not return anything. Track 2 returns unreadable characters.
    Any idea what may be the issue?

  28. Thank you for the information. But since I usually do batch extractions/conversion for videos, I rather not do this process every single time...

    So I created a vbscript where you simply drag and drop the mkv files into the vbscript to automatically extract all subtitles for you through the mkvinfo and mkvextract.exe command line tool.
    My knowledge and skills with vbscript and mkvtool is only entry level, so my script can probably have a lot of improvements.

    Download Link:

    Scanned at, returned 0 out of 53, so it is safe.

    Please note that it does NOT work with folders. It only works with a selection of mkv videos, and if you try to put like 10+ mkv files at one go, it may lag for a bit. I also didn't bother too much with the error checking.

    Feel free to modify the script to suit your needs or improve it.

    mkvinfo and mkvextract.exe I used is version 5.9.0. In the future, if they decide to change the mkvinfo output format for whatever reason, or command syntax for any one of them, it would render my script non functional.

  29. marialandoney7/24/2014 7:27 a.m.

    I know a software called iDealshare VideoGo which can easily extract subtitles from MKV, MP4, VOB, TS, AVI, MPG, FLV, WMV, SWF, and etc on Windows 8/7/Vista/XP or Mac OS X (Mavericks included)

    Step by step guide at
    Besides extracting subs from video files, iDealshare VideoGo also
    helps to completely remove subtitles from video files or add subtitles
    to movies files.

  30. marialandoney9/17/2014 8:36 a.m.

    I use iDealshare VideoGo to batch remove or delete
    subtitles from MKV video files. Besides removing subtitles from MKV
    video, it also can remove subtitles from AVI, MP4, VOB, FLV, MPEG, WMV,
    MOV, RMVB, DV, 3GP, ASF, AVCHD, MXF, and etc.

    It also helps to add subtitles to MKV or extract subtitles from MKV.


  31. marialandoney9/17/2014 8:37 a.m.

    I use iDealshare VideoGo to batch remove or delete
    subtitles from MKV video files. Besides removing subtitles from MKV
    video, it also can remove subtitles from AVI, MP4, VOB, FLV, MPEG, WMV,
    MOV, RMVB, DV, 3GP, ASF, AVCHD, MXF, and etc.

    It also helps to add subtitles to MKV or extract subtitles from MKV.

  32. This doesn't seem to extract the subtitles when they are "hard-coded". If I can get the start- & stop- of each subtitle, it is enuf for my purposes.......Or am I missing something?

  33. I use Faasoft Video Converter to extract subtitles from AVI as well as
    keep the original format or change AVI to MP4, MOV, FLV, etc.

  34. you can do it much faster by using MKVExtractGUI-2 with it.

  35. Thom MacIntyre4/20/2015 1:41 p.m.

    My first "IT" job was on a VAX in 1987 so I kind of dig ALL operating systems. That being said, Ubuntu is a blast and this was an incredibly useful post.

  36. You may also follow this simple guide to easily extract subtitles from MKV at