Reading the Filter Reference
The rest of this guide will be devoted to providing a simple reference for various AviSynth filters, both internal and plugin based. This shouldn't be considered a replacement for the authoritative documentation that comes with AviSynth, although it does borrow heavily from it. However it may be a good starting point if you're looking to quickly figure out how to use common filters to do common tasks.
Filter SyntaxFor each filter discussed you'll see a line similar to this one:
SomeFilterName (clip[, string Somestring, float "Somefloat", int "Firstint" = 2, int "Secondint"], bool Somebool)When reading the filter definition pay attention to not just the text, but also the presentation.
With the exception of clips, all arguments are assigned both a variable type and name. The type may be string ("text"), int (integer), float (decimal), or bool (Boolean - True/False). Numeric arguments, including Boolean, shouldn't have quotes around their values. String arguments always need "quotes" around them.
string Somestring, float "Somefloat", int "Firstint" = 2, int "Secondint", bool Somebool
If the first argument listed is clip it generally has a default value of last and doesn't have to be specified in your script.
Arguments may be named, meaning argument_name = value must be used instead of just the value. This is noted by "quotes" around the argument name.
float "Somefloat", int "Firstint" = 2, int "Secondint"
A value listed for an argument indicates that it has a default. This value will be assigned if the argument is ommited from the filter.
int "Firstint" = 2
Arguments [in brackets] are optional.
[, string Somestring, float "Somefloat", int "Firstint" = 2, int "Secondint"]
Table of Options
In addition to the above notation, each filter description includes a tabular listing of the filter's options, with a brief description
|Clip||Clip||last||clip to be filtered|
|Somestring||String||Purpose/meaning of text string|
|"Somefloat"||Floating Point Decimal||Purpose/meaning of floating point decimal|
|"Firstint"||Integer||2||Purpose/meaning of First integer value|
|Somebool||Boolean||*||Purpose/meaning of Boolean decision|
The notation for named arguments is kept in order to keep things simple. Otherwise, details about arguments are laid out in columns.
DescriptionThe filter description will explain what the filter does, and how it's commonly used.
Example CodeOne or more examples using the filter within a script will be given.
Do something with this filter:
SomeRelatedFilter().SomeFilterName(Firstint = 3, true)
Do something else with this filter:
SomeFilterName("string", float = 1.1, Secondstring = 1, true)
When multiple filters are used, which is often necessary in order for an example to be useful, the filter being discussed will be bold to avoid confusion.
Do Something after another filter:
Do Something before another filter:
Do Something between other filters:
When To Use ItThe final text for each filter is a short discussion of when you should consider using the filter, and sometimes specific circumstances when you shouldn't.
Related SoftwareSome filters, particularly those from plugins, require (or at least benefit from) additional software. Although this guide won't give instructions for using other applications with AviSynth, where appropriate references and links to additional software will be given.
previousScripting Basics | nextOpening Sources
Written by: Rich Fiscus