View Full Version : Fake layering - using a dummy clip + real, then unlayer
LB
9th February 2004, 08:34
I've wrote a script using various commands, and it also uses Conditionalfilter and ScriptClip. Now, I want to do all the analysis on only a portion of the video (the top and bottom) but not the center area of the video. I tried creating a black overlay clip using Blackness() and it worked great. But the problem was, after my analysis was finished, I was left with this clip with a black overlay obviously :p
So, how can I create a layer like this with a black image, do the analysis on the then visible portion of the video, then remove this the black layer, leaving me with the original video, but now filtered?
I just can't figure this one out.
sh0dan
9th February 2004, 09:26
Please post your current script.
LB
9th February 2004, 09:28
I do in fact need to cut and duplicate both T1 and T3, because after the first SC detection, it fails on using T3... :( So, how can I go about make the modifications to T1 and T3, and then spitting out T1 as my final display?
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Mpeg2Dec3.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\IT.dll")
T1 = Mpeg2Source("c:\Ep01.d2v", idct=5).IT(fps = 24, ref = "TOP", diMode = 2).ConvertToYV12()
T2 = Blackness(length=framecount(T1), width=720, height=440)
T3 = Overlay(T1, T2, x=0, y=20)
T1
global sc = 0
function SCCleaner(clip c, int frame, int frame_offset)
{
c = (sc == 0) ? c.DeleteFrame(frame).DuplicateFrame(frame-1).subtitle(string(frame)) : c
c = (sc == 1) ? c.DeleteFrame(frame).DuplicateFrame(frame+1).subtitle(string(frame)) : c
global sc = sc + 1
global sc = (sc == 2) ? 0 : sc
return c
}
frame_offset=0
last_frame = 0
Testclip = last
CleanedClip = ScriptClip("SCCleaner(testclip, current_frame, frame_offset)")
Conditionalfilter(testclip, CleanedClip, testclip, "frame_offset", ">", "-1", show = true)
FrameEvaluate("frame_offset = (YDifferenceToNext(T3) > 2) ? 1 : frame_offset")
FrameEvaluate("frame_offset = frame_offset - 1")
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.