How to integrate a video with alpha channel (rgb+alpha) in the new 5.6 videoplayer?

I would like to integrate videos with an alpha channel into my project. I’m streaming the videos from my harddrive using the new videoplayer from the 5.6 beta. Currently I’m using the particle/additive shader as a workaround instead of an alpha. Is it currently possible to integrate an video with alpha channel (rgb+alpha)? Which format is supported?

@this-play -

Did this ever get resolved? Trying out the new VideoPlayer component and not able to get transparency to work correctly. Followed the instructions here: Unity - Manual: Video transparency support that prescribes that the video clip with alpha needs to be encoded with ProRes 4444 or VP8. I used ProRes 4444 and I can see the video with alpha correctly in the preview window, but in the game view, the transparent regions still render as black.

What am I missing?

2017.1.1f1

Thanks!

No. you have to put the alpha channel into the video. so you have a video with color on the left and black/white alpha mask on the right. Then you can write a shader that samples the texture for the alpha value.

Sorry to necro a thread but for anyone who passes through here looking for answers.

It is possible to do this. Unity prefers H.264 and Webm VP8 formats for video formats with alpha it seems. Also would suggest overriding the encoding to H.264. It may take a while for unity to apply this import setting but it is a file format that is supported across a wider variety of devices (including android). More info here: https://forum.unity3d.com/threads/settings-for-importing-a-video-with-an-alpha-channel.457657/#post-2971240

I found that using the Unlit/Transparent Cutout shader on the renderer object (Object you are rendering video on) works wonders with alpha’ed video, as long as you don’t need the video to react to lights in you scene.

Hi guys,

we exported the footage as uncompressed AVI with RGBA, then used this encoder, since the transcoding method utilizing ffmpeg in this thread did not work for us. But you have to install the direct show filter nevertheless.

the videoplayer displays the footage correctly with alpha channel, but just in the preview.
If we make a build the texture is just white.

hi

i also have a problem with transparency. I have made a .webm transparent video with ffmpeg and VP8. I tried out of unity app and the transparency works for pc and android.

  • I tried to simple play it as a link with the 5.6 videoplayer (URL) but i get the green screen on my video (does not read the alpha value)
  • i tried to transcode and then played as a link (i upload the transcoded file) but still getting the green screen
  • i tried it with easymovie texture but still the same

any ideas about how to solve this ?