-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for alpha channel (transparency) #177
Comments
hi mastereric |
Writing this down for posterity, but previous experimentation revealed that LibVLC 4.0 (currently an For comparison, the other file formats which support transparency are:
|
Correction, HAP codec is compatible with LibVLC 3.0. HAP creation script:
|
Green screen is perfectly implementable in JS, by replacing a specific pixel color at run time. Jigsawx had webcam or video running in haxe flash reasonable well. There are certainly options using something similar to a double buffering to apply a mask ( perhaps composite with black and white image ), mask or greenscreen replace pixel options. Stuff like svg masks work well. In terms of old flash, we built a 3D website with papervision3D that had video people talking in 2D with transparent backgrounds within a 3D enviroment years ago. Therefore there must solutions even if the implementation is on the haxe not the hardware extern side. I am sure a shader could easily be used to achieve green screen or use a black and white video as a mask for a colour one. |
Certain video file formats (such as WEBM) have support for an alpha color channel. This results in the channels with lower alpha values being rendered with transparency. This would allow any sprites underneath the video to be visible.
See here for more information: https://developer.chrome.com/blog/alpha-transparency-in-chrome-video/
The use case for this is evident and powerful: encoding and playing a transparent video would allow for efficient and performant rendering of elaborate character animations not suited to spritesheets.
There are problems with this, however. The implementation of
libvlc
currently exports 0xFF for the alpha value regardless of settings. I am investigating alternatives.The text was updated successfully, but these errors were encountered: