cchamp84 — 2013-03-25T13:07:19-04:00 — #1
I am currently converting a flash site to html5 and would like some clarification on the abilities / limitations of html5 and its support with alpha channels.
1. Do the video or canvas tag elements even allow the ability to work with alpha channels ?
2. What is the best video format / codec with alpha channels for support with html5?
While researching on information for .h264 with alpha channels i came across using offscreen HTML5 Canvas to basically composite 2 separate clips ( h.264 and alpha ) together.
This seems like a huge workaround, taxing and would be computationally heavy.
Any comments or input on these issues would be much appreciated.
zcorpan — 2013-03-27T07:13:55-04:00 — #2
There isn't a video codec that supports alpha channel that is supported in browsers, AFAIK. So you would have to use a heavy workaround.
For <video>, in theory it would support alpha if the video codec has alpha channel information. You can change the alpha channel of the whole thing with CSS, or maybe regions of it with masks and/or filters.
<canvas> supports alpha channel, as can be seen in the demo you linked to, which paints the video on a canvas and changes the alpha channel of each pixel with ImageData.
system — 2014-10-07T23:58:11-04:00 — #3
This topic is now closed. New replies are no longer allowed.