Media framework: How to pre-buffer video?

We are working on an interactive film project and need to do preferably frame-precise cuts from one video file to another. Consequently, it would be ideal to be able to start a video file on a given engine tick and have it start more or less immediately. I would assume that this is possible, as long as the video file has been opened and the very beginning of the stream has been pre-buffered into memory in advance, before hitting play.

Is it currently possible to pre-buffer a video file, so that calling Play() from Blueprints would start it instantly?

We have tried calling OpenSource() in advance and then calling Play() when we do the cut. IsReady() turns to true immediately on the next tick after OpenSource() and there is no fps hitch at this point → probably does no pre-buffering of any kind? When calling Play() later, there is then a delay of around 250ms, after which the video plays out-of-sync with substantial frame drops, and finally settles into smooth playback at around 500ms. The video is 4K h.264 60fps mp4.

(By the way, what is the Preroll option? Is it related to this?)

Edit: We do have a workaround in place. We would just like to know whether there is a clean way of doing this.

We do not have support for this yet. It’s something we’re actively working on right now. The best you can do at the moment is to precache the media source to RAM (it’s an option in the FileMediaSource asset). That may reduce the startup time, but the decoder will still have to warm up.

The preroll option (I assume you’re referring to Sequencer) is a Sequencer only option. Synchronizing video with Sequencer is also part of the current development efforts.

Ok thanks! May I still ask what the Preroll option does in the Sequencer? (we use Sequencer too in our current playback solution)

Found out; does exactly what the name implies :D, that is, starts running the subsequence n seconds before its nominal start time. For others in the same situation: the Preroll gives a nice, clean way for triggering decoder warmup a bit before the actual cut.

Hello–is there support for frame-precise cuts yet? Just checking back in on this.