Troubleshooting

Contents

1 Installation problems
2 Other problems
2.1 Write Simple
2.2 Always check parameters
2.3 Test scripts using Virtualdub
2.4 Go through the script step by step
2.5 Check your autoloadin plugin directory for files
2.6 Use conservative image sizes
2.7 Finally check the AviSynth Q&A
2.8 Reporting bugs / Asking for help

Installation problems

If you got problems getting AviSynth to work at all, try the following script:

Version()

and open it in Windows Media Player 6.4 (it is a file "mplayer2.exe" located in "C:\Program Files\Windows Media Player", other versions of WMP will not work). If you see a video with a message with Avisynth version and Copyright, then it is installed properly.

If that doesn't work, you can try the following:

Other problems

Creating scripts with AviSynth is not always easy, and sometimes AviSynth produces very strange results. This is a little guide to help you figure out the most common errors.

Write Simple

If AviSynth produces strange results, try simplifying your script. Try splitting up your script into as many lines as possible. This will help you identify your problem. For example:

video = AviSource("file23.avi").ConvertToYUY2().Trim(539,8534)
return AudioDub(Blur(video,1.5).Reduceby2().Bilinearrresize(512,384),Wavsource("file23.wav").AmplifyDB(4.5)

is not as readable as

AviSource("file23.avi")
ConvertToYUY2()
Trim(539, 8534)
Blur(video, 1.5)
Reduceby2()
Bilinearrresize(512, 384)
AudioDub(Wavsource("file23.wav"))
AmplifyDB(4.5)

Furthermore it has the advantage, that you easier be able to:

Always check parameters

If you have a filter that gives you unexpected results, try using it with the simplest parameters. Always check the internal filters either on AviSynth homepage or in the documentation that came along with your AviSynth.

Be sure you use the same type of parameters as the ones described in the documentation. The most common error in this case is related to the first parameter in all filters, "clip". Be sure you understand how "implicit last" works. If you do not have a "last clip", most filters will fail with an "Invalid parameter" error.

"Filter does not return a clip" is reported if the output of your last filter is put into a variable, and there isn't any "last clip". For instance:

video = AviSource("file.avi")
audio = WavSource("file.wav")
combined = AudioDub(video, audio)

will fail. This can be solved by:

video = AviSource("file.avi")
audio = WavSource("file.wav")
AudioDub(video, audio)

where 'last' now contains a clip, or:

video = AviSource("file.avi")
audio = WavSource("file.wav")
combined = AudioDub(video, audio)
return combined

where the variable is returned, or even:

video = AviSource("file.avi")
audio = WavSource("file.wav")
return AudioDub(video, audio)

Test scripts using Virtualdub

Always use Virtualdub or even better VirtualDubMod to test your scripts. This is what all AviSynth functionality is tested against (by its developers). AviSynth does of course work with other programs, but if you get errors in other applications it's most likely not an AviSynth problem, but a limitation within the software you are using.

These limitations are mostly linked to:

Go through the script step by step

As mentioned in "Write Simple" it is always a good thing to test every step of your script, if there are problems.

You can comment out a filter (filters) by placing a '#' in front of the line (or before filter). That way it (and all rest of the line) will be ignored by AviSynth.

You can put in a "return last" or "return myvariable" any place in the script.

At any place in the script you can add the Info() filter to get information about the image and sound at the current stage of the filtering.

Check your autoloading plugin directory for a files

Plugins autoloading usually works fine, but you must NOT put here:

You must also remember, that all AVSI files in your plugin-directory are automatically included in your script. This is a feature, to allow you to include your own (or borrowed) functions, without have to copy/paste them into every script.

Notes. In old AviSynth versions (up to 2.0.7) all AVS files in your plugin-directory were automatically included in your script. This also means that if you copy any sample scripts into your plugin directory they will always be included, and may generate errors (in old versions!).

In general, any AVSI (early AVS) file whose commands are not wrapped into functions will be problematic.

All other file formats besides AVSI and DLL files are ignored, so you can safely leave your documentation there.

How to empty plugin dir? Simply create some subfolder (e.g. "hide") and move all (or some) files there.

Remember some files (DirectShowSource.dll, TCPDeliver.dll plugins, ColorRGB.avsi) are part of AviSynth (since v2.56).

Use conservative image sizes

If you have problems with distorted images, try using conservative frame sizes. That means, use sizes, where height and width are always divisible by 16. Using image sizes that are not divisible by 2 is in many cases problematic, and should always be avoided.

If you do however find that there is a problem with certain sizes of images, please submit a bug-report. See below how to do that.

Finally check the AviSynth Q&A

If you still got problems (loading scripts in certain encoders, or colorspace errors) have a look at the AviSynth Q&A, especially Q2.4: Problems when Encoder X reads AVS-files ? Be also sure to check Q1.4: What are the main bugs in these versions ? in the FAQ.

Reporting bugs / Asking for help

We will need many informations to be able to help you. If you don't supply us with that, there is a good chance that we won't be able to help you or locate the error.

Be sure to always include:

Bug reports should be submitted at the SourceForge Project page. Be sure to check if there is already a bug summitted similar to yours - there might just be. Errors in external plugins shouldn't be reported here, but to the author of the filter.

A very good place to get help is the Doom9 Forums. Be sure to search the forum before asking questions. Many topics have been covered there! - Then enter into the discussion.

$Date: 2007/12/15 09:52:51 $