Media Texture with Alpha

In general: Is there any way to assign a separate video file as the opacity mask of a media texture (also a video) without de-sync? A sequencer to fire both videos isn’t a good solution, since the footage loops, and each loop causes a progressively worse de-sync over time.

The scenario specific problem is this:
A freelance job I’m working on is utilizing live actors with green screen footage for characters, rather than 3D assets.We’ve rendered two separate videos - an opaque main pass, and a luminance mask to use as an alpha. We are trying to use the luminance video as an opacity mask for the opaque video so that we get nice, clean silhouettes with transparency. The problem is that we can’t get the two videos to fire simultaneously, so as they continue to loop (for the idle animation, as an example), the more loops the greater the tearing between the alpha and the main footage. We’ve utilized a sequencer to try and fire them closer together after a rewind, but the problem remains the same: the more looping, the worst the de-sync becomes.

Currently transparent avi files aren’t a great solution because they come in upside-down, backwards, and with horrible color. (This is an acknowledged issue according to this thread: https://answers.unrealengine.com/questions/509343/movie-playing-upside-down-and-backwards.html )

So! How can I prevent the de-sync between the two videos? It seems strange that I can’t just start them together.

Current Media Texture:

Current Level Blueprint:

I’m afraid there’s no reliable way to do this right now. I’m working on it for 4.16 though.

You could try to enable the “Preache File” option on the FileMediaSource, open the two videos in both players, and once they’re opened, call Play() on both players.

You will have to disable the “Play On Open” checkbox on the media players. Instead you need to listen to the OnMediaOpened event in your Blueprint and only execute Play after both players are done opening the media.

Assuming that both videos were created with the same encoder settings and frame rate, they should stay more or less in sync.

I will look forward to the 4.16 release! Until then, I’ll try your suggestions, and I appreciate the help. Thank you.

Could you not combine them as a texture atlas and then use one half for the alpha?

This has been pushed out to 4.17. More work is needed, sorry!

Look into the preview of 4.18 and maybe do it with an exr sequence? What I’ve done for my stuff is a texture atlas with the video split between rgb on one side and greyscale alpha on another

Has this been resolved in 4.17 . I’m trying to do the same thing now - It seems like couldn’t there be a node created in the material that just says launch together

@xiong024 Same problem with 4.18.3
One video composed of a material with an opaque video and an alpha video works fine but when you try to play more the sync gets very noticeably worse which each video you add, as mentioned in the OP post.

hello! does anyone know if this issue has been resolved? because I work in UE 5.1 and I also have the same issue with synchronization