Maybe it was just a typo, but try this: ... base=Lanczos3Resize(512,384) overlay=levels(base,0,1,255,254,255) mask_clip=levels(greyscale(base),10,1,11,255,0) clip=Mask(overlay,mask_clip) clip.layer(overlay,"add",255,0,0,0)
I have struggled some fights with "layer", too ... Lately, with another fresh attempt, it ran "out-of-the-box", without any problems. I was using the latest AviSynth 2.05+ (19092002, if I remember right). The latest snapshot can always be found here:
I installed the latest avisynth 2.05+ after first uninstalling the old one with the supplied uninstaller, put new avisynth.dll into system32 folder and ran install.exe - version still gives 2.0.5 22aug2002 - is this right as i know that new/development builds sometimes have the old 'version' infomation in them. But still no luck, still as described as above:confused:
--------------------- Без музыки жизнь была бы заблуждением.Ницше, Сумерки богов
Hi again. I did use ConvertToRGB32() -(imediately after telecide in my first post). I just tried - return messageclip(string(isrgb(overlay))) as the last line in my script and it came back 'true' unfortuneatly there is no 'isrgb32()' command. Still very foxed:confused: :confused: :confused:
I've had another (terrifying!) thought. The mask_clip in MASK(clip,mask_clip) must also be in rgb32 format or else you get an error 'souces must be in rgb32'. Now what is the effect of the alpha channel of mask_clip on itself? This is the start of an infinite regress nightmare!!!! I would have thought that the format of mask_clip should be straight rgb24 as it is essentially on or off. Am i being silly now?:)
:stupid: :stupid: Sorry for wasting everyones time, i've solved my problem!!! converttoyuy2() Telecide(blend=false) ConvertToRGB32() crop(4,4,360,568) base=Lanczos3Resize(512,384) overlay=levels(base,0,1,255,254,255) overlay=resetmask(overlay) mask_clip=levels(greyscale(base),10,1,11,255,0) overlay_clip=Mask(overlay,mask_clip) final=layer(base,overlay_clip,"add",255,0,0,0) return final seems that you can't have mast(clip,maskclip) but must have clip=mast(clip,maskclip) Like Wilbert suggested! Although it works in my original script (can't get my head around expression.function.whatever!!) Phew!
The main error of the first clip is that: Layer(base_clip, overlay_clip, string "op", int "level", int "x", int "y", int "threshold", bool "use_chroma") overlay is the SECOND argument and this is the clip from which the mask is evaluated. And for understanding don't use the implicit Last variable, at least don't use it with functions with 2 clip args. As you saw: Mask(clip, maskclip) is Last = Mask(clip, maskclip) !!