Hi everyone,
I’m currently experimenting with using video playback (Media Textures) as part of my UI in Unreal Engine 5, and I’ve run into a few issues I could really use help with.
What I’m trying to do:
- I’m displaying a looping video (MP4) as part of my main menu background.
- I created a Media Player, linked it to a Media Texture, then created a Material using that texture and applied it to an Image Widget in UMG.
Everything works fine in-editor, but when I run it as a standalone game or package it:
- Sometimes the video doesn’t start playing automatically.
- The playback occasionally stutters or freezes after a few loops.
- There seems to be a performance drop (especially in lower-end test devices or when using 4K videos).
What I’ve tried:
- Ensured the media source is set to Preload.
- Checked “Play on Open” and manually called OpenSource() on BeginPlay.
- Tried both File Media Source and Stream Media Source.
- Converted the video to different formats/codecs (H.264, H.265, lower resolution) – didn’t help much.
My questions:
- What’s the best practice for using media textures inside UMG widgets?
- Should I avoid using video in UI altogether and render it another way?
- Are there memory or texture streaming settings I should look into to improve playback?
- How do larger games handle in-game cinematics or UI video? Is Media Framework still considered reliable for this?
I’m still new to the Media Framework and feel like there’s something I’m not configuring correctly. Any suggestions, working workflows, or performance tips would be greatly appreciated!
Thanks in advance for your help 
1 Like
You can try synchronizing the frame rate
media textures in UI work but carry a specific cost model worth knowing before you optimize:
the cost: a media texture in UMG invalidates the widget tree every frame it decodes (the texture updates, the image redraws), and the decode itself competes for the same budget as your game. a 1080p menu loop is fine on desktop, a 4k one is not free anywhere.
the checklist for a menu background:
- sync or decouple: the one reply in this thread (synchronize frame rate) matters: media playback rate versus ui update rate mismatches cause judder on the loop. match the video’s frame rate to the game’s target (or enable the media player’s frame rate sync option) and the loop looks clean.
- right size the video: encode the menu loop at the resolution it actually renders at. a fullscreen background at design resolution 1920x1080 does not need a 4k source file.
- pause when invisible: bind the menu widget’s visibility or construct/destruct events to media player play and close/rewind. a menu you are not looking at should not be decoding.
- alpha and overlays: if the background video needs transparency (logo or ui elements composited over the world), media textures need a material with the alpha handled (the media texture’s alpha output through a translucent UI material). this works but adds shader cost; for plain fullscreen loops it is unnecessary.
- alternative when the video is simple: an img media sequence of pre-rendered frames or even a flipbook-style render target can be cheaper than a full media stack for short decorative loops.
for menu backgrounds specifically, one media player kept open across menu visits (rewind and play rather than reopen) avoids re-decode hitches on every menu entry.