Avisynth - An Introduction

By Alan O (aka Hitthebongo)

www.hitthebongo.co.uk

Introduction

While video editing programs like movie Maker provide an easy way to perform and customize a whole range of effects, there are a few areas where it falls on it's face. For instance, trying to arrange several videos in to a grid (sometimes known as the Brady Bunch Effect) is notoriously difficult due to the lack of multiple video tracks. While I am sure that Microsoft did the right thing keeping things simple in Movie Maker with only one video track, it should be acknowledged that it has its limitations. Fortunately some of the tasks it struggles with are handled exceedingly well with the free application Avisynth

At this pont it would prove useful to take a quote from the Avisynth mediawiki page:

AviSynth is a powerful tool for video post-production. It provides almost unlimited ways of editing and processing videos. AviSynth works as a frameserver, providing instant editing without the need for temporary files.AviSynth itself does not provide a graphical user interface (GUI) but instead relies on a script system that allows advanced non-linear editing. While this may at first seem tedious and unintuitive, it is remarkably powerful and is a very good way to manage projects in a precise, consistent, and reproducible manner. Because text-based scripts are human readable, projects are inherently self-documenting. The scripting language is simple yet powerful, and complex filters can be created from basic operations to develop a sophisticated palette of useful and unique effects.

 

So what can Avisynth do for your own movie projects? Check out the video below for a few ideas on what can be achieved with a folder full of media and some very well worded scripts.

Please read on if you'd like a crack at Avisynth yourself. I'm in no way going to provide a tutorial on script making as I'm still at the novice stage myself. I am however more than happy to share a few tips to help guide the uninitiated on how to turn an avisynth project in to a nice n' shiny video file. In this guide I will make available a sample project folder containing a couple of scripts and media to use for test purposes.

Prerequisites

  1. Avisynth must firstly be installed. It may be downloaded from www.free-codecs.com
  2. An application is required that we can feed the aviscript file in to, which in turn will create a video file. There are several that offer direct support and are listed below. One I use more than any other is Nic's WM9 Encoder. This tiny application has only one function in life which is to chew on aviscripts and then spit out some very tasty wmv files. For the purpose of this guide I will be restricting my references to just this Encoder. If you wish to consider other applications that are Avisynth friendly - here are a few I know of:

Nics WM9 Encoder (Highly recommended)
Virtualdub
(Highly recommended)
Super Converter
Wax
QEnc MPEG Encoder

Please note - while the above explicitly state that aviscripts may be imported, there are many other applications that will also import them if you force the application in to looking for ALL file types. Windows Media Encoder 9 is one such example.

  1. It is very useful to be able to preview a script before the process of encoding begins as it will highlight script errors straight away. Installed alongside recent versions of Windows Media Player ( 9/10/11) should be an old legacy version (6.4) of the player. This can be found by clicking on the mplayer2.exe executable located in the following folder: C:\Program Files\Windows Media Player. This player views scripts in a fast and efficient manner by simply dragging one in to the main player window.

wmp 6.4

Windows Media Player 6.4

Alternatively you might consider Media Player Classic . Many people prefer this simple player over the bloated mass that is WMP 09/10/11

Note - If an aviscript does not playback in wmp6.4, it may be due to a missing YUV12 filter which is required to display Avisynth scripts. The Helix YUV Decoder is one solution that works fine for me.

  1. It is nice to have a way to view and edit the scripts. Microsofts own text editor Notepad provides one method. A much more useful alternative however comes in the form of the all singing and all dancing AvsP. This comes highly recommended

Avsp Editor

AvsP

  1. Finally, for the purposes of this introduction, please download the zipped folder below which is a very simple Avisynth project folder. It contains 2 scripts and a small wmv video clip for test purposes.It is good practice to unzip/extract the zipped file in to an empty folder

DOWNLOAD

 

Script Preview

Once you have Avisynth installed and an Avisynth project folder to play with it's time to put Avisynth to the test. In the project folder that was downloaded , locate the script titled VERSION.avs and drag it in to the main window of WMP 6.4. You should now see the player displaying the version info of the Avisynth installation.

Avisynth version info

Avisynth Version Info

Next locate the other script in the project folder titled Test.avs and preview in exactly the same manner by dragging in to wmp6.4. You should now see the test video displayed as a 2x2 video with coloured filter effects (If you don't see the video and get an error message with either script, you may need to install the Helix YUV Decoder or an alternative)

So far so good - hopefully!. It's now time to get on with rendering the movie. For creating high quality wmv's I would highly recommend using Nic's WM9 Encoder

Encoding using Nic's Encoder .

Nic's Encoder

Nic's Windows Media Encoder

To configure Nic's Encoder to create high quality wmv's which may be imported in to Movie Maker, try the settings above.Please take note of the following however:

Once all settings have been made simply select Encode and wait while the video is created!

If that has given you a taste for Avisynth you may wish to check out some of the scripts I've been putting together to help show off some of the funky stuff that is achieveables. All these can be found on My Avisynth Projects page on www.hitthebongo.co.uk (To be added soon !)

 

Got To Hitthebongos Main Avisynth Page

 

 

Originally posted 11 May 2007...Last updated 11 May 2007