About how to get a transparent background with a webm video via alpha channel, here is one person that says you should encode with VP8 and not VP9.
WebM Alpha only displayed in Chrome?
And here is another person who says it's the opposite thing, like it should be VP9 and not VP8.
Transparent webm video displays solid background color on Chrome for Android 68 on android 9.0
So the question is,
Is there a way to make every device display webm video files that contain alpha channel information correctly?
HERE ARE OUR TEST RESULTS: We have produced two versions of the same webm file, one with VP8 encoding and another with VP9 encoding. We have run tests to view them on different devices. On a SONY phone (android/chrome 74) the one with VP8 encoding is displayed correctly with a transparent background while the one with VP9 encoding has its background filled with solid black instead of transparent. On a HUAWEI phone (android/chrome 74) it is the exact opposite! The one with VP9 is displayed correctly while the one with VP8 has its background filled with solid black instead of transparent. On an ASUS tablet both the VP8 and VP9 are displayed correctly. On a XIAOMI phone neither VP8 nor VP9 is displayed correctly and the pixels that were supposed to be transparent are not.
The documentation sadly does not provide a step by step guide for us to easily figure out what parameter causes which result, therefore we do not know why things are so inconsistent across devices.
AN EXAMPLE WORTH MENTIONING: On Sam Dutton's simpl.info there is...
https://simpl.info/videoalpha/
...when viewed on the desktop (chorme/windows), on the tablet (chrome/android) and on the SONY phone (chrome/android) both the dancer and the soccer player videos are displayed correctly with a transparent background via alpha channel (which is expected). But on HUAWEI and XIAOMI phones only the football/soccer player video is working as expected while, strangely, the dancer's background is filled with solid gray. It turns out that the soccer player's video does work on all android devices. Curious enough, we have actually asked Sam Dutton himself how to achieve that. In his answer he said he didn't remember the settings that was used to produce the webm file as it had been several years since then.
One thing that may be good to know (even though not directly related to the issue), is that if a WEBM
file contains audio alone without any video, it is still playable in Windows and Android (with theoretically better quality than OGG
), but Safari (especially mobile Safari as of 2024) WEBM audio is only partly supported which is not reliable.
NOTICE: This particular research has been performed during the development of the SPEAKWORLDLANGUAGES app