Google
 
   
Login
Username:

Password:


Lost Password?

Register now!
Search
Main Menu
service
top books
Polls
What do you think about php-deluxe.net?
Excellent!
Cool
Hmm..not bad
What the hell is this?
encyclopedia
recommendation
Freenet DSL
Who's Online
15 user(s) are online (12 user(s) are browsing encyclopedia)

Members: 0
Guests: 15

more...
partner

AviSynth

AviSynth is a frameserver program for Microsoft Windows developed by Ben Rudiak-Gould, Edwin van Eggelen, Klaus Post, Richard Berg and others. It is free software under GNU GPL license.

AviSynth acts as a video editing software (without a Graphical user interface) controlled entirely by Script (computer programming). It stands as an intermediary between a digital video source, like an AVI or MPEG, and a receiving program, which is typically a media player, video editing software, or an encoder.

AviSynth communicates with any program that supports AVIs by acting as a fake AVI file. It can apply a large variety of editing and processing functions (called filters) to a video stream before passing along the results as if it were a legitimate file being read. Filter capabilities include trimming, cropping, deinterlacing, inverse telecine, loading and splicing still images, doing color corrections, Noise (physics), and many other things.

Technically, it acts as a . A plugin list is maintained at [http://www.AviSynth.org/warpenterprises/ AviSynth Filter Collection].

AviSynth filters work in several color spaces including RGB, YUV and YUV. This is necessary to allow all kinds of video input and output. Also, certain functions only work on certain colour spaces, making conversion mandatory.

For example, say the script myAvi.avs (just a plain text-file saved with the extension avs ) contains the following:

AviSource( myAvi.avi ) Crop(0, 0, 320, 240) Blur(0.1)

This script file can be opened in most media players (such as Windows Media Player). The program will play the video file myAvi.avi trimmed down to precisely 320 pixels by 240 pixels and blurred by a small amount. Operations occur in sequential order, so the Cropping occurs first, then the Blurring.

=Programs that work with AviSynth=

In addition, several programs have now been created which accept only AviSynth scripts as input - thereby simplifying the program itself but giving users the full power of AviSynth for input.

=AviSynth Scripting Language=

The scripting language is a powerful programming language in its own right, containing many features familiar to programmers, including Variables, distinct Datatypes, conditionals, and complex Expression (programming).

The language deals primarily with videos, as a primitive data type. A typical script loads a video as input, applies processing to it, and then returns that video in the same way functions return values. The returned video is the output of the script, which is seen as the video by the program running the script.

The language also has several other more standard data types, including int, float, bool and string. These can be used to perform calculations, decisions, and write text such as subtitles to the video.

The processing work is largely done by functions or filters (the two terms are interchangeable). The programmer can pass arguments to one of many built-in functions, and a value may be returned. Also, many functions take a video stream as an argument, and make changes to this stream.

Programmers may be unaware that they are constantly passing video streams into functions, since convention suggests that the video is not explicitly passed. If no video is passed into a function, it simply takes the last video used.

Additional functions/filters are available through Plugins. The use of plugins is encouraged to extend the capabilities of AviSynth. (See AviSynth Filter Collection link for a list of plugins).

== Hello World example==

This example is a Hello world program - it simply creates a video containing the words Hello, world! . BlankClip() Subtitle( Hello, world! ) The BlankClip function is necessary to create a new video, before having a subtitle displayed on top of it. The brackets at the end of the word are optional, since no arguments are being passed, but are given in this case to indicate it is a function and not a variable.

The Subtitle function draws the words Hello, world! on top of the previously-created blank video.

Although the BlankClip and Subtitle functions both accept many more arguments (for example, controlling the size and length of the video, and the positioning, font, and colour of the subtitle), this example leaves them out, so AviSynth simply uses its built-in defaults.

If the above text is entered into a .avs file, it can be opened in Windows Media Player or any of the other programs in the list above, and a video containing the text will be displayed.

==Simple video-processing example==

This example takes an actual video, applies some simple processing, and returns it to the output. AviSource( C:Example.avi ) ReduceBy2() GreyScale() The AviSource function is used to load a video from a real location. The DirectShowSource function could also be used. ReduceBy2 divides the vertical and horizontal size of the video in half, and GreyScale forces the video to grayscale colours.

Again, the above script can be entered into a .avs file and opened in a video player or editor. Assuming C:Example.avi exists, it will play a copy of that file, except that it will be half the size and grayscale.

=AviSynth 3.0=

AviSynth 3.0 is a complete rewrite of AviSynth 2.5 and is still in development. It aims at overcoming limitations of AviSynth 2.x and editing and processing videos in a non-linear manner. It is being developed to offer more powerful frameserving capabilities through improvements such as an abstracted Color space model, in which new color spaces can be supported through a plug-in mechanism, better cache management for better performance, and a more powerful scripting language. Since AviSynth 3 does not rely on Video for Windows it will be available for Windows and Gnu/Linux.

=External links=

  • [http://www.avisynth.org AviSynth home page]
  • [http://www.avisynth.org/warpenterprises/ AviSynth Filter Collection]
  • [http://www.avisynth.org/index.phppage=AviSynthManual AviSynth scripting language]
  • [http://forum.doom9.org/forumdisplay.phps=&forumid=67 Doom9 s AviSynth Forums]
  • [http://avisynth3.unite-video.com/ AviSynth 3.0 development homepage]
  • [http://www.avisynth.org/AviSynth30 AviSynth 3 FAQ]