Media files first frame flickering black when played? And using media files in UI in general?

I am using plenty of .avi files made in After Effects as a big part of my game UI. I have set them via File Media Source/Media Player in contents and launch them via UI widget blueprints “open source” nodes.

The ones set to loop infinitelty are displayed as wanted and cause no problem, but whenever blueprint opens a new file, the first frame or so will flick black every time. Its making the animated UI system look really irritating, as
the animated UI symbols are causing it to look buggy instead of polished what I made those for.

Which makes me think, that is this an ideal way to do animated UIs at all… I do need 2d animation files in the UI, there is no way around this really, but instead of media files, perhaps there is some smarter solution?
Perhaps I should export from After Effects as jpg/png frames instead of Avis, and construct a flipbook animation for UE4 instead?

Hmmm… Exported my animations as targa and made a flipbook from them, but seems that 2D paper flipbooks arent usable in Widget Blueprints either. :eek:

Hmm hmmm some progression again, but new problems as well. Now I tried creating an animated material from a big flipbook texture, that I attached on the UI image.
While it displays the animation bug-free, I cannot control the start timing of the material…thus it can start from a random frame in the middle, when I set it “visible” in the widget.
As a material, it also doesnt send any information when it has finished its loop, thus it will be looping endlessly. I can use “delay” node, but it doesnt sound like a safe way to go, especially since I am using time dillation as well.

I am talking to myself here, but now I went and bought a simple plugin from the marketplace, that allows flipbooks to be used directly on Ui Widgets.
Visually it works, but again the same issue; there is no control over when to trigger the flipbook animation on and off… sigh.

Aha, I continue my lonely conversation for the sake someone might find this later. :slight_smile:
For now, I solved my timing issues by creating child-Widgets under the main UI widget, which will be triggered at the timings I want.
Not sure if this is ideal, but at least everything looks like to be working.

The ammount of data from these alpha targas I have is quite worrying though… As I have over 2gb:s of those already, just for animated UI effects…Yikes, It cant be good to have gigs of UI animation like this. :frowning: I am quite pleased with the looks though.

Thanks for the monologue man :slight_smile: ! Im sorry nobody could help you, but it was very useful for me! Thank you!

By any chance, did you find a way to make this massive use of memory less of a problem? Do you know of a quick way to manually garbage collect this / remove it from memory, once it is no longer needed? Seems it stays in memory for long after.

Unfortunately, didnt find a solution I was pleased with. I gave up at some point, and started to use UMG created animations within UE4, instead of effects made in After FX. It takes more time and doesnt look as good, but doesn`t consume as much memory, and as a plus point, scales better for higher resolutions.

I still have some flipbook effects, but only ones that are like 100x100 or max 200x200 pixels and max 2 seconds long. Setting the textures to power of two and normal compression instead of 2DUI helped a bit, but not nearly enough for this method to be reasonable in resource management.