Media Framework Video Works in Editor But Not In Build

I created a MediaPlayer asset from a .wmv file that exists in my Content/Movies folder. I have this set to AutoPlay = true, AutoPlayRate = 1.0, and Looping = true. The source is a relative file path, and the StreamMode is fromUrl.

I then created a media texture from my MediaPlayer file, and then created a material from that. I then set that material’s properties to emissive, and break the link to BaseColor.

When I use this MediaPlayer asset in an image widget in the UMG editor, it plays fine, and it works even in PIE. It also works in Standalone Game.

PROBLEM: When we create our baked builds, all images referencing the material from the MediaPlayer asset’s texture just show black instead of playing the video. I checked the files inside of our baked build, and all the .wmv files are in the right places.

Is there something I’m missing?

I have the same issue, were you able to resolve?

Yes, but I found another error detailed here:

This error will randomly crash your game after a while of the video playing. Pretty sure it’s memory leaks somewhere.

The fix is to call OpenURL with the correct URL on the mediaplayer variable when you initialize the widget. For some reason, in baked builds this never gets called on constructing a mediplayer, but it does get called in PIE.

I have the same issue and the fix with OpenURL didn’t work for me.
Could you give me an image perhaps showing the node and the path?

Did you set the Media Framework component to stream from memory?

Not sure; this was for an old project that will likely be upgraded to 4.9 so hopefully that’ll fix things.

Thank you for sharing the OpenURL trick!

My issue was different (random crashes in shipping builds when OpenLevel was called subsequent to any MediaPlayer activity) and so far, calling OpenURL on the movie asset before playing seems to have helped.

For reference, the URL format is “./Movies/YourMovieName.wmv”. Also remember to place your raw movie file inside Content/Movies for it to be included in the packaging process, otherwise you’ll get a black image.