View Full Version : Some way to apply a filter to a limited number of frames within a clip?
cobo
30th September 2006, 05:45
Is there some way I can specify to apply a filter to just a limited number of frames within a clip that I'm running through some other filters? There are 5 frames within a scene that are darker than the previous and subsequent frames. I'd like to try using tweak or coloryuv to lighten just those frames, but I don't know how to script it.
stickboy
30th September 2006, 08:07
Use ApplyRange if they're contiguous.
If they're scattered, you might want to try my RemapFrames (http://www.avisynth.org/stickboy/) plug-in. (See its documentation for examples.)
cobo
30th September 2006, 08:10
OK. I found ApplyRange here (http://www.avisynth.org/Animate).
When I added this to my script:
ApplyRange(1995,1999,"Tweak",bright=20)
I get:
Script error: ApplyRange does not have a named argument "bright"
I don't see what I'm doing wrong.
cobo
30th September 2006, 08:43
I find it works if I include values for all the "Tweak" float variables preceding and including the one I want changed from it's default in the order they're arranged in the Avisynth documentation without naming them. Like this:
ApplyRange(1995,1999,"Tweak",0,0,20,1)
With "ColorYUV" I had to include values for all the float variables including those that followed the one I wanted to change.
foxyshadis
30th September 2006, 12:58
Yes, ApplyRange is not great. Fortunately stickboy makes JDL_ApplyRange, which is much simpler, since you just include the call as you normally would. =D There's also JDL_ReplaceRange, which is just a different and somewhat more flexible way of doing it.
stickboy
30th September 2006, 19:57
I find it works if I include values for all the "Tweak" float variables preceding and including the one I want changed from it's default in the order they're arranged in the Avisynth documentation without naming them.Right, you can't use named arguments with ApplyRange/Animate. Since ApplyRange and Animate are ordinary functions, AviSynth's script parser has no way of knowing that the named argument corresponds to "Tweak" and not to ApplyRange itself.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.