I needed to use a video that contained transparent content (aka an alpha channel) in a Unity prototype I was working on for a demo. And according to the docs, the only video formats that support transparency are a certain Apple-only format and WebM with the VP8 codec.
I couldn’t get the video to render to WebM using the editing software I had, so I ended up exporting the whole thing to a sequence of PNG files, which I then converted to WebM VP8 using the ffmpeg and the following parameters:
ffmpeg.exe -i IMG_%07d.png \
-c:v libvpx \
-pix_fmt yuva420p \
-auto-alt-ref 0 \
-c:v libvpx specifies the VP8 codec and
-i IMG_%07d.png is the matching pattern for the input files. I have no idea what the other parameters mean, and I don’t remember where I found them when I googled with DuckDuckGo.
But it worked! I followed the import instructions in the Unity documentation and it the video played with transparency on both iOS and Android. The only thing worth noting is that I had to enable the “encode” option for Android in the import settings.