I’m using Unity to create an application that displays video from a URL. The video is in webm format with the VP8 codec. In the Unity editor, everything works as expected - the video is displayed with a transparent background. However, when building the project for Android, the transparency is lost, and the video is displayed with an opaque background. I don’t use shaders, but I tried it didn’t help either
Why is video not transparent on Android?
Unity offers a feature called “Transcoding.” This allows you to transcode your video files within Unity during the build process. By enabling transcoding for the VP8 codec, Unity will convert your videos to a format that is compatible with Android’s native decoder and supports transparency.
Here’s how to enable transcoding:
Go to Project Settings > Player > Video.
Under “Supported Video Codecs”, check the box next to “VP8”.
In Unity 2023.2.14f1, the transcoding settings are available in the import settings per video file. If it’s the same in your version, you should find these settings by selecting the video file itself. Here, transcoding can be specified per platform.