View Full Version : Processing in segments (Avisynth)
HarryM
19th May 2002, 16:51
Hi,
I need something doodad...
...
Section(0, 4587)
DeinterlaceField(blend=false) #use only for frames 0-4587
...
EndSection
Section(4588, 158702)
...
EndSection
ReduceBy2
I need deinterlace only first 4588 frames (e.g.).
Can I anyway put into AVS script frame-section processing?
Can I combine more AVS script into single?
Acaila
19th May 2002, 17:02
Sure you can, with the Trim function.
Example:
Source=AviSource("stuff.avi")
Part1=Trim(Source,0,4587).Deinterlace()
Part2=Trim(Source,4588,158702).Whatever()
NewSource=Part1+Part2
NewSource.ReduceBy2
Return NewSource
It can probably be written cleaner that this :)
dividee
19th May 2002, 17:15
You haven't done you homework. In the Q&A there are links to avisynth docs.
The function you're looking for is Trim.
Something like that:
LoadPlugin(...)
mpeg2source(...)
sect1=Trim(0,4587)
sect1=FieldDeinterlace(sect1,blend=false)
sect2=Trim(4588,158702)
sect2=...
ReduceBy2(sect1+sect2)
...
But why use ReduceBy2 and FielDeinterlace together?
Yes can open an AVS in another AVS: AVISource("something.avs"), but it is rarely needed, if ever, since the scripting language is flexible enough. You also have the Import("something.avs"), which is similar to an #include in C (same result as a copy/paste of the other script in the current one).
[EDIT:] Acaila was faster than me :) But so you can see there are different possible syntaxes.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.