I've been interested in this demo: http://jakearchibald.com/scratch/alphavid/
I also saw this question on here:
Can I have a video with transparent background using HTML5 video tag?
But I can't seem to figure out: How do you create h264, ogg and webm video files with alpha channels?
If you open this video from your demo with QuickTime you will see a video with separate RGB and A regions:
If you then look at the code for the demo, you will see that it is using one offscreen HTML5 Canvas to draw each video frame to, reading the alpha pixels from the second half of that canvas to set explicit per-pixel alpha values in the first half, and then using
putImageData
to shove the result to another HTML5 Canvas which is actually displaying the video.Coupled with various statements throughout the web that H.264 does not support alpha and I almost feel confident that H.264 cannot have alpha. I say this because I find multiple references to this 2006 quote from Apple computer regarding updated QuickTime in their "Leopard" release of OS X:
The only thing I have found related to this marketing quote, however, is this document showing how to change the overall opacity of a video layer in QuickTime Pro.
WebM does support transparency now, and Chrome 29+ can play it back without a flag.
http://updates.html5rocks.com/2013/07/Alpha-transparency-in-Chrome-video
But it does not work on Chrome for Android.