Question

I have noticed (on my Vista 64bit machine) that a video being shown in a WPF MediaElement has different colors than when being played in Windows Media Player. Inside the MediaElement, the video has a slightly desaturated look with lower contrast.

The videos I have tried so far are WMV videos that were produced by different people with different tools, so I'd rule out problems with the video material. All "Video Settings" sliders in Windows Media Player (Hue, Saturation, Brightness, Contrast) are on their default values.

That's why at first I suspected an issue in my software which is making extensive use of animated opacity and content being placed over the video.

But I have been able to reproduce the behavior with a simple test program where the XAML looks like this:

<Window x:Class="MediaElementTest.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="300" Width="300">

    <MediaElement Source="D:\Test\Video.wmv" />
</Window>

Am I doing something wrong? Is there a workaround?

Was it helpful?

Solution

Since I'm pretty sure the MediaElement will use the VMR9 on XP and the EVR on Vista, you might be seeing the behavior explained here

I'm guessing Windows Media Player uses either the VMR7 or default Video Renderer so it doesn't have that behavior. OR Microsoft has compensated in some way.

OTHER TIPS

If you video card supports it, there are sometimes some software options to fix this.

If you have an NVidia card, goto the NVidia control panel. Click on "Video" in the options tree. Select the monitor and click the "With NVidia Settings" radio button. In the advanced tab, select "Dynamic Range 0-255".

Thats it!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top