Wednesday, 24 April 2013

Strip languages from large (extremely long or with multiple language options) subtitle files using “Handbrake”


I have come across subtitle files that would not open in Gnome Subtitles or any other editor due to their size (multiple languages). I just wanted the one subtitle language burned into file not an option to choose all the languages available in the original.

As I said all the Linux subtitle editors I tried just could not cope with such large files with the scripts for many languages in them.

So I needed to find a way of removing the superfluous language scripts first before hard coding the single language subtitles on top of the video feed to stream from Plex media Server to my TV.

This is also a quick dirty way to "burn in" idx, SUB files for use on media players that do not support these forms of subtitles. My Plex Player for example.

Open MKVMerge

First we will add our SUB, IDX or stb to the film in one Matroska container / Wrapper.

Click "add" and add the video file to the place entitled input box then "add" again to place the subtitle file in there too.



The box below entitled  Tracks, chapters and tags now shows all the elements you have added. If you have multiple text / sub files in different languages and you only need your language just deselect the boxes with other languages named next to them. This will leave you with a Video stream, an audio stream and a text file in your language.

Hit  "start muxing" at the bottom.

Wait a few moments until it has finished. Have a look where it saved the file  by checking the "Output filename" box for the path and name (you could have changed this but you didn't).

Remember this path.

You now have new container combining all files needed.



Open Handbrake. (handbrake is not officially supported as of writing and is not in the repositories, you will need to add it's source and then install)

Open subtitles tab.

It should say TRACK and underneath {language} (VOBSUB)

4. Select “burned in” button. Re-encode file by pressing start.

5. Done.

No comments:

Post a Comment