I have two cameras recording two separate videos
I would like to subtract the background in both videos and only leave the people in the video remain. After subtraction, I would like the background of the video to be transparent (like a .PNG pic). I tried a few patches here but all the patches make the background black instead of transparent.
question 1: how to make the background transparent
question 1: once the background in both videos are subtracted and being transparent. How to add the two videos together and make a third video? (i guess i can use jit.op?)
I don’t know how to check if a video has a transparent alpha channel short of putting it into something like flash and seeing which parts disappear. I don’t have much experience with video transparency. But the experience I do have is simply making a simple alpha channel with jit.matrix @planemap 2123 (making something like the green channel your alpha info), then when you do an alpha blend, boost the Alpha plane with jit.scalebias @ascale 50 (or more) to make it less ghostly.
Background subtraction is complicated, but you can use objects like jit.chromakey or jit.lumakey to do simple keying if you have a solid-colored backdrop. There are a couple of Jitter Recipes that deal in alpha channel creation and usage. I’d recommend checking those out. For the actual blending, you might check out jit.alphablend or using OpenGL.