The result isn’t perfect. there’s some green spillover (which is much more noticeable on a darker background) and there isn’t a true alpha channel. But for the most part it looks pretty decent!
To be totally honest I don’t completely understand the original code, but I was able to modify it enough to try and push it beyond the original (rather rough) demo.
If anyone has any suggested improvements to the code let me know in the comments section below…
True Alpha Transparency Option
There is another option that allows you to have full alpha transparency on your videos, but requires you to create a video with the mask stacked directly below it as shown below.