I'm mixing video by background subtracting it and then setting the background transparent (alpha = 0), then texturing each video onto overlapping rectangles to achieve a compositing effect.
I need to record the different videos with [pix_record] and then play them back later while preserving the alpha somehow, so I was thinking that I could just replace all the transparent part with bright pink or something and store it as regular photo jpeg frames, and then later set all the bright pink parts to transparent when I read the video back.
I'm having trouble with both sides of the conversion, though. Perhaps there's a better approach entirely?
thanks, spencer
The stopgap solution I'm using now is to record the raw output of pix_background(with the background set to black) and then when I restore it I'm using an abstraction that uses the image as its own alpha mask with [pix_takealpha] (the mask image is run through a pix_gain with a gain of 5 to saturate the mask so it's basically black and white. (is there a cleaner way to turn all non-black pixels white?)
-spencer
On Fri, Aug 1, 2008 at 8:25 PM, Spencer Russell spencer.f.russell@gmail.com wrote:
I'm mixing video by background subtracting it and then setting the background transparent (alpha = 0), then texturing each video onto overlapping rectangles to achieve a compositing effect.
I need to record the different videos with [pix_record] and then play them back later while preserving the alpha somehow, so I was thinking that I could just replace all the transparent part with bright pink or something and store it as regular photo jpeg frames, and then later set all the bright pink parts to transparent when I read the video back.
I'm having trouble with both sides of the conversion, though. Perhaps there's a better approach entirely?
thanks, spencer
You can use [pix_write]. ++
Jack
Le 2 août 08 à 02:25, Spencer Russell a écrit :
I'm mixing video by background subtracting it and then setting the background transparent (alpha = 0), then texturing each video onto overlapping rectangles to achieve a compositing effect.
I need to record the different videos with [pix_record] and then play them back later while preserving the alpha somehow, so I was thinking that I could just replace all the transparent part with bright pink or something and store it as regular photo jpeg frames, and then later set all the bright pink parts to transparent when I read the video back.
I'm having trouble with both sides of the conversion, though. Perhaps there's a better approach entirely?
thanks, spencer
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
the help file of pix_write says that it takes a picture of the frame buffer, whereas I want to capture the current pix frame. I need to capture from a camera without displaying it to the screen. I'm looking into it, though, because I seem to be having lots of segfaults with pix_record, especially trying with more than one of them.
-spencer
On Fri, Aug 1, 2008 at 8:58 PM, Jack jack@rybn.org wrote:
You can use [pix_write]. ++
Jack
Le 2 août 08 à 02:25, Spencer Russell a écrit :
I'm mixing video by background subtracting it and then setting the background transparent (alpha = 0), then texturing each video onto overlapping rectangles to achieve a compositing effect.
I need to record the different videos with [pix_record] and then play them back later while preserving the alpha somehow, so I was thinking that I could just replace all the transparent part with bright pink or something and store it as regular photo jpeg frames, and then later set all the bright pink parts to transparent when I read the video back.
I'm having trouble with both sides of the conversion, though. Perhaps there's a better approach entirely?
thanks, spencer
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Shaders work well for this type of compositing. I don't think there is any need to store the alpha value in the video file.
On Fri, Aug 1, 2008 at 7:25 PM, Spencer Russell <spencer.f.russell@gmail.com
wrote:
I'm mixing video by background subtracting it and then setting the background transparent (alpha = 0), then texturing each video onto overlapping rectangles to achieve a compositing effect.
I need to record the different videos with [pix_record] and then play them back later while preserving the alpha somehow, so I was thinking that I could just replace all the transparent part with bright pink or something and store it as regular photo jpeg frames, and then later set all the bright pink parts to transparent when I read the video back.
I'm having trouble with both sides of the conversion, though. Perhaps there's a better approach entirely?
thanks, spencer
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list