guy labs guy labs

Extract subtitles from mkv files and convert to the srt format

Previos Post

In the todays blog post I will show you how to extract subtitles from a MKV file and how to convert the .sub/.idx files to .srt files. I have this requirement as I use the Twonky mediaserver which only accepts .srt files with my Samsung TV.

The whole guide is using brew and therefore is only for Mac users. There are surely similar or the same tools available for any other linux or maybe also Windows. If you find these please tell me such that I can update this blog post.

So lets start by installing the needed tools for extracting the subtitles from the .mkv files:

Next we want to see all tracks of the .mkv file:

This will give you a similar output:

So we see that this .mkv has one video, two audio (english and german) and two VobSub subtitles tracks (english and german). We are interested in the two last tracks and with these commands you can extract them:

Currently I only extracted VobSub subtitles and this guide deals with the .sub/.idx files and convert them to the .srt format. It could also be that there are already .srt files in the .mkv files, then you do not need to convert anything and just check the language of the subtitles by opening them in any text editor and check the language.

This will result in four files named sub3.idx/sub3.sub and sub4.idx/sub4.sub in the same directory. Currently we do not see what language the subtitles are so we need to convert them to the .srt format. Before we are able to do this we need to install the needed tools:

After that you can execute the following commands to convert the subtitles from the .idx/.sub format to the .srt format:

Please note that you just add the name of the .idx/.sub subtitle files. So you do not need to add any file extension just the name. This process can take some time depending on the size of the subtitles.

After that you should have the .srt files which you need to name exactly as the .mkv movie such that Twonky is able to read it.

Hope this helps someone and have fun watching movies!



 33,686 total views,  11 views today

Tags: , ,

Previos Post Share Post :


  • FranKaj
    June 20, 2017 8:21 PM at 8:21 PM  - Reply

    Please help me get started. Where do I get the needed tool? What is brew install?

  • FranKaj
    June 20, 2017 8:42 PM at 8:42 PM  - Reply

    I figured out how to install homebrew. On to installing mkvtoolnix.

Leave a Reply

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.