Playing a Video with a Alpha Channel

Hi, just a quick post to see if this is possible.

I’m trying to play a video with a alpha channel (much like a decal but moving) and I’ve had no such luck. I’ve tried multiple formats (avi, mov, mp4 etc) with no real result. I always end up with the video playing with a background, where as I need it to have no background and just the coloured objects in the video. The flipbook technique is the closest I’ve come to it but theres no control over FPS and with the style I assume it wont hold a video file for longer than a few seconds. Any help of advice would be great, thanks!

Most video containers do not support alpha channels. There are only a few formats that do, and those are currently not supported by any of our player plug-ins. The only player plug-ins currently available with alpha support are ImgMedia for EXR/BMP/PNG image sequences, and NdiMedia (GitHub - ue4plugins/NdiMedia: Media Framework plug-in for NewTek's Network Device Interface (NDI).) for real-time video over IP. This is in 4.18.

You may be able to use two separate videos, one that contains the fill (RGB) and one that contains the alpha channel. You can then blend the two together in a material. Please note that synchronizing two players is still somewhat limited, and your results may vary. It will help to use the exact same encoder settings on both videos.

We’ve had success with an Over/Under Alpha approach for video where the top half of the video acts as the alpha mask and the bottom provides the RGB values. Then it’s just a matter of some UV material math. This way your mask and RGB values are always in sync.

This has also been more desirable for mobile development since playing more than one video at a time can be taxing.

216822-videoalpha-overunder.png

This is a good approach, thanks!

We just released a media player plug-in that support alpha channel:

Enjoy!

Using 2 videos - one with the alpha, the other with the RGB - seems to work fine on my PC.

1 Like

My AVI works with the alpha channel without problems using PremierePro:

  • In the Export Settings dialog box, choose Microsoft AVI or QuickTime from the Format menu.

  • On the Video tab, choose PNG, None, or Animation from the Video Codec menu, and choose 32 from the Depth menu.

Why it is not available to buy it?

Just what I was looking for, great technique!

Any chance you can post a quick video on how to achieve this? (Extreme newby here)

Can you possibly point me to the math required in setting up the material to make use of this over/under approach? Big thanks if so.

I use images sequence (PNG or EXR) with alpha. It works great! Tuto here:

I’ve been able to achieve both with video and transparent png sequences…problem now is there no way to maintain audio syinc between the motion of the sequence and the audio file. I’m sure its fine for video game stuff where the character just has to move and any dialogue is just heard off-screen etc… but for an actual cinematic or film none of the things i’ve tried works. there just doesn’t seem to be a way to sync it with audio. not even during post because it exports the footage with frame drifting which almost immediately cause it to become out of sync.

@toontitan, if for a cinematic or film I assume it’s exported from UE4 to any video editor, then can’t you sync audio this way? Why would you stay in Unreal if you use sequencer ? Do you play Live your event and need audio sync ? Did you search for Midi sync? It works pretty good…

You are awesome and I am waiting for the results from sonidos mp3

I know this is pretty old, but could you tell us which settings you did in side Ue4? Such like the material setup? D:
Also, i’m getting a 10GB+ AVI file, how to avoid that?

Hi, why is it not available now?

Hi, I had to pass alpha channel video display, and because mentioned plugin is not for sale anymore, and old images didn’t load, I want to share my approach.

  1. Best result I can get using image sequence because it just supports alpha channel, but for me, main disadvantage is big size as it doesn’t use video compression, and you can’t add sound wave to it.

  2. Good option is using green screen on video and then adding Chroma_Key_Alpha node to get transparency. It should work but you will need to tweak it for a while to look good.
    Here is an article about it: Setting Up A Chroma Key Material in UE4 - Unreal Engine

  3. Add to video alpha channel as half of the video is good for advantages which HidingGlass mentioned and for me it gets the best results.

To use video alpha channel:

  • Set Material Domain to User Interface
  • Blend Mode to Translucent
  • Texture Coordinate node has UTiling set to 1 and VTiting to 0.5
  • Texture Object set to your Media Texture

1 Like

I have used video file with alpha using Pro-Res 4444 with success. You need to enable AJA Pro-Res plug-in.

1 Like

How to have several different Media Textures? They are just connected to Media Player which contains all my video files. And how to play this in game?