Mpg video pixelated when it's in WPF application (OS:Windows 7 x 64 bit)

Locked Mpg video pixelated when it's in WPF application (OS:Windows 7 x 64 bit)

  • Monday, June 04, 2012 1:18 AM
     
     

    I have written an WPF application to play mpg video long time ago. The video (in mpg format) can be played smoothly (without pixelization) in the OS - Windows XP. After I changed to new laptop with windows 7, x64 bit.  The video (in mpg format) become pixelated when it's played. When I used Windows Media player to play the video, there's no pixelization. Is there any wrong on the compatiblity between Windows 7 and WPF (VS 2010 Premium)?


    Jason

All Replies

  • Tuesday, June 05, 2012 3:41 AM
     
      Has Code

    These are Xaml codes I used:

    <Window x:Class="MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="700" Width="1200">
        <Grid>
            <WrapPanel Height="46" HorizontalAlignment="Left" Margin="155,536,0,0" Name="WrapPanel1" VerticalAlignment="Top" Width="318">
                <Button Content="Play" Height="54" Name="Button1" Width="88" FontSize="16" />
                <Button Content="Stop" Height="54" Name="Button2" Width="76" FontSize="16" />
            </WrapPanel>
            <Canvas Height="418" HorizontalAlignment="Left" Margin="167,76,0,0" Name="Canvas1" VerticalAlignment="Top" Width="770">
                <MediaElement Canvas.Left="156" Canvas.Top="56" Height="288" Name="MediaElement1" Width="470" Source="D:\SonyCameraFiles\MOV05236.mpg" LoadedBehavior="Manual" />
            </Canvas>
        </Grid>
    </Window>

    These are .net code I used:

    Class MainWindow 
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click
            MediaElement1.Play()
        End Sub
    End Class


    Jason

  • Tuesday, June 05, 2012 3:49 AM
     
     

    I wanted to share some photos on video quality played in WPF and played through Windows Media Player,  there's always error prompt out -  'response.Size' is null or not an object after I selected the photo to add.


    Jason

  • Wednesday, June 06, 2012 11:56 AM
     
     
    any one can help?

    Jason

  • Thursday, August 02, 2012 8:49 AM
     
     
    After I downloaded K-Lite codec for video, it can solve the issues where all the 4 videos which played simultaneously can be played without pixelated issue at initially. after I closed the application, and run it again to play 4 videos simulataneously, the same problem come back again. Any one can help?

    Jason