Hacker News new | ask | show | jobs
by the8472 2364 days ago
Note that a few video codecs also support alpha these days, which could be used to preserve the mask and overlay the video over some background.

It even works on the web: https://files.catbox.moe/uu2ze0.webm (needs a non-black background)

3 comments

here with a yellow background (edit: changed to a yellow-to-green circle-shaped radial gradient because why not): https://codepen.io/mdesantis/pen/RwNZEZJ
Maybe, https://codepen.io/pbhj/pen/dyPzwEj instead - centre the video and put the gradient on the body to emphasise the matting?
Firefox (Linux): I had to open dev tools, remove the bg-image that Firefox shows around media links, and then adjusting the bg-color showed the effect. Otherwise it just looked like a normal video.
Wow. Pretty cool. Had no idea about this.