Windows Media Foundation and Windows 7

Windows 7 Logo Windows 7 introduces some additional functionality to a feature that was added in Windows Vista, Windows Media Foundation. The goal of the Windows Media Foundation is to ease control of media playback for developers. The idea is to remove the need for individual codecs and instead rely on a single Windows package for media playback, much like DirectX does for game platforms.

In Windows 7, as noted on Microsoft MSDN, there have been some additional changes made to the Windows Media Foundation framework.

What's New in Windows 7

Microsoft Media Foundation was introduced in Windows Vista as the replacement for DirectShow. Of course, DirectShow is still supported in Windows 7, but developers are encouraged to use Media Foundation in their new digital media applications.

The improvements to Media Foundation can be summarized as follows:

  • Better format support, including MPEG-4
  • Support for capture devices and hardware codecs
  • A simplified programming model
  • Improvements to the platform

We are all fairly well aware that Windows 7 includes native support for certain formats, such as H.264, and it does this through the use of Windows Media Foundation. Media Center and Windows Media Player have both been updated to use this new framework in Windows 7. The benefit is added support for a number of codecs out of the box.

There is, however, a downside to this new implementation. The protected pipeline used in this new framework doesn’t allow outside access to user installed codecs for native formats by default. For instance, if you wanted to use FFDShow to decode avi files, which are natively supported by WMF. This means much like the (often indefinite) wait for x64 codecs and splitters users will once again be put to the sidelines to wait for updated decoders that use WMF.

Media Foundation Process Chart

Current work-arounds for this situation have led users to renaming system files and other chicanery in order to get their favorite codecs working through Media Center. In more recent versions of Windows 7’s beta, however, the ability to accomplish this hack has been crippled. The consensus seems to be that as of beta 7057, the rename hack no longer works.

It seems that once again users may be forced to wait on new solutions to the codec problem that have already been hard suffered for Windows Vista Media Center users. It seems we may once again be at the whim of those gracious programs who take it upon themselves to better Microsoft’s meager implementations and give us a little more control of our media.

Expect updates on Windows Media Foundation and Windows 7 Media Center in the near future. Keep up to date on the situation by subscribing to the Hack7MC RSS Feed or by following on Twitter.

Control SPDIF Volume with AC3Filter

AC3Filter Logo This is the second part of a guide on using AC3Filter in Media Center to control SPDIF volume. A common problem among Media Center users with an external digital receiver using SPDIF for output. AC3Filter can solve this problem by controlling the gain on the SPDIF stream before sending it through to the receiver. Now that we have AC3Filter working in Media Center by following this guide, lets get AC3Filter settings ready to control the volume level.

Access AC3Filter’s configuration from the start menu. The first setting to change will be the number of speakers in your setup. Using the drop down box select the correct speaker setup for your system. Then enable SPDIF output to enable AC3Filter to output a digital stream via SPDIF.

Main AC3Filter Settings

Next go to the “Mixer” tab and in the options box make sure that Auto Matrix is selected. Expand Stereo will enable stereo streams to be output as full surround. Normalize Matrix and Voice Control will balance volume output among all the channels and during large volume changes in the stream. You can also control the Bass Output Cutoff from this panel.

AC3Filter Mixer Settings

Finally, we have to allow the AC3Filter to output a modified SPDIF stream. To do this go to the SPDIF tab and uncheck all SPDIF pass-through options. Pass-through tells AC3Filter to send an unaltered stream directly to the receiver, turning these off allows AC3Filter to alter the gain which will simulate volume changing. If this doesn't work you can try to send a PCM signal through your soundcard or disabling the AC3 Encoder, though in many situations this can break DD and DTS encoding depending on your hardware. Differences in sound card hardware and recievers will alter the viability of this hack.

AC3Filter SPDIF Settings

That should be all there is to enabling your Media Center to control the volume of SPDIF output using AC3Filter! If you experience any problems make sure that AC3Filter is the preferred codec using this GraphStudio guide. More options on enabling AC3Filter to be the preferred codec can be found under the System tab in the AC3Filter configuration.

Troubles, successes, or experiences with AC3Filter you want to share? Leave note in the comments below!

Using AC3Filter in Media Center

AC3Filter Logo One of the main problems encountered by those who use SPDIF output on their Media Center is the inability to control volume through the PC. The most common solution is to control the volume through the receiver but this means using a different remote (or worse getting up to turn the knob!). A solution to this problem is to use AC3Filter to control the gain of the SPDIF output. This will allow you to artificially change the volume of the digital output through Windows.

The first step to using AC3Filter to control SPDIF volume is to download and install the latest version of AC3Filter from ac3filter.net. Unfortunately, AC3Filter doesn’t currently support x64 operating systems and only comes in an x86 package. Next we need to follow the same steps as for installing FFDShow to work with Media Center and Media Player.

You will need to have the “Take Ownership” registry hack we’ve used before in changing our Media Center theme. You can download the registry file to enable this menu here. Once you have the .reg file downloaded double-click to install the registry fix and permit it to change the registry when prompted.

To enable AC3Filter in Media Center/Player for music, open Windows Explorer and navigate to “C:\Windows\system32\” and locate the file name “MP3DMOD.DLL”. Right-click to bring up the menu and choose “Take Ownership” then rename the file “MP3DMOD.DLL.bak”.  This will disable the native filter and can be reversed by changing the file name back at any time.

mpd3mod.dll

To enable AC3Filter for live television and other formats using the MPEG2 codec inside of Media Center there is also a registry entry that needs to be changed. First we need to find the CLSID for AC3Filter. To do that download Radlight’s Filter Manager right here. Extract the files to any location and run the exe file inside. Inside this program expand DirectShow Filters and scroll down to AC3FIlter. Right click the entry and select “Copy CLSID to Clipboard”.

AC3Filter in Filter Manager

Next, open regedit in Administrator mode: using the start menu type regedit then press ctrl-shift-enter. Then navigate to “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\ CurrentVersion\MediaCenter\Decoder”. Inside there should be two strings, right-click “PreferredMPEG2AudioDecoderCLSID” and choose “Modify..”. Then enter the CLSID that you’ve copied from FilterManager in the box and press ok

Media Center will need to be restarted before the changes will take effect but that should set your music, live television and most anything in Media Center to use AC3Filter instead of the native codecs included in Windows 7. The stability of this hack has not been tested outside of systems using purely Media Center as the user interface and may carry unintended consequences, perform at your own risk.

If you have any trouble (or success!)  getting this hack to work be sure to post a comment below!

Hack7MC Has Moved!

Hack7MC has left Blogspot for a new home. Following the original address @ http://www.hack7mc.com will take you to the new home page.