AviSynth uses text scripts to carry out its video editing functions. These scripts are standard text files, but with one important difference:- The file extension must be changed from '.txt' to '.avs'.... Other than that, the scripts are identical to any other text file.
Many Avisynth scripts - like the one illustrated below - are only a few lines long.
For other tasks - like those for this 'slo-mo' project - the scripts are a bit more complex.. Fortunately, thanks to the experts who have already written them, we don't have to construct every script from scratch...'Copy and paste' can be very useful sometimes!..
The text in the window below shows a very simple AviSynth script, written to join two video clips together with a smooth 'dissolve' - and then add a 'fade in and out' at the start and finish of the clip....A pretty straightforward video editing requirement..
Looking in detail at that script...
The first line is just the title. (Any line of text that starts with '#' in AviSynth is ignored by the program. This feature is useful for writing comments).
The second line needs to have the 'full path name' of the video clip added between the brackets after 'AviSource'...
(You can find the 'full path name' of a video clip by right clicking on the file name while holding down the shift key...
...and then selecting 'copy as path' from the dropdown menu).
So the actual line of this script might look something like this -
v1=Avisource("C:\Videos\holiday\firstclip.avi") ...and the next line like this -
v2=Avisource("C:\Videos\holiday\secondclip.avi")
The 4th line describes the timing of the 'dissolve' - Dissolve(v1, v2, 100) - and instructs AviSynth to join clips v1 and v2 together, with a 'dissolve' over a period of 2 seconds (100 frames in this example).
The final line - FadeIO(50) - is the AviSynth instruction to fade the video 'In' and 'Out' over 50 frames - (one second) - at the start and end of the new joined clip.
To download and save this script, just RIGHT click on the window, and select 'view frame source'.
Then RIGHT click again, and select 'save as'.... Save the '.txt' file...Rename it with a simpler title, and change the extension to '.avs'
To try this script out with your own videos, select a couple of suitable short clips to join from your collection, and convert them to HQX - (use the technique described in the 'Converting the Video' page)..
Add the full path names of the converted .avi files into the script - ( hold down the shift key.. right click.. and 'copy as path' ) - and then save the modified script as a .avs file.
To test out your new script, double left click on the .avs file to open it in AvsPmod.
(This assumes you have already associated .avs scripts with AvsPmod by clicking on 'Options - Associate .avs files with AsvP' - as recommended in the previous 'Installing AviSynth' page)
To run the script, click on the 'up facing' triangle icon in the extreme lower left of the window.This will display the first frame in your video in a new window. (In this example it will be a black frame). Then click on the 'right facing' triangle - located on the right of the transport control bar - to play the clip, edited to follow your AviSynth instructions... You can change the numbers in the script to vary the 'dissolve' or 'fade' timings..
In the event of a script error, AvsPmod will tell you where to look. Double check all the punctuation... the text in AviSynth scripts needs to be absolutely correct!
Once you've confirmed this all works OK, it's time to look at how to apply AviSynth to our 'slo-mo' project.
Click on the 'Editing the Slo-mo' heading below - or at the top of the page...