Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
6th October 2013, 09:09 | #1 | Link |
Registered User
Join Date: Apr 2008
Location: California, USA
Posts: 127
|
Trouble with Overlay masking script
I want a circular section of "secondVideo" to replace the pixels of "firstVideo". Both videos are RGB32 and of the same size, speed and length. The mask is a white circle on a black background and has a 100 pixel diameter (which is smaller than the videos). Any advice as to what I am doing wrong?
Code:
maskimage = ImageSource("circle.png").ConvertToRGB32 maskVideo = firstVideo.blankclip.layer(maskimage, x=100, y=100) #to make the mask match the videos Overlay(firstVideo, secondVideo, mask=ShowAlpha(maskVideo), y=100, x=100, mode="blend", opacity=1) |
6th October 2013, 10:31 | #2 | Link |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Code:
maskimage = ImageSource("circle.png").ConvertToRGB32.ResetMask() maskVideo = firstVideo.blankclip.layer(maskimage, x=100, y=100) #to make the mask match the videos Layer(firstVideo, secondVideo.Mask(maskVideo)) # could also use: # Overlay(firstVideo, secondVideo, mask=maskVideo) |
Tags |
mask, opacity, overlay, script, showalpha |
|
|