Video not playing

Jun 22, 2012 at 4:44 PM

On one machine, I find that the WPF Media Kit is not playing video.  I have some MP4 files that I'm playing through a WPF app, and the following all work fine:

  • On my dev machine, I can play the files through WMP, MediaElement and MediaUriElement
  • On the production machine, I can play the files only through WMP and MediaElement - MediaUriElement does not work here

Even if I use the sample app in the v1.5 download, video does not play.  There is no crash and I can't see anything relevant in the windows event log, but the video does not play on this machine.

Now I'm pretty sure it's something to do with the machine configuration (since the MediaUriElement works fine on my dev machine) but I'm not sure how to go about debugging this.  Please can you tell me what I should be looking for to find out what is missing?

TIA,
John 

Jun 25, 2012 at 10:45 AM

I've managed to capture an exception on the machine which won't play:

Unable to play video: Could not render any streams from the source Uri
System.Exception: Could not render any streams from the source Uri
   at WPFMediaKit.DirectShow.MediaPlayers.MediaUriPlayer.OpenSource()
   at WPFMediaKit.DirectShow.MediaPlayers.MediaUriPlayer.OpenSource()

Does this mean anything to anyone?

TIA,
John 

Jun 27, 2012 at 10:37 AM
Edited Jun 27, 2012 at 10:38 AM

I have similar problem. Time to time my video does not appear but it looks like it is running. If it does not appear, there is no black background or anything else, it looks like that control would be hidden.

Can anyone help me?

Jul 9, 2012 at 3:29 PM

Hi John,

Make sure you are using 32-bit color on your production machine. I've seen the same scenario you are describing on machines running with 16-bit color for the display. The D3DImage class that is used as the basis for displaying the video has major known performance issues with anything that is not 32-bit color.

Jul 30, 2014 at 9:50 AM
Edited Jul 30, 2014 at 9:52 AM
"Time to time my video does not appear but it looks like it is running. If it does not appear, there is no black background or anything else, it looks like that control would be hidden."

Did anyone solve this issue?
The media is playing, I can hear the audio, but the video is black screen.
Jul 30, 2014 at 12:18 PM
I think I've solved it by tripling the source assignment when changing source:

mediaPlayer.Source = new Uri(item.Source);
mediaPlayer.Source = new Uri(item.Source);
mediaPlayer.Source = new Uri(item.Source);