How-To Get Matroska (.mkv) Files to Play in Windows 7 RC (Build 7100) using FFDShow-tryouts or MPCVideoDec
It seems like all the buzz in the Media Center community lately is about DivX Labs latest project: A “Technology Preview” of Matroska support in Windows 7. I’ve tried out their solution and it seems to work, however, I need to have subtitle support and alternative audio stream support (for reasons that aren’t worth going into here). Keep in mind that this is definitely a work in progress but I do firmly believe that when finished this will end up being the ultimate solution we’ve been waiting for to get decent Matroska support into Windows 7. I’m looking forward to working with them to get subtitle changing and audio track changing into Media Browser as well.
If you don’t care about subtitles or alternative audio tracks, stick with the DivX Labs solution, but, if you’re like me and you need to stick with the Haali Media Splitter and either FFDShow-tryouts or the MPC-HomeCinema codec (MPCVideoDec), another solution already exists and is available as a post on The Green Button.
At first glance, this solution seems fairly scary since you’re going to end up setting permissions on registry entries and then editing weird looking hex values. And it is true that if you screw something up, the simplest solution might end up being to reload your copy of Windows 7, so fair warning.
To make this process a bit easier, I’ve packaged up a few files and made them available for download here: http://chaocracy.com/media/p/404.aspx (The 404 is just a coincidence! :)
After you’ve download the file, unzip the contents into a folder, preferably with no spaces in the path. Something like:
c:\Tools\Windows7CodecChanger
Next you need to run an Administrative Command Prompt or Administrative PowerShell (PowerShell comes with Windows 7). From the “Search programs and files” area in the Start menu just type “cmd” or “powershell” and the appropriate command shell will appear under the Programs heading. Right click on “cmd.exe” or “Windows PowerShell” and select “Run as administrator”. You’ll get a UAC prompt that you need to confirm.
Once the shell you’ve chosen has loaded, change directory to the location you extracted the Zip archive to above by typing:
cd c:\Tools\Windows7CodecChanger
The Zip package contains a simple script that I wrote that automates the process of taking ownership of the registry entries and giving them full access to the “Administrators” group as illustrated in the post on The Green Button. Virtually all of the work is done by an open source tool I found called SetACL which is included in the Zip package. (Gotta love Open Source!) To run the script, just type the following into the command shell:
FixRegistryPermissions.cmd
Assuming everything worked, the SetACL command should give you a nice positive message. If it didn’t work, there’s not really much I can do to help so read the instructions again or if you’re the technical sort of person, just make the changes manually using the post mentioned above from The Green Button.
Included in the Zip package are a few files to help further automate the process of telling DirectShow which codecs to use for Matroska:
SetToFFDShow.reg – set DirectShow to use FFDShow
SetToMPCVideoDec.reg – set DirectShow to use MPCVideoDec
SetToMicrosoftDTV-DVDVideoDecoder.reg – set DirectShow back to Microsoft DTV-DVD Video Decoder
v7-WMP11-MKV-MKA.reg – tell the Windows to recognize .mkv and .mka files as video and audio files
Double click on one of the first two files to make changes to the registry to use FFDShow or MPCVideoDec.
Double click on the third one to switch back to Microsoft’s codec.
Double click on the last file to make Media Center recognize Matroska files as video and audio files. This file has been floating around in the Media Center community for a while, I did not write this file. Note that you’ll still have to double click on a Matroska and tell Windows to open the file with Windows Media Player at least once but after that it will open in WMP with no hassle.
Obviously you still need to install either FFDShow or register the MPCVideoDec codec and the Haali Media Splitter by following these directions: http://chaocracy.com/blogs/ogre/archive/2009/01/30/how-to-configure-windows-7-to-play-matroska-mkv-files.aspx
Also keep in mind that you don’t actually need FFDShow or MPCVideoDec just to play Matroska files in Windows 7 as the Microsoft DTV-DVD Video Decoder will work with the Haali Media Splitter but you do need FFDShow to get subtitles (MPCVideoDec still doesn’t support subtitles).
Thanks to mr_greedy from The Green Button for figuring out the registry entries to change.