Hi everyone. I’m using UE5.5.4. I created a video on a plane with an alpha channel using two mp4 (H264) files. For this, I used two MediaTextures and two MediaPlayers. One file is the color video, and the other is the mask. I tried playing both MediaPlayers in parallel in my Blueprint, but the mask and the color video became desynchronized. Later, I also tried playing both MediaSources through a Level Sequence, but that didn’t help either. The two videos don’t start at the same time, and after a certain number of playback loops they sometimes sync up, but then go out of sync again.
for video with alpha ue has a very nice codec that i’ve used in the past.
look for HAP or HAP ALpha
you can either export directly from whatever software you use. or export to an intermediate (e.g. raw)
and then recompress using ffmpeg
( you have to make sure you are exporting WITH alpha, not all software allows you to do that, maybe you’ll end up having to export as png sequence. ffmpeg can reencode from a png sequence)
another more common option is to use chroma key. you just need to use chromakey on your material. there are a few nodes already set for that purpose.
i think this is the recommended one.
trying to sync two videos in frame perfect way would be a nightmare.
If you can’t use HAP, then using an image sequence instead of a video could work. (Don’t get discouraged if at first hap is not working correctly, codecs are a bit delicate).
maybe use a png sequence with transparency instead of two videos. just like with hap.
though this would increase the disk usage a to.
my suggestions are
chroma key
hap
image sequence
as expected there is a ton of info on internet for chroma keying as it’s the default technique and has been around since ages. (long time before ue existed)