DirectShow Filters for Windows Vista x64 and 64bit Codecs
updated 9 years ago
A new version of GraphStudio (an open-source graphedit replacement) was released that supports x64. This is big news because previously, there was not a single filter management program on the internet that would work with 64 bit codecs. Therefore, it was near impossible to understand why a media file would not playback in the 64 bit version of Vista Media Center.
Background on 64bit and 32bit Codecs
When codecs are compiled for either 64bit or 32bit they are only compatible with media players of the same type. You cannot mix and match. This is especially a problem on Vista x64 because Vista Media Center runs as a native 64bit application. However, Windows Media Player on 64bit systems defaults to 32bit even though there is a 64bit version installed side by side (the start menu just points to 32bit version).
It's Best to Choose a Side
Therefore, if you need Vista Media Center, stick to only 64bit codecs. Do not install any 32bit codecs and instead of using the default 32bit WMP, use the 64bit version found at "C:\Program Files\Windows Media Player\wmplayer.exe" or better yet use Media Player Classic - Home Cinema x64 edition. If you want to use a 32bit or x86 media player and still utilize VMC, then you'll have to install two versions of each codec you want to use.
To make things worse, it is possible for 32 bit filters to conflict with 64 bit filters.
My (wild) guess would be that the graphbuilder is instructed by templates from 32-bit filters (either Haali or Gabest source/demux filters) to use some 32-bit source/demux instead of "File Source (Async.)" that for obvious reasons won't work - RadScorpian
His guess was confirmed.
Microsoft was stupid enough to make this keys shared between 32/64bit. This means that playback will break in many applications if you have got different source filters installed for 32/64 bit. Media Player Classic is the only DS player I know of that can cope with this issue. - clsid
This also explains why even with all the internal filters turned off, that MPC-HC x64 was still able to play video's that other 64bit players could not. Since I installed some 32bit filters first, it created a registry key pointing to the 32bit filter rather than the 64bit filter. See Troubleshooting for more information on how I fixed it.
I like to play MKV backups I keep on the hard drive so I use the following filter's:
- MPC Video Decoder x64 ( MPCVideoDec.ax) for DXVA hardware accelerated AVC and VC1 decoding
- Matroska Splitter x64 ( MatroskaSplitter.ax) for playback of MKV and MKA files
- ffdshow x64 ( ffdshow.ax) for playback of various video types and multichannel audio such as FLAC, DTS Master Audio, AC3 Dolby True-HD
ffdshow comes with an installer. When you install ffdshow make sure you uncheck the codecs that you want the MPC Video Decoder to decode with hardware acceleration (at least H.264 / AVC and VC-1).
Note: If you've already installed you can uncheck the codecs in the property page.
To install MPCVideoDec.ax and MatroskaSplitter.ax files you'll need to do this manually. Put these files somewhere permanent and then register them using the following command lines:
To test you've installed the 64bit filters correctly, you can just try and play a file in the 64bit version of WMP. However, WMP gives you little if any indication of what went wrong if the video does not play back correctly (same with VMC).
A better method to check your codecs are installed correctly is with the afore mentioned GraphStudio x64.
Troubleshooting. If you see a graph built, then you should make sure it is using the proper filters. For example, for my MKV file I want it to use the MPC - Video Decoder for the x264 video and the ffdshow Audio Decoder for the DTS Master audio.
If the wrong filter shows up then you may need to alter the merit of the filters or toggle the type of filters that each codec will decode. To toggle merit, see Troubleshooting.
Setup VMC and WMP to See MKV File Types
You may have noticed that VMC and WMP does not recognize MKV files as video files. You will need to register the MKV file type in the registry for these Matroska files to show up. Be sure you backup your registry before proceeding. Also, this step must be done with Admin rights.
Download this file: RegisterMatroska.reg
Or copy and paste the following into a text file called "RegisterMatroska.reg"
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\.mkv] "PerceivedType"="video" "Content Type"="video/x-matroska" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.mkv] "Runtime"=dword:00000007 "Permissions"=dword:0000000f "UserApprovedOwning"="yes"
Double-click the registry file to alter your registry.
"Cannot render file" - This may occur if you don't have the necessary codecs or there are conflicts with existing 32bit codecs. If you previously installed 32 bit codec you may need to delete a registry key to get the 64bit codec to work.
For example, I could not play an MKV file until I opened the registry "regedit.exe" and deleted the following key:
Wrong Filter in Graph - This may occur if there are multiple filters that are capable of decoding the media format. This is usually a problem if you prefer one filter over the other because one may support hardware acceleration and the other does not.
In some cases this isn't enough to get the filter to load. You may also need to alter the merits of the codecs involved. Merit values define the order in which the Filter Graph Manager tries to add filters during graph building. You can change merit values in GraphStudio.
GraphStudio is currently the only application that can manage 64bit codecs. All other codec managers only show 32bit codecs.
From GraphStudio open the filters and choose the filter you'd like to alter the merit of. For more information about setting a merit value, see Understanding DirectShow Merits.