mf
30th September 2003, 21:51
I'm having some weird problem along with Molloy. He asked me about a script, and we've been testing some stuff, and I came to the conclusion somewhere, something is wrong (no ****, sherlock :D).
Now let's first make this clear:
1) YDifferenceFromPrevious() has a clip as its first parameter, right?
2) YDifferenceFromPrevious() returns a numeric value, right?
3) If I do condition1 = (numeric_var > numeric_value), then condition1 is a boolean, and without any syntax errors, right?
Now if 1), 2) and 3) are correct, this should work:
AVISource("file.avi")
blargh = last
condition1 = (YDifferenceFromPrevious(blargh) > 42.0)
condition2 = (UDifferenceFromPrevious(blargh) > 60.0)
ScriptClip(blargh, "(condition1 && condition2) ? Blackness(blargh) : blargh")
But, it doesn't. (Invalid Arguments to function YDifferenceFromPrevious)
This does work:
AVISource("file.avi")
blargh = last
condition1 = IsClip(blargh)
condition2 = IsBool(condition1)
ScriptClip(blargh, "(condition1 && condition2) ? Blackness(blargh) : blargh")
Proving me that at least my last line is correct. And making me doubt about points 1), 2) and 3). So, am I doing something wrong or is there some weird bug in AVISynth?
Now let's first make this clear:
1) YDifferenceFromPrevious() has a clip as its first parameter, right?
2) YDifferenceFromPrevious() returns a numeric value, right?
3) If I do condition1 = (numeric_var > numeric_value), then condition1 is a boolean, and without any syntax errors, right?
Now if 1), 2) and 3) are correct, this should work:
AVISource("file.avi")
blargh = last
condition1 = (YDifferenceFromPrevious(blargh) > 42.0)
condition2 = (UDifferenceFromPrevious(blargh) > 60.0)
ScriptClip(blargh, "(condition1 && condition2) ? Blackness(blargh) : blargh")
But, it doesn't. (Invalid Arguments to function YDifferenceFromPrevious)
This does work:
AVISource("file.avi")
blargh = last
condition1 = IsClip(blargh)
condition2 = IsBool(condition1)
ScriptClip(blargh, "(condition1 && condition2) ? Blackness(blargh) : blargh")
Proving me that at least my last line is correct. And making me doubt about points 1), 2) and 3). So, am I doing something wrong or is there some weird bug in AVISynth?