PDA

View Full Version : Installing MKVExtract




ttu99grad
Apr 1, 2012, 10:54 AM
So, I've been ripping my Blu-Ray discs for the last few weeks now, with a combination of MakeMKV and Handbrake. Must say it has worked very well. Thanks to all the previous posts about the process in this forum. Up to this point I would characterized my rips as pretty basic. Now I have started to rip the new Star Wars Blu-Ray movies. I've read quite a bit about the difficulty with the subtitles for the alien tracks. I get what I need to do, but can't even get past the first simple task....downloading and installing the MKVExtract app and integrating it with the MKVToolnix app. (I already have MKVToolnix installed).

I've downloaded the MKV Extract file from here...

http://www.videohelp.com/tools/MKVExtractGUI-2

I then unzip the file and run the .exe file, and it just gives me a weird text file with some text, but largely garbage.

I've combed through the forums here and done general google searches, and have not been able to get it to install. I've seen some references to placing the .exe file into the MKVToolnix application folder, but have not gotten that to work. Seems like it might be move of a Windows solutions, but not really sure.

Feel rather stupid to have to ask for help on this, but can't seem to see any other way. :confused: Appreciate any guidance on how to get the MKVExtract app installed.

If it matters, I'm running an iMac (had it for about 4 months) 1TB, 2.7GHz i5 processor.

Thanks for the help in advance.



simsaladimbamba
Apr 1, 2012, 10:56 AM
An .exe file if a Windows executable, thus it will not work on Mac OS X, unless you use Windows.

Can this help?
How-To: Automating DVD & Blu-Ray (Backup, Encoding & Tagging) for Mac OS X 10.6 (http://forums.macrumors.com/showthread.php?t=805573)

ttu99grad
Apr 1, 2012, 02:20 PM
Thanks for the note. Great workflow, but I'm not sure reading through it, that it specifically addresses the need to take the subtitle tracks and force the encoding into the MKV. If it does, can you help me with where?

simsaladimbamba
Apr 1, 2012, 02:25 PM
Thanks for the note. Great workflow, but I'm not sure reading through it, that it specifically addresses the need to take the subtitle tracks and force the encoding into the MKV. If it does, can you help me with where?

I can't help, as I don't rip anymore. Maybe ask in that thread?

khollister
Apr 1, 2012, 02:31 PM
Give me about an hour or so to finish something else and I'll post links and instructions.

khollister
Apr 1, 2012, 03:32 PM
Okay - almost everything you need to know about forced subs :)

First, a few terminology things out of the way. My apologies if you already know this ...

There are 3 subtitle formats that you are likely to run into in the DVD, blu-ray (BD) and iTunes universe

PGS - a bitmapped subtitle format used on BD
VOB - a different bitmapped format used in DVD
SRT - a text format used for "soft" subtitles in iTunes/ATV

Note that SRT subs are the only type that can be switched on or off on the ATV. However, they are not as elegant looking as the bitmapped subs people are used to seeing on BD or DVD

DVD's or BD's often have multiple subtitle tracks (or streams) for different languages. There are also what are referred to as "forced" subs which are just the foreign language translations (e.g., the english forced sub track only displays the english translation for lines in a language other than english)

Since we are going to "burn" in a sub track into the MP4 video stream (so it is always displayed when played back with ATV or iTunes), we are normally interested in the forced sub for your native language. Burning in a sub renders the text into the video stream as part of the movie - it can no longer be toggled on or off.

OK - so we have 6 basic steps to turning a blu-ray movie into a ATV compatible m4v file ...

Rip the main feature (the movie) from the BD using something like MakeMKV
Identify the forced sub stream we are interested in burning in
Extract the forced sub stream/track
Convert the BD PGS sub stream to VOB format (Handbrake friendly)
Re-mux the VOB sub stream with the original MKV file (video, audio and chapter list)
Transcode into m4v with Handbrake, including burning in the VOB sub stream now in the MKV


I am assuming you know how to handle steps 1 and 6. I will concentrate on 2 thru 5.

You will need 2 pieces of additional software:

MKVtoolnix for Mac - http://jonthn.free.fr/MKVtoolnix/
BDsup2sub - http://www.videohelp.com/tools/BDSup2Sub


MKVtoolnix is a GUI for MKVmerge as well as continuing several command line tools including MKVextract

BDsup2sub is a Java GUI app that converts PGS subs to VOB subs

A note about installing/using these tools. Since you are going to need to invoke mkvextract from a UNIX shell (OS X Terminal app) and start BDsup2sub via a shell command (java -jar BDsup2sub.jar), you need to put BDsup2sub.jar and mkvextract somewhere that is either in your shell path or in a directory that is short and easy to type. mkvextract can be found by right clicking on the Mkvtoolnix app and selecting "Show Package Contents". You will find mkvextract in the Contents/MacOS folder. Copy or create a link to your desired location.

Instructions in next post

khollister
Apr 1, 2012, 03:48 PM
When using MakeMKV to rip the BD, make it easy on yourself and only check the forced sub streams in your native language to rip. This will make it easier to identify what to extract
Once the movie is ripped into a MKV, open the file in Mkvtoolnix (aka mkvmerge GUI). You will the video stream, one or more sudio streams and a PGS sub stream if the movie has forced subs. Note the ID number - you need this for the next step. If you have more than one sub stream, you will need to experiment playing the movie in VLC to determine which sub is the one you want.
Use mkvextract to extract teh forced sub you identified in step 2. The syntax is: mkvextract tracks mymovie.mkv ID:mymovie.sup, where mymovie is the name of your MKV file and ID is the integer number you located for the sub stream in step 2
Drag the .sup file (mymovie.sup in the previous example) onto the BDsup2sub app. Hit "OK" and use the defaults in the dialog box that appears. You should see the first subtitle displayed and a listbox in the upper left that lets you select an individual subtitle frame. Go to the File menu and select Save/Export, set the language correctly (doesn't always autodetect correctly) and hit return. BDsup2sub will create 2 new files - a .sub and a .idx
Now go back to mkvmerge GUI and add the newly created VOB sub track (you will select the IDX file, not the SUB one). Remux the MKV so it includes the original video, audio and chapters as well as the VOB subtitle.
Select the VOB sub track in Handbrake and make sure the "Burn In" box is checked.


There is potentially a slightly easier way using the old version of MKVTools - this allows you to extract the sub track in the GUI rather than using the command line mkvextract. The problem is MKVTools is very picky about the MKV container format, and will occasionally refuse to load a MKV. I have yet to have mkvmerge and mkvextract not process an MKV file created with MakeMKV.

I have also had exactly one failure of BDsup2sub - Avatar. Avatar uses a fancy font for the forced sub, and BDsup2sub apparently chokes on it. I was forced to download a SRT forced sub for Avatar and use that, even though I think it looks like ass. YMMV

Have fun

ttu99grad
Apr 1, 2012, 08:42 PM
Thanks so much. I've got the code open and know the track I want. It's track 3 for subtitles. The code I used is as follows:

/Applications/Mkvtoolnix.app/Contents/MacOS/mkvextract tracks StarWars.mkv 3:subtitles.srt

Which yields this error.

Error: (mkvextract) The file 'StarWars.mkv' could not be opened for reading (No such file or directory)

I assume this means the path to my Star Wars mkv file most be precise, but I've tried putting in the fill path as $ Movies/StarWars.mkv however, it still does not recognize the directory or file. Is there a specific place the mkv file needs to be in order to avoid putting the entire path in, or make it easier?

Thanks.

khollister
Apr 1, 2012, 08:56 PM
Thanks so much. I've got the code open and know the track I want. It's track 3 for subtitles. The code I used is as follows:

/Applications/Mkvtoolnix.app/Contents/MacOS/mkvextract tracks StarWars.mkv 3:subtitles.srt

Which yields this error.

Error: (mkvextract) The file 'StarWars.mkv' could not be opened for reading (No such file or directory)

I assume this means the path to my Star Wars mkv file most be precise, but I've tried putting in the fill path as $ Movies/StarWars.mkv however, it still does not recognize the directory or file. Is there a specific place the mkv file needs to be in order to avoid putting the entire path in, or make it easier?

Thanks.

You need the full path or a location that is in your shell PATH.

Also, mkvextract cannot create an SRT subtitle track from a blu-ray rip that has PGS subs. If all you want is SRT soft subs, I wasted my time typing all of this - just find and download the SRT sub for your movie from the internet and add it with Handbrake.

Not sure what you thought "$ Movies/" was going to resolve to. What you might have been wanting is ~/Movies, which would be the Movies folder in your home directory.

You should do a little reading on UNIX shells (bash is the default for OS X).

butang
Apr 1, 2012, 09:00 PM
http://makemkv.com/forum2/viewtopic.php?f=4&t=1416

This post helped me a lot.