PDA

View Full Version : conditionalfilter


jmac698
23rd February 2006, 06:18
Hi,
this is my first filter. I'm trying to duplicate decomb in script form, this is very rough but something like:
#decomb as a script
clip=avisource("test.avi")
weave=weave(clip)
bob=tdeint(clip)
conditionalfilter(weave,bob,weave,"IsCombed()","equals","true")

I'm not sure if conditialfilter works on every frame or I need frameevaluate somehow. I want to pick a frame from the weave or bob clips depending on iscombed. It's that simple.

Next question, how do I make it a function I can pass a clip to.
Next question, put iscombed into a variable because I need to work on two clips at once.
I want to return frames from weave1 and weave2, or bob1 and bob2, which will get merged later.

thx

MOmonster
3rd March 2006, 09:56
I donīt really understand the reason for this function. Using tdeint as postprocessor after a weaving is no problem. Also your function doesnīt simulate decomb, itīs just something like tdeint(full=false).
If you want to put your script into a function you can do it this way:
function decombscript(clip "deint", clip "weaved")
{
clipre = conditionalfilter(weaved,deint,weaved,"IsCombed()","equals","true")
return(clipre)
}
(not tested) And then you use the function this way:
clip=avisource("test.avi")

decombscript(weaved=weave(clip), deint=tdeint(clip)) I marked the important things of the function. I hope this helps you.

Edit:
I like scriptclip more for this conditional decissions because the more possibilities:conditionalfilter(weaved,deint,weaved,"IsCombed()","equals","true")
is similar to:
scriptclip(last, "iscombed(weaved)==true ? deint : weaved")