While not totally inclusive, I decided to document my current codec guide for playing everything I have in my media library in Windows 7 Media Center using Media Browser. I emphasize “current” because it does change from time-to-time. I won’t get into that, however. There are codec “packs” out there that simplify this process for the majority, but as good as some of them are, or claim to be, I still find they install more than I want and/or take away certain levels of control I want over my playback options. However, for the majority that just want to watch their movies, I’m sure they will be the #1 option for you and there’s nothing wrong with that. I just don’t want to have to rely on a third-party to figure out what went wrong if something breaks. If I know exactly what I have on my system and which components control their respective formats, then I know where to look if something goes wrong. I also know exactly where to go if I want to adjust anything for my own preferences.
First, let me outline a few conditions of this guide:
- I play everything within Media Browser
- I don’t have any music files
- I don’t use any external players
- I don’t use full DVD/BluRay folder rips or ISO
- I don’t have any hardware that can make use of HiDef audio formats (TrueHD, DTS-MA, etc.)
- My HDTVs only go to 1080i
- All titles that have subtitles use external subtitle files (srt, idx/sub and a couple ssa)
- I encode everything, although I have stopped encoding audio. I have a wide array of file formats because of this (I’ve encoded for a looooong time)
That said, many of you could probably get by on even less than what I’ll include here. However, I’ve got so many file formats and codecs in my collection, I pretty much consider that I have just about anything that’s out there in my collection.
What You Need
Next, what you’ll need to get in order to use this guide:
- ffdshow – I prefer the clsid tryout builds. You can get both x64 and x86 versions here.
- Haali Media Splitter – x86 version available here. x64 version is available in the Downloads section.
- VobSub/VSFilter v2.39 – x86 installer is here. The x64 dll is here. If you absolutely, positively do not use subtitles, then you don’t need this. Doesn’t hurt to have though.
- CoreAVC Pro – This is commercial software, but it’s dirt cheap and I would highly recommend it if your HTPC has a CUDA-capable GPU, or if your HTPC is on the low-end and sometimes struggles with h.264 encoded content. Otherwise, it is optional.
- Win7DSFilterTweaker - Windows 7 uses the new Media Foundation for playback, so DirectShow filter merits don’t apply like they used to. This utility will set your preferred codec for you and allow you to disable any Media Foundation codecs that may still “get in the way”.
I’m not going to cover the installation of each of these softwares. You can simply accept the default for each and every one of them. The only exception is the 64-bit version of VSFilter. It is a DLL and requires some work. What you will need to do in this case is extract the VSFilter.dll to a location easy to get to (I suggest C:\Windows\SysWow64 or C:\) open a command prompt with Administrator privileges (this guide is beyond you if you don’t know how), change the current directory to C:\Windows\SysWow64 and perform the following command (assuming vsfilter.dll is in C:\Windows\SysWow64):
You should receive a confirmation window displaying successful registration. If not, I’m sorry.
Now for the fun part – picking and choosing from the thousands of settings that are spread across these applications! Nah, it’s not really that bad. We don’t need the majority of what’s available to us…if you know what you’re doing, it can improve upon your playback at times, but we’re just wanting to get things working…right?
- Haali Media Splitter will be the first to configure, mainly because it’s the easiest. Go to your Programs menu, locate it and click on the Media Splitter Settings shortcut to open. Click the Options tab, expand Compatibility, select AutoLoad VSFilter and change the value selection at the bottom to Yes. This will enable subs for anything Haali is used for. Click OK and you’re done with that.
- ffdshow needs to be configured for both audio and video, so we’ll go over both of those separately:
- Open the Audio Decoder Configuration and go straight to Codecs. I let ffdshow handle all of my audio decoding, so the defaults should be good here. Next, scroll down to Output and pay close attention here. If your receiver supports any of the items listed in Pass-through, then enable it. Mine only supports AC3 and DTS, so that’s all I have checked. Next, ensure 16 bit integer and 24 bit integer are checked. Further down, locate AC3 (S/PDIF encode mode) and place a check in there (if your receiver accepts AC3 via S/PDIF). Finally, locate Connect To: and change the value from any filter to DirectSound and make certain Apply only to S/PDIF output is unchecked. Click Apply and close the audio configuration utility.
- Open the Video Decoder Configuration and go straight to Codecs. If you installed CoreAVC Pro 2.0, you will want to set H.264/AVC to disabled. Everything else should be assumed the default. Scroll further down and ensure that Subtitles (or anything else, unless you know what you’re doing) is not enabled. Click Apply and exit the video configuration utility.
- If you chose to install CoreAVC Pro 2.0, open the CoreAVC Video Decoder Properties utility. You will want to make sure Preferred decoder is unchecked (trust me here). I also like to enable Use Tray Icon so I know that it’s actually being used. Finally, if you’re using a CUDA-capable GPU, put a check in Prefer CUDA acceleration. Click Apply and OK to close.
- Open Win7DSFilterTweaker by double-clicking the executable. It does not have an installer as it’s a stand-alone application. If you have UAC enabled, it will require you to grant it permission to run. There are a lot of settings here and some of it may scare you if you’ve never seen it before. Do exactly as I say and everything will be fine (knock on wood). For the first page, set each of the following as I have outlined below (as pertains to your OS, either x86 or x64):
- H.264 – CoreAVC (if installed), ffdshow otherwise (ffdshow DXVA if you know what you’re doing)
- XVID – ffdshow
- DIVX – ffdsow
- MP4V – ffdshow
- VC-1 – Microsoft (ffdshow DXVA if you know what you’re doing)
- MPEG-2 – Microsoft
- WMV1-3 – Microsoft
- WMVA – Microsoft
- AAC – ffdshow
- LATM AAC – Microsoft
- MP3 – ffdshow
- MP2 – ffdshow
- Click Apply after confirming the above. You will receive a couple of dialog boxes that warn you about changing the MP2 and MP3 decoders…just click Yes. The warnings are why we switched the Output in ffdshow to DirectSound and disabled Apply only to S/PDIF output. If you read that warning, it told you that this was one of the tweaks that would fix it. Well, I’ve encountered DirectSound giving me garbled audio with some formats, so I had to use Connect To: WaveOut instead of DirectSound and that resolved the issue. Try both and if DirectSound works for you, go with it.
- The next page configures the containers that will be disabled for Media Foundation. I select them all, so you should too. Click Apply. x64 users will get two sections…if you only have 64-bit codecs installed, just select them all on the 64-bit side (remember, this is for Media Center/Media Browser only). If you’re on a 64-bit OS and choose not to install 32-bit codecs, Media Foundation will take care of them for you. However, Media Center on a 64-bit platform uses the x64 version of Windows Media Playback, so it’s an unnecessary step on a dedicated HTPC.
- The final page is for additional tweaks. You will want to put a check in the following:
- Disable Mpeg4s Decoder DMO
- Disable Mpeg43 Decoder DMO
- Disable MP3 Decoder DMO
- Why did we disable those in #7? Well, the Mpeg4s and Mpeg43 are older MPEG-4 types that I’d rather ffdshow handle. I found that it won’t unless I completely disable them here. The same goes with MP3…the Microsoft decoder will hijack it when it exists in some containers, so it had to go. Click Apply and Exit…you’re done!
You can now test this out. If you’re on 32-bit Win7, you could easily try it out using Media Player. If on x64, I’d open Media Center in windowed mode and try from there, just so you are absolutely certain you’re using the x64 Media Player and not the 32-bit version.
Take notice of the green CoreAVC tray icon – that signifies CUDA hardware accelerated playback. Not a biggie, except that my screenshot also shows VobSub is actively displaying subtitles. Yes, full hardware accelerated h.264 playback with subtitles is easily handled with my setup. Haali and ffdshow audio tray icons are also there.
As I said in the beginning, this is not an all-inclusive guide to playback. There are too many combinations of codecs, containers, hardware and software to make that a possibility for me to provide you. I could guess, but that only leaves you with a headache if something goes wrong. On the other hand, I do have a fairly common setup, so many of you should be able to follow along with these settings with no problems.
For further tips on codec configuration that may be used in conjunction with this guide, see my post on using ffdshow and AC3Filter here, or using ffdshow DXVA for hardware acceleration with subtitles here.
I thought I may include a couple of other tips that may help in case you would like to get Dolby Digital audio output to your receiver for all audio formats. The guide, as it is, may not do that for you in all cases.
First, you will need the ffdshow Output section Connect To: set to DirectSound, or this won’t work for you. The first thing we want to do is to go to the Resample section in the ffdshow audio configuration utitlity. Place a check in it to enable it and then set the following:
- Resample to 48000 Hz
- Select the Resample if sample rate is radio button and click the button to choose
- lower than 48000
This will take any audio source and make certain that it is always sampled at 48KHz. My receiver will accept others, but I do have a mix in there and if it’s not a supported sample rate, it won’t go out as Dolby Digital. You can also select a different setting under Mode: if you want.
The next thing we’ll do is go to the Mixer section – place a check in there to enable it. Now, go to Output speakers configuration: and select same as input from the dropdown. Ultimately, this will take all audio formats, aside from those going directly via S/PDIF, make certain they are sample at 48KHz, transcoded to AC3 audio at 640Kbps and the output via S/PDIF to your receiver.
You can also play around with the Center, Surround and LFE sliders if things are a little off in your outputs. I like to increase the Center and Surround to taste. You can also change the Output speakers configuration, but don’t expect Dolby Digital output if you do. It can be useful for 6.1, 7.1, etc. configurations, however. It will go out PCM, but does sound really nice if you have one of those speaker configurations. I do it in my living room :)