woof woof
Converting MKV to MP4/H.264 in OS X
When I get anime episodes/movies or even sometimes regular video content it’ll come in a relatively new format (at least to me) called Matroska, file extension .MKV. The format can easily be played on your Mac using Perian or even with VLC. However I do most of my video viewing via my AppleTV on a much bigger screen. Unfortunately iTunes and AppleTV don’t recognize the MKV file format so one needs to convert it into something which it does understand.
For the longest time I had a multi-step process which was a real pain in the ass and resulted in videos that had been re-encoded multiple times. As you can imagine this meant a pretty good loss of quality and time. I basically had to de-mux the subtitle track on my Mac, convert it to an SRT file (sometimes an SSA file is used for subtitles) on a Windows box (using Subtitle Workshop), copy the new SRT file back over, convert the entire MKV file to an MP4. Then I would take my MP4 and the SRT file and combine them using ViddyUp!. Basically it was a real pain in the ass.
Then I found a really great piece of software, MKVTools. It’s essentially just a GUI front-end to a bunch of video encoders, but it sure makes my life a lot easier and does what I need in 1 step, not 12. After encoding a couple videos and being amazed at that fact it was doing exactly what I needed to, I immediately plunked down the $5 to register it.
Ever since I purchased it it’s been running perfectly for me. Up until about the release of Snow Leopard that is. Now, the following is an issue I had, not an issue with the MKVTools software, but rather an issue with the configuration of my iMac.
Around the launch of Mac OS X Snow Leopard I started experiencing issues where I could no longer convert videos. When it got to the muxing part it would just error out stating that that it couldn’t run an ‘ls -ks’ command and by looking further into the log file MKVTools had generated it was also trying to use a library file that didn’t exist — “dyld Library not loaded /usr/lib/libXplugin.1.dylib”. This happened months ago, back when Snow Leopard came out. Since then I pretty much chalked it up to it not being compatible with Snow Leopard but according to the MKVTools website, the software was compatible with Snow Leopard. I tried again and again with different videos, but continually came up with that same error. At that point, I just gave up.
Just the other night, I tried again, continued getting those errors and decided to research it some more. I also noticed that new versions of MKVTools had been released one of which included a fix specifically noted to fix issues when muxing MP4 files. I downloaded the new version, still the same issue. I then actually looked in my /usr/lib folder and indeed there was no libXplugin.1.dylib file. Alright, so I pulled down a copy from another OS X box. The next error I got was related to a missing X11 library file. I pulled out my Snow Leopard installer disk and promptly installed X11 (which can be done by clicking the Option Installs button from the installer window). I fired up MKVTools again and it processed the video file with no issues, no more errors. So there you have it. Make sure you have X11 installed if you plan on converting to MP4 from MKV.
I should also mention that if you do have an MKV file, but don’t need the or have subtitles, then you should be able to use VisualHub or now I think Handbrake converts to MP4 files from MKV. Also, during my testing, I noticed I was able to use MKVTools to convert the MKV files to AVIs without issues. It must be that converting to MP4/H.246 requires some function in the X11 libraries.
| Print article | This entry was posted by jimmyb on April 1, 2010 at 12:20 pm, and is filed under Mac OS X, Television. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |








