Tuesday, January 19, 2010

Windows 7: Media Player 12 audio lag / lip sync problems

Windows Media Player12 (WMP12) now includes it's own codecs for handling many media formats e.g. H264 (high def) and Xvid/DivX through the new Media Foundation Framework.  This means WMP will use its own codecs in place of any 3rd party ones you had up and running happily under Vista, such as ffdshow Tryouts the excellent 'one stop shop' solutions for a/v decoding http://ffdshow-tryout.sourceforge.net/.  Changing codec merit etc is fruitless.

I experienced lip sync / audio lag issues when playing AVI containers with MP3 encoded audio.  In order to resolve this issue I wanted to use the trusted ffdshow Direct Show filter to decode the MP3.  Using the 'Preferred Filter Tweaker', the various decoders can be set to either 'Microsoft' or your filter of choice.  The most important step for me is disabling Media Foundation for the desired file extension (.avi) to instruct WMP to use (ffdshow) Direct Show Filters instead.  Without this step, changing the decoder made no difference to playback.

http://www.codecguide.com/windows7_preferred_filter_tweaker.htm

Another  vital step is to edit the options under ffdshow audio, in the 'output' section select 'Connect to' -> 'Direct Show' and unselect SPDIF, otherwise the audio will be an inaudible screech. There is a notice to this effect when selecting ffdshow as the default encoder for MP3.

Using an alternative decoder fixed the audio sync problems.  To give the WMP12 built-in decoders a chance I uninstalled ffdshow completely leaving all the Microsoft filters selected as default, but disabled Media Foundation in Preferred Filter Tweaker, and this alone also fixed the audio sync problems with MP3 audio in AVIs.  To be sure, I re-enabled Media Foundation and sure enough the audio sync problems returned.  With it off the audio is sync'd nicely and all my media formats are playing well in WMP12.  I just can't give a satisfactory answer as to why simply disabling MF resolves the sync issue when I presume the same filters are still being used.

No comments:

Post a Comment