Log in

View Full Version : AviSynth Overlay filter bleedthru problems


grannyGeek
5th September 2006, 06:40
I searched, and haven't been able to find this problem addressed .

I'm trying to use the Overlay filter with a simple black and white mask.
After I set my aviSource named variables, the script is simply something like this:
Overlay(clipMain, clipOver, mask=clipMask)
I'm using the script in VirtualDubMod / VirtualDubMpeg2.

I am getting bleed-through, the black portion of the mask is not 100% effective.

for example, if the overlaid clip is a video clip, the area that should be masked off is showing through at about 25% opacity (like a film photo double-exposure, if anyone else is old enough to remember those)

If the overlaid clip is a solid color, the color very slightly tints the main video clip - white brightens it a bit, black darkens it a bit, gray gives a slight de-saturization effect, and actual colors tint it very slightly, so a pink background adds a pink cast to the video.

I can see possiblities to use this to my advantage in some future project, but for now, can anyone advise me how to use Overlay and get the mask to actually block the unwanted color/video?

thanks for any input ---
granny

IanB
5th September 2006, 07:39
The mask clip needs to be 0-255 PC range not 16-235 TV range.

grannyGeek
5th September 2006, 08:33
IanB, thank you for the fast response!

I will fix my mask clips to comply

( did I miss this information in the AviSynth documentation?
If so, my apologies for not checking more carefully.)


thanks again =
granny

foxyshadis
5th September 2006, 08:42
Loading a bitmap in with imagesource and using converttoyv12/yuy2 will convert it to 16-235, unless you use (matrix="PC.601") or "PC.709".

Otherwise, you can always do a hard threshold, like Levels(127,1,129,0,255,coring=false).

grannyGeek
15th September 2006, 08:09
foxyshadis, thank you for your assistance.

I'm so sorry not to acknowledge your post earlier!
(I got no notification of your post, and haven't checked this thread in a while) :o

My masks are working correctly now, thanks to you folks.