Here is chatgpt simple solution:
To play an MP4 video in a widget in Unreal Engine, follow these simple steps:
1. Import the Video File
- Import your
.mp4
file into Unreal Engine (drag it into the Content Browser). - Right-click the video file and choose Create Media Player and Video Texture (make sure “Video Output Media Texture” is checked).
2. Create a Media Player Widget
- Create a Widget Blueprint (
UI_VideoPlayer
). - Open the widget and add an “Image” widget.
- Set the Image’s Brush → Texture to the Media Texture created earlier.
3. Play the Video
- Open the Graph tab in your widget.
- Add a “Media Player” variable and set it to your Media Player.
- On Event Construct, use the “Open Source” node to play the video:
- Drag the Media Player variable and use
Open Source
→ Select the Media Source (created with the MP4 file).
4. Show Widget on Screen
- In your Level Blueprint (or any actor), use:
Create Widget → Add to Viewport
to display the widget.