More than I want to know about subtitles

I got back to the ripping project today. I was determined to rip all nine of the discs in the Mel Brooks Blu-Ray collection, and I succeeded – but ripping discs is only the first step in the process.

My final goal for each disc is to convert each useful item on the disc to an MP4 file that I can put into Plex for easy access; if there are chapter titles for the movie, I want them included in the MP4. And I want to preserve subtitles and alternate audio tracks (like director’s commentary).

Ripping a disc produces a Matroska (MKV) file, which is huge and which Apple devices can’t play natively. Plex will convert a MKV on-the-fly to MP4 and serve that, but my server is old and slow, so I want to avoid that. And I don’t have enough space on my server to hold many uncompressed rips, so I’ve been using Handbrake to compress the ripped files and convert them to MP4s. All seemed well until I got to my first Blu-Ray.

DVDs typically use a text-based format for subtitles – it’s a simple file with timestamps and text. Blu-Rays are different – their subtitles are images (bitmaps) that are merged with the movie dynamically. Handbrake can add a subtitle track to a video as it converts it – but when you convert to MP4, it has to “burn” the subtitle onto the image, so you always see it. That wasn’t acceptable.

Handbrake can also create MKV files, which hold the subtitles as separate files, and the player (Plex) can turn them on or off on command – but then I’m back to having the server do a lot of work, and there’s a short pause in playback when I turn subtitles on or off.

I think I’ve found the answer, though; there’s a program called Subler which, among other things, can use OCR to convert the bitmapped subtitle track to text. An MP4 can have multiple subtitle tracks, and you can turn them on or off at will; Plex doesn’t pause the video when you do that, either.

So my new process (at least for Blu-ray discs) is:

1) Rip the disk
2) Delete items not worth keeping (not all “Special Features” are special)
3) Rename the items I’m keeping to match the title of the material (instead of default names like t01.mkv)
4) Use Handbrake to compress the files and write them out as MKVs (this is slow)
5) Use Subler to convert the bitmap subtitle tracks to text and rewrite the MKV as an MP4 (this is fast)
6) Put that MP4 into Plex and enjoy!

I haven’t tested step 6 yet, but I’m hopeful.