AVISynthesizer Manual

Usage

Right-click on a media file in Explorer, and say "Send to | AVISynthesizer". A small window will pop up:

AVISynthesizer UI, simple version 

The list box shows the available Avisynth script templates by description. Pick one, and hit the Generate Script button. AVISynthesizer will spit out a script named after the first file name on the command line and the file name of the template you selected. If there is already a file by that name, a number will be appended.

For example, if you send foo.avi to AVISynthesizer and select the svcd.avst template ("Resize and remove noise for SVCD"), the generated script will be named foo--svcd.avs. If you did the same thing again, the next generated script would be named foo--svcd2.avs.

If you send more than one file to AVISynthesizer, another list appears to the right of the template list containing the file names you selected.

AVISynthesizer UI, full version 

The arrow buttons to the right of that list let you reorder the file list, thus affecting the order they're named in the generated Avisynth script. This feature is necessary because, in certain situations, Explorer passes the selected files to AVISynthesizer in an odd order. Rather than force users to Ctrl-Click each file individually to set the order, I added this feature.

Template Syntax

If you want to make your own templates, you need to know Avisynth's scripting language and the AVISynthesizer template rules:

    1. The script must contain a specially-formatted comment. See the example below for details.

    2. The first instance of the string %f is replaced with the file name given on the asynther.exe command line.

    3. If you put a section of the script in [square brackets], that section will be repeated once for each file name passed on the command line. Within that repeating section, the %f is replaced with a file name from the command line, and a plus sign is placed between each repeated script section.

    4. The template must be placed in a subdirectory called template underneath the directory where you put asynther.exe. Each template file must end in .avst.

The effect of these rules is clearer with an example. Consider this simple AVISynthesizer template, called simple.avst:

     #ASYNTHER Just a simple template
     [AVISource("%f")]
    

If you send foo to AVISynthesizer and select "Just a simple template" from the template list, it will generate an Avisynth script called foo--simple.avs:

     #ASYNTHER Just a simple template
     AVISource("foo")
    

If you then send foo and bar to AVISynthesizer, it will generate a file called foo--simple2.avs (the '2' is added because foo--simple.avs already exists from the previous run):

     #ASYNTHER Just a simple template
     AVISource("foo") + AVISource("bar")
    

Limitations

AVISynthesizer has several known limitations. None of these are necessarily permanent limitations: if you're trying to make AVISynthesizer do something that one of these limitations makes impossible, email me about it. If I agree that your task is in fact a good thing for AVISynthesizer to support, I'll probably fix the limitation.

    • If you set up a repeating section in a script template, there must be a %f somewhere within that repeating section.

    • The program only understands one repeating section per line. This includes both sequential and nested repeating sections. If there is more than one set of brackets on a line, it will use the outside-most pair.

    • The closing bracket for a repeating section must be on the same line as the opening bracket.

    • AVISynthesizer only replaces the first instance of %f on each line of the template. If you put more than one %f in the template on a single line, it will be ignored.

Hacking on AVISynthesizer

To rebuild asynther.exe, you will need Visual C++ 5.0 or later. You will also need a Windows 2000-aware copy of Microsoft's Platform SDK to build the program, as it relies on a new API that was added to Windows 2000. (I describe below how the program works on older platforms.)

After building the program, you can ask the program to install its Send To shortcut by running asynther.exe with the -i command line switch. If you are not using Windows 2000 or Windows XP, you will first need to run the shfolder.exe program that came with the package. This installs a compatibility DLL that lets AVISynthesizer call the new Windows 2000 API function yet still run on older OSes.

If for some unfortunate reason you want to manually uninstall the package, run asynther.exe with the -u switch.

If you're going to hack on AVISynthesizer, see the Wish List for feature ideas. Patches gratefully accepted. :)


Updated Sat Feb 25 2006 21:46 MST Go back to Videographica Go to my home page