Log in

View Full Version : Overlay with video where mask is grayscale video


mariasx
12th September 2012, 16:25
Is it possible to overlay video with mask in grayscale?

I have not working code:

clip1 = AviSource("d:\Dropbox\video\under.avi")
clip2 = AviSource("d:\Dropbox\video\over.avi")
maskclip=AviSource("d:\Dropbox\video\mask.avi").ConvertToRGB32
Overlay(clip1, clip2, mask=ShowAlpha(maskclip))

Thanks a lot

Gavino
12th September 2012, 18:04
If mask.avi is not already RGB32, then ConvertToRGB32 will simply add an all-black alpha layer.

Probably what you want is simply:
clip1 = AviSource("d:\Dropbox\video\under.avi")
clip2 = AviSource("d:\Dropbox\video\over.avi")
maskclip=AviSource("d:\Dropbox\video\mask.avi")
Overlay(clip1, clip2, mask=maskclip)

mariasx
13th September 2012, 10:34
I re-encoded maskclip with Virtual Dub using (Uncompressed RGB/YCbCr) and now it works great.

Thanks a lot, you are my personal hero :-)