mcosmin avatar image
0 Votes"
mcosmin asked mcosmin commented

IBasicVideoEffect and MediaPlaybackList

I have a MediaPlaybackList and a IBasicVideoEffect.

I add the effect onto a MediaPlayer object before setting the MediaPlaybackList as source (due to obvious reasons).

Now the catch is, the MediaPlaybackList sometimes skips PlaybackItems at random, sometimes as many as 4 in a row. It simply reports "Error" as the reason for changing the item. Often times I can view as many as 8-9 videos gaplessly, and then the MediaPlaybackList simply decides to skip a bunch, and then go on and play a few videos like nothing happened.

This seems to be related to the IBasicVideoEffect, but I don't understand how.

Are there any special considerations when doing this combination? Is the IBasicVideoEffect not designed to work with MediaPlaybackList? Is there a way to track down the "Error" reported by MediaPlaybackList as reason for changing the item?

Additional error info seems to be

A valid type has not been set for this stream or a stream that it depends on. (Exception from HRESULT: 0xC00D6D60)

More info: I am adding media playback items into the list dynamically. This seems to have an impact, as adding a new list will call Close/SetEncodingProperties again.

repo sample

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

jadailey-MSFT avatar image
0 Votes"
jadailey-MSFT answered mcosmin commented

The problem is likely due to a media type mismatch between the video effect and the next file in the list. I'm going to wager that when files get skipped they have a different format, resolution, etc. than the first file in the list that played correctly. This is probably because the video effect rigidly sets it's media type and then isn't responding to the dynamic format change, rejecting the media type of the new file in the list.

I would recommend debugging the video effect and making sure that the plug-in is responding to media type changes properly.

If you think I'm missing something let me know.

· 10
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

The issue happens randomly. I cannot find any weird issues with the effect. I only set the subtype of the encoding profile to ARBG32, as instructed here, to catch all types of video files

It even reproduces with a read-only filter which just passes the video frames through unaltered, just to rule out any weird bugs in my implementation.

Please help. This is a breaking issue for us.

The files are all the same encoding. This has something to do with the media playback list, cause individually the files play fine.

OP is stuck in a login loop, so I made a new account.

0 Votes 0 ·

So, any updates? It's been over 6 months. Perhaps we should give up on UWP as a viable media platform?

0 Votes 0 ·

Haven't been getting email notifications on my answered questions.

Remember if the consumer of your effect can't encode video using the properties you specify, it will call Close on your effect and the video pipeline will be reset. The argument to the Close method is a MediaEffectClosedReason that lets you know whether the effect was closed normally, if an error occurred, or if the effect does not support the required encoding format. Do you see Close being called on your effect? Not all MF sources and not all sinks can support ARGB32. The NV12 format is the one that is most widely supported as it is a requirement by the OS.

If you still need help you can get in touch with me directly by opening a ticket by going to: Click on "contact us" and then select "Windows 10 UWP app development".


0 Votes 0 ·

The close reason is always "done". Even if the video stream is always nv12, it still gives the errors randomly. I will use the contact link you sent when I have more time for this.


0 Votes 0 ·
Show more comments