Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Media Player - Load to Memory?

I'm projecting a large MediaPlayer Texture onto a sphere for a VR 360 experience. I realize that the Media Player asset is still under development and a bit buggy but after some experimenting I've gotten some decent results.

Sometimes when I play the level, the video loads fine and I get decent frame rates (usually if I've been using the background video a few times and after restarting the editor). However, if I switch out the background video or change the video and go back to the old one my frame rates can drop down to single digits!

I assume that the times the video loads fine it is loaded into the memory buffer and being accessed more quickly. My question is, is it possible to force the media texture to load to memory before the level plays? Currently I have no load screen, but would prefer having one and allowing the video to buffer rather than starting out with a poor frame rate. Is there a node or something I'm missing that will let me load a video to memory before playing?

I'm using 4.12.5 and developing for Oculus DK2. Let me know if you need any more info, but this seems like more of a general question than a specific problem.


Product Version: UE 4.12
more ▼

asked Jul 14 '16 at 05:23 PM in Using UE4

avatar image

98 6 14 18

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

There will be a pre-cache option in 4.13 for selected platforms, including Windows. However, I wonder if the low frame rate doesn't indicate some other problem. Are you accidentally playing more than one video at a time? Could anything else be slowing down your I/O or CPU?

more ▼

answered Jul 14 '16 at 05:44 PM

avatar image HidingGlass Jul 14 '16 at 05:57 PM

Currently I am manually pausing all media players in the content browser before playing and the background video is started on EventBeginPlay so I believe it should be the only video playing. As far as other things affecting playback, I don't think there was anything different during the times it was working versus the times where the frame rate is so low. If I play the same scene with the video paused, the frame rate shoots up to 100+.

alt text

avatar image gmpreussner STAFF Jul 14 '16 at 06:10 PM

Your BP looks OK. If you have multiple MediaPlayers, make sure that none of the others are playing. In 4.12 and before, there is an option to AutoPlay. Make sure it is turned off. Usually, when users have performance problems like this, it is because media players are happily decoding multiple videos in the background without them knowing.

The AutoPlay option has been removed for 4.13.

avatar image HidingGlass Jul 14 '16 at 06:22 PM

Is it possible AutoPlay has already been removed in 4.12.5? I've seen it mentioned in forums and documentation but it doesn't appear to be on my MediaPlayers.

Also, as far as video playback, do you know if I should be monitoring GPU or CPU usage while playtesting?

alt text

noautoplay.png (1.1 MB)
avatar image gmpreussner STAFF Jul 14 '16 at 06:32 PM

You're right, I might have removed it in 4.12 already.

What are the dimensions and frame rate of your video?

avatar image HidingGlass Jul 14 '16 at 06:37 PM

The video is 3840x1920 at 23fps. I know it's big, but it seems like it plays OK sometimes (usually between 25 and 60 fps) andother times never gets past 5 fps!

avatar image HidingGlass Jul 14 '16 at 06:57 PM

It looks like you were right the first time around in a way! So I had a few versions of the background video (that were definitely paused in the Media Player and were not placed in the level), and after deleting them the framerate jumped up to almost 70!

So it looks like media in your content browser, even if it's not playing in the media player, is somehow impacting performance while the level is running.

Do you know if this is a bug or if there is a potential fix? I'm currently working on one level with one BG video, but I'll be implementing different levels with different BG videos and it'll be a pain if videos that are not present in that level are impacting performance this much.

avatar image gmpreussner STAFF Jul 14 '16 at 08:16 PM

Well, it's not a bug, but more of a very bad workflow.

In 4.13 I changed it so you won't accidentally play videos. In particular...

  • Any open media player editors will stop playback when PIE/SIE starts

  • In the game, playback has to be started explicitly via BP

  • When PIE/SIE ends, all players are stopped and reset

Hopefully, with those changes, the user is in full control over what plays when.

avatar image HidingGlass Jul 15 '16 at 01:54 PM

Since 4.13 still seems a ways off, is there a quick fix for my current project?

I have multiple levels, each with their own video. With the current workflow, can I keep the videos that are not playing at the time from impacting the performance? They're all paused in their respective MediaPlayers so I don't understand why they still have an impact. Does it have something to do with closed VS open instead of playing VS paused?

Thanks for your work on this. I'm excited to see the changes in 4.13!

avatar image gmpreussner STAFF Jul 15 '16 at 05:19 PM

If they are not playing then they should not have an impact (other than consuming memory). If your frame rate goes down, it means that some other movies are probably playing.

avatar image so2gamemake Aug 02 '16 at 09:50 AM


There will be a pre-cache option in 4.13 for selected platforms, including Windows.

Is mobile included or just desktop computers/high power consoles?

Thank you.

avatar image gmpreussner STAFF Aug 08 '16 at 08:57 AM

It depends on whether the native player API supports opening byte streams (which most don't, unfortunately). It is currently supported in VlcMedia, PS4Media, WmfMedia, and MfMedia.(when it is finished).

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question