Is Media Framework Video Playback Tied to the Main Game Loop?

Hey Guys, So I’m using the Stereo Panoramic Movie capture plugin to record a 360 video, but running into issues when trying to record a video of an animated media texture. I have a mesh with a media texture playing in the scene while I’m recording 360 stereo with the plugin, and it seems that the video of the texture is continuing to play while the editor waits for the 360 images to render. Currently using the command line arguments -usefixedtimestep -fps=30 -notexturestreaming to lock the framerate while recording, but this doesn’t seem to affect media texture playback. My current theory is that the video playback is handled on a separate thread, and thus not constrained to the fixed timing. If this is true, anyone got an idea how to syncronize the framerate of the game and the playback speed of media textures? Thanks

This is currently not supported, sorry. We rely on the video decoder to provide the correct timing based on the desired playback speed. The decoder does not care what the Engine is doing - it will keep playing at the desired rate.

For 4.14 we will look into ways to synchronize media playback with the Engine, particular with Sequencer and movie capture.

Now that 4.14 is out is there a solution to this we are having the same issue. Would be great to be able to render them synchronized.

This is still being worked on.

Pretty devastating for us too. We used video textures all the time with UDK but haven’t been able to render videos with them since UE4 came out. :frowning:

Is there a workaround? so for example taking the game time to drive the playrate of the movie somehow?
I’ve tried to change the playrate of the media player but it doesn’t seem to work :confused: even if i change the rate to 0.1 it doesn’t show a difference. Here is my setup.

I too would real keen to see a workround / solve for this … without it I cant really transition to unreal properly :confused: … any
progress out there?

eg … would it be possible to use an image sequence instead of a movie and call a new image every rendered frame?

Has this been implemented in 4.15 yet?

@gmpreussnet any status update?

/edit

Just saw gmpreussner’s update on another thread:

I’m currently working on time code support and proper audio/video frame-sync, which should allow you to do that. A first version of this will probably be in 4.16 as part of my big Media Framework 3.0 update. We may integrate the latest code into the Master branch two or three weeks after GDC.

So this doesn’t technically work yet, still. I am looking forward to the update to 4.16 - this renders my linear animation impossible right now…

It won’t be supported in 4.16 either. This has been pushed to 4.17. There were simply too many changes required, and I’m still working on those, sorry.

One thing you could try is record a sequence you want to adjust the speed with and time how long it actually takes to play the full sequence. Take the correct sequence time, Lets use 60 seconds for an easy example, and divide the recorded playback time, lets say 20 seconds. Slow your video down in something like Adobe Premiere to 1/3 the speed and use the new slower video. It will physically be 3 times longer and should then time correctly. I’ve had to do this with a video I’m working and it seems to at least make it usable until it’s fixed. You will obviously have to use a separate audio playback since it will not be usable in the slower video.

Does anyone have any thoughts on a way to make the movie an image sequence, then tying the corresponding file in the image sequence to the actual frame number. In theory, if you can get an image texture to reload the next image when the sequencer changes frames, the problem would be solved for rendering.

I understand this would be disastrous for real time playback performance, but that isn’t what we are talking about here.

Any ideas? Thoughts on how this could be done?

I think I have found an easy workaround for this problem. To have a media texture synchronised with my matinee during capture, I pause media player immediately after opening source and then I set new position of the video 25 times per second via level BP (media texture input video is 25 fps). As long as the video file wasn’t very large (4k and more), this method completely solved the problem for me, since the video progress was directly related to interp position of my matinee.

Is this really working ? Tried on my side, but no significant changes, but maybe I’m doing it wrong

After years and years of wanting this, even since the UDK days, it is finally possible. Use an image plate with image sequences and sequencer instead of video textures.

Have you fixed this in 4.17 - My one little movie that i have replicated 12 times using the media framework in 4.17 is playing back at like double time in sequencer render output.
I’m doing a show for AdobeMax conference in Vegas next thurs and I really need this to work - Would rendering the movie to 60frames a sec help ?? Last thing I want to do is tell my client I can’t even get a little 20sec movie to play back right in Unreal

In 4.18, the ImgMedia player for image sequences is the first player plug-in that supports synchronized output in Sequencer. We haven’t had time yet to add support in the other players. This is currently scheduled for 4.19.

Can you tell me how to synchronize my image sequence with the sequencer? the framerate (30) don’t match will i am capturing with the Stereo Panorama Plugin. the media rate is faster then everything else. Thanks!