quick and so, so easy. it took way longer to write all this nonsense than it did to actually do a file gank and translation.
Mkvtoolnix Srt File
Why does mkvmerge not recognize my.srt file as valid file type? An SRT file is a plain text file. It consists of groups of at least four lines each: the line with the running number, the line with the start and end timestamps, one or more lines of text and one blank line as a separator. Here's an example of how a valid file could look. Open MKVToolNix (mkvtoolnix-gui.exe or mkvtoolnix-gui). Click on the + Add source files button at the bottom of MKVToolNix. A “Add media files” window will open. In this window, you go to the location on your computer where the MP4 video file and subtitle file are.
I think I'd read it's plex-client/device dependent, what type of subs inside an .mkv are supported. I'm only ever using firetv/kindle/android, and sadly the client kinda bites. go fig. my PMS *can* transcode+burn subs without too much of a resource punishment, but the results look awful.
if you find yourself stuck with a matrioska file that only has subtitles in vobsub format, it's relatively painless to extract and convert them.
- step 1: extract vobsubs from .mkv file:
install mkvtoolnix if you haven't already. install mkvtoolnix-gui also, if you want. and might as well install avidemux as well, you're going to need it later.
$ sudo aptitude install mkvtoolnix avidemux
then use:
$ mkvinfo some_movie.mkv
to find the subtitle stream you want (i.e. find the 'Language:' field that you want) - or use mkvinfo-gui, if you want. or you could use VLC to get the stream/track infos. whatever.
for some bizarre reason, the movie I was looking at had 2 slightly different english tracks (see below) - whoever repacked it, put in about 20 different languages, and more than a few of them had duplicates too. yours probably won't, so you can probably ignore the 'some_movie_. ...' stuff later below. (I just wanted to extract both subs and check out if they were different.)
from the mkvinfo output: see how it tells you what actual track ID to use for mkv tools? helpful!
| + A track
| + Track number: 5 (track ID for mkvmerge & mkvextract: 4)
| + Track type: subtitles
| + Codec ID: S_VOBSUB
| + Language: eng
| + A track
| + Track number: 21 (track ID for mkvmerge & mkvextract: 20)
| + Track type: subtitles
| + Codec ID: S_VOBSUB
| + Language: eng
use mkvextract to gank the vobsubs out into actual files:
$ mkvextract tracks some_movie.mkv 4:some_movie.srt 20:some_movie_.srt
(yes, you can extract as many tracks as you want at the same time, even audio or video too, if you wanted for some reason.)
((NO, mkvextract will NOT extract the vobsubs to SRT, it will actually create output files like:
some_movie.sub
some_movie_.sub
huh. guess I was just being hopeful, passing .srt extension to it lol.))
- step 3:
to convert the .idx/.sub, all you need is avidemux (does require a gui/desktop) - I used the article from here; it was easy to follow and worked fine:
as the above guide mentions, simply run avidemux and then select from the menu:
select the .idx of the vobsub file-pair (there's actually a 2nd dialog box asking about the index file - article mentions it but doesn't show it). point it at your 'some_movie.idx' file, then tell it an output srt filename (ideally some_movie.srt like your actual movie file is named)
it then asks you to start identifying letters or groups of letters.
whatever shows up directly under 'Current Glyph Text:'
you need to type into the text box underneath that, then press ok.
it will be a little slow going at first, because it will be proceeding letter by letter. but once it has a letter down, it won't ask you about it again. also, try not to typo mess up, because there's no do-over/go-back button.
this is where it starts to get A LOT FASTER, but you also have to be a lot more careful. instead of making you type thru whole words, it may just pick a letter in the middle of a word, since it already knows the ones before it.
you need to be very careful because this program can make many lower/upper case letters look alike, and also the OCR box alignment is weird in a couple cases - comma ',' will show up in the top-left of the OCR box just like apostrophe ' ' ' does. actually so do period '.' hyphen '-' equals '=' and some other ones will show in the top-left. percent '%' confuses the hell out of it so just type 0/0 or whatever you want.
after less than ~2 minutes, it will usually have all it needs and speed through the rest without any interaction or help. your .srt will already be saved where you'd told it to, no need to press any save button or anything at this point.
the only other small annoyance I had was that the particular subs I used had a few instances of both italic sentences and reverse-video sentences (black with white outline) - so I had to go through some of the 'same' characters 2 or 3 times.
it'll also ask you to save a glyph file (i.e. symbol translation for all the hard work you just did - could be worth saving and try using it next time you need to do this.
I think we all know this, but: put 'some_movie.srt' in the same folder as 'some_movie.mkv' on your PMS machine.
- step five:
Mkvtoolnix Subtitles Srt
for whatever reason, the track showed up as 'Unknown' at the very bottom of the list of subtitles contained in the .mkv - fine, who cares, it's working great!