# Playing Video Files in Windows Forms with MediaPlayer

With the following encoding, only the audio part of the video is played, but the video itself is not shown:

mediaPlayer = new Windows.Media.Playback.MediaPlayer()
{
AutoPlay = true,
Source = Windows.Media.Core.MediaSource.CreateFromUri(new Uri(DialogFileName)),
};


Who knows advice? Thanks for that!

• Windows Forms is not a common game development technology, so you may find better answers to this on StackOverflow. Dec 17 '21 at 13:10
• What type of file are you trying to play? Are you able to play the file manually? Dec 17 '21 at 15:14