Log in

View Full Version : ApplyRange and PixieDust weirdness


DoW
21st September 2003, 01:33
Im trying to use Applyrange and pixiedust together to use pixiedust on only certain frame ranges, like so:
ApplyRange(0, 252, "Pixiedust", 6)
I want it to apply pixiedust(6) to only those frames. It has a fit though. Say you have frames 1, 2, 3, 4, and 5. It outputs 1 fine, 2, 3, and 4 come out black, and 5 is outputted fine, and so on. The weird thing is that
TitleScreen = Trim(0,252).PixieDust(6)
Works absolutely fine. I have no idea what the issue is, and Im tearing my hair out. If anyone can figure out what is going on, and suggest a solution, I would be eternally grateful.

Didée
21st September 2003, 02:19
I think that is because of
1) How ApplyRange internally works
2) The fact that all DUST filters may be called only *once* in a filterchain.

Solution: same as in your other thread: Wrapper function, sort of.
You define a stand-alone clip with PixieDust applied, and then call your self-made ApplyRange:

dusted=PixieDust(6)

function UseDustOn( clip c, int start, int end ) {
begin=c.trim(0,start-1)
filtered=dusted.trim(start,end)
end=c.trim(end+1,0)
return(begin+filtered+end) }

...
[other filters]
...
UseDustOn(from,to)should do it. But instead of trim, use stickboys trim2 (http://www.avisynth.org/~stickboy/).

DoW
21st September 2003, 04:41
Hmmm. Tried it, and got all sorts of Invalid Args to PixieDust errors. I have no idea why this works:
TitleScreen = Trim(0,252).PixieDust(6)
Fade = Trim(253,280).TemporalSoften(3,3,8,mode=2)
Fight = Trim(281,6857).PixieDust(6)
Fade2 = Trim(6858,6899).TemporalSoften(3,3,8,mode=2)
Drink = Trim(6900,14374).PixieDust(6)
Fade3 = Trim(14375,14423).TemporalSoften(3,3,8,mode=2)
.
.
.
last = blah...
If it can only be called once. I may try Stickboys ApplyRange and see if that helps.

Update:Stickboys ApplyRange did the trick, thanks for your help