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

Chroma or alpha on videos? #255

Closed
drewmca opened this Issue Jul 11, 2012 · 2 comments

Comments

Projects
None yet
3 participants
@drewmca

drewmca commented Jul 11, 2012

I've been playing around with the library to try to get some video blending going on. Specifically, I'm trying to take one layer of video (an effect, say) and layer it on top of user-shot video. After much fiddling, i was able to get things working using a chroma key blend filter.

In playing around with the video itself, though, I was interested in trying out a different way of getting an alpha channel into a video and using it with layering. I have videos that are split so that there's a separate, white alpha channel video. In other words, the alpha channel is split out into a separate video. The reason is that this way I don't have to worry about the key color in the effect video; I (supposedly) can just somehow merge the effect video with its alpha channel and get (supposedly) something I can layer over top of full video. Same idea as with a chroma key except I'm not depending on the chroma key color to tell me what's transparent. I have a separate video that can do that.

Any ideas on how a solution like this might work? Would it require a custom filter? I've tried removing a color on the alpha (pure black and white) video and then doing an alpha blend on the other, and then trying to blend that with the user video, but without much luck. Thoughts?

(and thanks so much for a great library)

@BradLarson

This comment has been minimized.

Show comment
Hide comment
@BradLarson

BradLarson Jul 12, 2012

Owner

You should be able to do this, but it will require a custom filter. I'd build off of one of the existing blends, and have it pull in the color components from the first image, then use the red channel from the second (alpha) image as the alpha channel for the output pixel. That should be pretty trivial to create. You can then use this movie with its custom alpha channel with something like an alpha blend to overlay it on your background scene.

Owner

BradLarson commented Jul 12, 2012

You should be able to do this, but it will require a custom filter. I'd build off of one of the existing blends, and have it pull in the color components from the first image, then use the red channel from the second (alpha) image as the alpha channel for the output pixel. That should be pretty trivial to create. You can then use this movie with its custom alpha channel with something like an alpha blend to overlay it on your background scene.

@BradLarson BradLarson closed this Jul 20, 2012

@brizzly

This comment has been minimized.

Show comment
Hide comment
@brizzly

brizzly Dec 16, 2015

Hi there, I will be more than interested in this custom filter ! Would you let me download a copy of it if possible ? I'm afraid this will be more than complex for me to write this custom script from scratch.. Thanks a lot in advance for you help on this!

brizzly commented Dec 16, 2015

Hi there, I will be more than interested in this custom filter ! Would you let me download a copy of it if possible ? I'm afraid this will be more than complex for me to write this custom script from scratch.. Thanks a lot in advance for you help on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment