PDA

View Full Version : How to apply different filters to frame ranges?


3ngel
10th March 2006, 23:42
Hi to all,
I have, say, 100 frames, and i would like to apply certain filters to first 50 and other filters to the other 50.
Someting like:

------------
Avisource("nnn.avi")
if framecount <= 50 then
{
FirstFilters()
}

if framecount >50 then
{
SecondFilters()
}
------------

How can i translate this into avisynth script?

Thank you.

dimzon
10th March 2006, 23:51
Avisource("nnn.avi")
trim(0,50).FirstFilters() + trim(51,999999999).SecondFilters()

3ngel
10th March 2006, 23:59
I see, thank you.

I've seen the trim command in the Avs docs, and

trim(51,999999999) can be translated to

trim(51,0) where 0 in the second parameter means "end of clip".

stickboy
11th March 2006, 07:12
Alternatively you could use ApplyRange.

Scintilla
11th March 2006, 20:08
Or Corran's SceneAdjust (http://www.amvwiki.org/index.php/SceneAdjust) (server currently down).

ArabianSwan
12th March 2006, 20:24
YATTA!! made it easy to do that :p