How to Upload and Play Video in Unreal Engine 5

In this post it is detailed the simplest way to upload video to Unreal Engine and then play the video in a level.

VIDEO IMPORT AND MEDIA PLAYER:

  1. In the Content Folder create a new folder called Movies
    1. If the video is not in this folder, it won’t get packaged in the game.
  2. Drag in a supported video file into the Movie folder.
  3. This should be in a compressed video format such as an mp4.
    1. See the link here for supported video formats: Supported Video File Formats
  4. Also move the video file into the Windows/PC project Movie folder using the PC folder browser (I.E: Move the video again into the PC folder).
  5. Right click in the new folder and in the menu find (Media > Media Player) and create a Media Player.

  1. A panel will pop up and be sure to tick the box to create a media texture asset.

  1.  Back in the folder > Right click on this newly created media texture and from the pop-up menu create a material.
  2. Open the Media player. Double click the video file to make sure it plays. Tick the loop box if you want it to loop.

  1. Close the media player. I have had issues with the video not playing in the editor window if I keep the media player open with the video playing.

BLUEPRINT:

  1. Right click in the Movie folder > Create a Blueprint > Select Blueprint Actor > Name it BP_TV or something similar.
  2. The files now in your folder should show as below: Blueprint, Video, Material, Texture and Media player.

  1. In the Blueprint > Add a ‘static mesh’ and add a plane or TV mesh (a TV mesh will need a separate material slot for the screen for the video material) or just use a plane.
  2. Add the media player material to the mesh screen or plane.
  3. In the graph add the Event begin play node.

  4. Drag off from Event begin play and add an Open Source node. In this node select the video file in the drop-down list provided.
  5. Create a new variable and change it from the default Boolean to a Media player object reference.
  6. Drag this node into the graph and from the options provided select Get NewVar (or whatever you renamed it to – ideally rename to ‘Media Player’).

  7. Plug this into the target of the Open Source node.
  8. Press compile and with the Media player node selected > in the details panel > add the media player that was created.
  9. Drag the blueprint into the level and it should work!

ADD SOUND TO THE VIDEO:

  1. Simple add a Media sound component to the component panel for the video to play sound.
  2. The component panel should like below (assuming you haven’t added other components – which if required is fine of course)

THE FINAL GRAPH:

Related Video Blueprint Tutorials

This overview tutorial is part of a specific set of tutorials that relate to the upload and playing of video in Unreal Engine. Please see below the related videos in this series.

  1. How to upload and play video.

  2. How to Play video in a widget.

  3. How to Automatically Remove Video when it finishes playing.

  4. How to disable every key except one

Leave a Comment

Share This Story, Choose Your Platform!

Subscribe to Newsletter

Motion Forge Pictures Blog

Featured Posts and Links

Free Height Maps

Mountain Height Map

Free 3rd Person Animations

Mountain Height Map

Free Store Downloads

Mountain Height Map

Unreal Engine - Free Materials

Mountain Height Map

Latest Posts

Categories

Tags