How-To Configure Windows 7 To Play Matroska (.mkv) Files

UPDATE: Now that the Release Candidate (build 7100) of Windows 7 is out, only the Haali Media Splitter or the DivX Labs MKV Splitter are needed to get Matroska files playing in Media Center and Windows Media Player. However, neither splitter supports subtitles yet, so if you need subtitles, check out my new post about how to get FFDShow working in Windows 7 RC.

Additional Update: Things are now much easier.

As most if you already know, Windows 7 supports most modern video and audio codecs and container formats out of the box, as illustrated by Long Zheng’s chart in his blog post about the new codecs. However, one of the most popular containers, Matroska (.mkv, .mka), isn’t supported. We can get around this limitation with a few open source projects freely available on the web.

In an ideal world, we would just install a Matroksa stream splitter and the files would play using the new built-in codecs, however none of the splitters talk to Media Foundation and all of Microsoft’s new codecs are Media Foundation instead of DirectShow. So we also need to install some DirectShow codecs as well.

On x86, the solution is fairly simple, install Haali Media Splitter and FFDShow-tryouts. This solution won’t allow hardware accelerated video playback but at least you’ll be able to watch your Matroska video library. x86 also has the advantage of supporting subtitles, something that is lacking from the x64 solution. The current FFDShow-tryouts release is “Beta 6”, however I haven’t personally tried this build so your mileage may vary.

Once you get those two packages installed, double-click on a Matroska file and tell the dialog box you want to always open the file with Windows Media Player. WMP12 will say it might not be able to play the file, say “yes I want to play the this type of file” and check the box to tell it to stop asking you this question. At this point, the file should start playing in WMP12 and you should see the FFDShow and Haali icons show up in the System Tray. Thumbnails should also start being generated from Windows Explorer and the files should start showing up in Media Center’s “video library”, assuming your Matroska files are in the list of folders the video library is watching.

I realize that there is a registry file that activates thumbnails and associates WMP12 with .mkv files, but this solution seems to work just as well with the advantage of no mucking about with .reg files. If you want to try the registry file solution, visit this blog entry and download the MKV/MKA x86 registry patch.

On x64, things are a bit more complicated since there’s no 64-bit version of Haali Media Splitter.

The current author of Media Player Classic – Home Cinema has released the codec parts of the MPC-HC project as stand-alone filters. Download the x64 MatroskaSplitter package and extract the MatroskaSplitter.ax file to something like “C:\Codecs\x64” or wherever you store your favorite codecs. Get a Command Prompt up with Administrator privileges (Click the Start Orb, click on “Search programs and files” and then type cmd, “cmd.exe” will show up in the Program list, right click on it and pick “Run as administrator”). In the Command Prompt window, change directory to “C:\Codecs\x64”:

cd c:\Codecs\x64

or to wherever you extracted the MatroskaSplitter.ax file. Next, type:

C:\Windows\System32\regsvr32 MatroskaSplitter.ax

into the Command Prompt and that should register the MPC-HC Matroska Splitter into 64-bit codec space.

Finally, download an x64 build of FFDShow-tryouts and install it. The x64 builds are still considered “experimental” so you’ll have to click on “64-bit builds (experimental)” to expand the x64 downloads area. Alternatively, you could download the x64 MPCVideoDec package and register the codec using the regsvr32 method that we used to get the Matroska Splitter installed, but FFDShow has more features and supports AC3/DTS and quite a few other codecs without having to manually register a bunch of .ax files. If you have the expertise and are willing to take the risk, the MPC-HC codec does apparently support hardware accelerated video decoding. However, as far as I know, the x64 Matroska Splitter doesn’t support subtitles so neither package will have working subtitles.

At this point, we should pause and do a bit of “Fair Warning”. I don’t actually have the x64 version of Windows 7 installed. There a few reasons why I haven’t taken the x64 plunge yet but mostly it’s because of the lack of an x64 version of the Haali Media Splitter and I need the subtitle support that Haali offers.

Now, having said that, we’re at the point where we need to get Windows x64 to handle the .mkv file extension. Like Vista x64, WMP will run in 32-bit mode unless you specifically tell it to run in 64-bit mode, so you can’t just double click on a .mkv file like we did in the x86 solution above. We do have a few options though:

  1. Convert Windows to run WMP in 64-bit mode as illustrated here by typing:

    %windir%\system32\unregmp2.exe /SwapTo:64

    into a Command Prompt running as Administrator. Once you have WMP running in 64-bit mode, double clicking on a .mkv file and following the directions from the x86 directions above should get .mkv files showing up in Media Center.
  2. Visit this blog entry and download the MKV/MKA x64 registry patch.

Again, I don’t have 64-bit Windows 7 installed so I haven’t tested any of this stuff. I did get it working on Vista x64 when I had it running a few years ago so I believe this stuff should work in Windows 7 x64. However, don’t hold me responsible if this completely hoses up your system! :)

Now that you have Matroska file working in your installation of x64 or x86 Windows 7, why not check out Media Browser? Media Browser was formally known as Video Browser, but we’ve added so much new stuff it seemed like a name change was appropriate. Plus we’re planning on adding support for media types other than video (such as music and podcasts). However, right now, Media Browser will help you browse all of your archives Television shows and Movies with automatically updating metadata!

Comments

# Entertainment 2.0 » Blog Archive » Play MKV Files in Windows 7 said:

Pingback from  Entertainment 2.0  » Blog Archive   » Play MKV Files in Windows 7

Friday, January 30, 2009 3:55 PM
# Ogre's Blog said:

It seems like all the buzz in the Media Center community lately is about DivX Labs latest project: A

Saturday, May 02, 2009 1:39 AM
# Ogre's Blog said:

This is a follow-up post to my earlier post about how-to get Matroska files to play on Windows 7 . Now

Thursday, January 21, 2010 9:36 PM