First script
m (1 revision) |
Revision as of 16:01, 9 May 2013
First download and install AviSynth . Let's start with the most basic of AviSynth scripts:
AviSource("c:\folder\myclip.avi")
Open up any text editor, type the above on the first line (using any AVI file on your machine as "myclip.avi"), and save it as "myclip.avs". You now have a script that can be opened by most AVI players in your machine: MS Windows Media Player 6.4 (aka "mplayer2.exe") will play the script; so will VirtualDubMod or plain VirtualDub or several others. So far as they care, your text document is an AVI file.
An even simpler script would be
Version()
Which just displays the current version of avisynth.
There are several different source types, and each means something unique. For instance, you cannot open an MPEG file with AviSource because it's not an AVI file. For MPEG files you could use DirectShowSource, so you would write:
DirectShowSource("c:\folder\myclip.mpg", fps=25)
But it would be better to use DGDecode for importing MPEG files.
This process is explained in greater detail in these pages: AVISource, DirectShowSource, AviFileSource, OpenDmlSource
Once you get the hang of using a frameserver, it's time to do something more interesting than just spit out the same old video! To begin, introduce yourself to filters or head straight to the AviSynth manual itself.
More examples can be found here: Script examples.