Media Texture Not Loading in Game

Hi there,

I’m currently using an .mp4 which is loaded into a material. I have to open up that media texture and click play for the texture to ‘refresh’ and then it plays in the editor.

I want to render out frames, but it launches it in game to do so. Upon doing that it starts anew and thus the result is a black material.

I understand this is being worked on as a bug, and quite essential for our work. Is there a way to work around this bug by blueprinting the ‘open media texture and push play’?

If not, when is this task expected to be worked on?

Thanks,

Anthony

Hey Anthony, I think for this case you just need to hook up something to press play on the Media Player associated with your Media Texture.

For example, if you open the Media map in the Content Examples project, the Level Blueprint has a reference to the Media Player associated with the Media Texture displayed in the 1.2 example in that map.

Currently in the Level Blueprint, that Media Player is triggered to play when you approach the green button.

But you can also trigger it to play when the level loads by using the BeginPlay event:

52584-beginplay.png

If you set it up like that, it should start to play whenever you start the game, including when you go to render out frames from Matinee. You could also trigger it from a matinee event as well. Here is one example of how to trigger events in a blueprint from matinee:

Hope that helps! Thanks.

Hi,

We think this post contains useful information which we would like to share with our public UE4 community. With your approval, we would like to make a copy of this post on the public AnswerHub which includes the discussion but strips out your username and company name. Please let us know if you are okay with this.

Thanks!

Hi Joe,

Thanks for your response, I’ve not tested this as the project has ended for now, but the theory sounds solid and I’ll be sure to apply it when I next encounter this.

Thanks again,

Anthony

Hi Ben,

That sounds great to me, I hope many people benefit from the blueprint workaround!

Thanks,

Anthony