WMV streaming issue

Topics: Windows 8 Xaml
Jun 20, 2012 at 1:30 PM
Edited Jun 20, 2012 at 1:43 PM

I'm currently trying to develop a PoC of our Silverlight player on Windows 8. So I'm using the XAML/C# stack.

I can't get to play a simple DRM-free WMV using a MediaPlayer element when used over a mms:// stream. The error is:

"MF_MEDIA_ENGINE_ERR_DECODE : HRESULT - 0xC00D36D0"

 

The same file plays fine with :

 - MediaPlayer when embedded as a resource in the application

 - MediaPlayer with same file over http://

 - native MediaElement

 - Windows Media Player

 - Silverlight version (SMF 2.6 currently)

 

I'm using:

 <mmppf:MediaPlayer x:Name="MediaPlayer" Source="mms://***.****.net/.../test2.wmv">

Do I need to setup a plugin or something? Is mms: protocol not supported?

Coordinator
Jun 20, 2012 at 10:34 PM

Here are a couple threads about the mss protocol from the Win8 Metro forums:

http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/d6a45d31-f8f8-48db-a2e3-3bc09548ba92

"By default Metro apps don't support the mms protocol so apps have to opt in by registering the source as local via a scheme handler."

http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/cf24d556-5254-47a1-bfa0-8fe3ed572dde

Note: MMPPF uses the MediaElement under the hood and therefore has the same limitations.

Tim

Jun 21, 2012 at 2:26 PM

Thanks for the answer Tim.

I'm quite sure my video played fine with the MediaElement though, so I will investigate what's really served.

Sep 18, 2012 at 5:09 PM

Hi Julienv42,

I have the exact same problem as you. Everything works fine in an MediaElement, but not using MMPPF MeidaPlayer.

Did you figure this out, and if so, how did you solve it?

-TE

Coordinator
Sep 18, 2012 at 10:17 PM

torjue, do you have a url you could share with me that works in MediaElement but not in MMPPF?

Thanks, Tim

Sep 18, 2012 at 11:04 PM

"In-house" streams behind my firewall, but also test streams I've found online, including this: mms://media.sonoma.edu/pinball.wmv

I've isolated the code into a test project. This is more or less all of it:

XAML:

<MediaElement x:Name="video1" />
<mmppf:MediaPlayer x:Name="video2" />

C#:

var source = new Uri("mms://media.sonoma.edu/pinball.wmv");

video1.MediaFailed += delegate(object sender, ExceptionRoutedEventArgs args)
    {
        Debug.WriteLine(args.ErrorMessage);
    };
video2.MediaFailed += delegate(object sender, ExceptionRoutedEventArgs args)
    {
        Debug.WriteLine(args.ErrorMessage);
    };

video1.Source = source;
video2.Source = source;

video1.Play();
video2.Play();

Coordinator
Sep 18, 2012 at 11:30 PM

Thanks torjue, I discovered that the stream you cited fails because inside MMPPF we always set the internal MediaElement.AutoPlay = false. We do this to support deferrable events necessary for advertising such as MediaStarting. I'm not sure if the lack of AutoPlay = false support in Win8 with mss is intentional or not but will follow up and see if I can find a solution going forward.

Sep 19, 2012 at 9:28 AM

Thanks. 

That seems to be the problem. Unfortunately, setting the MediaElement.AutoPlay = true causes quite a lot of other problems.

Is there any nightly builds available anywhere, so I can follow the progress on this? If not, I guess this won't be fixed until the next preview?

Let me know how it goes :)

Coordinator
Sep 19, 2012 at 5:27 PM

Here's a thread I posted on MSDN that might want to follow. At the moment it looks like it might be a Win8 bug.



Nov 17, 2012 at 4:46 PM
Edited Nov 17, 2012 at 4:47 PM

I have encountered a problem with this video:
http://wm.microsoft.com/ms/design/toolbox/windows-phone-7/02/01_blend_overview_tools.wmv
 

It runs fine in the browser but not with mmppf. :-(

Here is the code I am using.

XAML:

<mmppf:MediaPlayer x:Name="myMedia" Width="853" Height="480" />

C#:

string videoPath = "http://wm.microsoft.com/ms/design/toolbox/windows-phone-7/02/01_blend_overview_tools.wmv";
Uri videoSource = new Uri(videoPath);
myMedia.Source = videoSource;

Can someone help me?

Coordinator
Feb 19, 2013 at 4:26 PM
To workaround this issue, you can set MediaPlayer.AllowMediaStartingDeferrals = false

Warning: doing this will cause pre-roll advertisements to not work correctly and should only be used if your app does not use pre-rolls.
Sep 3, 2014 at 7:16 AM
timgreenfield wrote:
To workaround this issue, you can set MediaPlayer.AllowMediaStartingDeferrals = false

Warning: doing this will cause pre-roll advertisements to not work correctly and should only be used if your app does not use pre-rolls.
HI,
I used the above for playing WMV streamng files.
One video is played till the END iam getting error "MF_MEDIA_ENGINE_ERR_DECODE : HRESULT - 0xC00D36D0".is there any new solution