User:Fizick/Internal filters
In AviSynth v2.5 a fourth color format is available besides RGB24, RGB32 and YUY2: YV12. See YV12 FAQ for more information. This color format is special, since video is stored as YV12 in many codecs (including MPEG4 and MPEG2 on DVDs). In AviSynth v2.6 several other planar color formats are available: YV24 (YUV 4:4:4), YV16 (YUV 4:2:2), YV411 (YUV: 4:1:1) and Y8 (greyscale). The available (internal) filters are listed here and divided into categories. A short description is added, including the supported color formats (and samples types) for the audio filters).
An alphabetical listing of the filters can be found here Category:Internal_filters.
Contents |
Media file filters
These filters are to read or write media files. Usually they produce a source clips for processing. See debug filters fo non-file source filters.
Filter | Description | Color format |
---|---|---|
AviSource / AviFileSource / OpenDMLSource | Opens an AVI file. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
DirectShowSource | Opens a filename using DirectShow. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
ImageReader / ImageSource | This filter produces a video clip by reading in still images. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
ImageWriter | Writes frames as images to your hard disk. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Import | Imports an AviSynth script into the current script. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
SegmentedAviSource / SegmentedDirectShowSource | This filter automatically loads up to 100 avi files per argument. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
WavSource | Opens a WAV file or the audio of an AVI file. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
SoundOut | SoundOut is a GUI driven sound output module for AviSynth (it exports audio to several compressors). | All audio. |
Color filters
These are to change clip color format or adjust frame colors (uniformly or with a mask).
Filter | Description | Color format |
---|---|---|
ColorKeyMask | Sets the alpha-channel (similar as Mask does) but generates it by comparing the color. | RGB32 |
ColorYUV | Adjusts colors and luma independently. | YUY2, Y8, YV411, YV12, YV16, YV24 |
ConvertBackToYUY2 | Converts a RGB clip back to YUY2. | RGB24, RGB32 |
ConvertToRGB | Converts to RGB32 unless clip is RGB24. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
ConvertToRGB24 / ConvertToRGB32 / ConvertToYUY2 / ConvertToY8 / ConvertToYV411 / ConvertToYV12 / ConvertToYV16 / ConvertToYV24 | Converts to RGB24 / RGB32 / YUY2 / Y8 / YV411 / YV12 / YV16 (planar version of YUY2) / YV24 (full YUV). | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
GreyScale | Converts a video to greyscale. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Invert | Inverts selected color channels of a video. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 ? |
Layer | Layering two videos. | RGB32, YUY2 |
Levels | The Levels filter scales and clamps the blacklevel and whitelevel and adjusts the gamma. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Limiter | A filter for clipping levels to within CCIR-601 range. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Mask | Applies an alpha-mask to a clip. | RGB32 |
MaskHS | This filter returns a mask (as Y8) of clip using a given hue and saturation range. | YUY2, Y8, YV411, YV12, YV16, YV24 |
MergeARGB / MergeRGB | This filter makes it possible to select and combine a color channel from each of the input videoclips. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
MergeChroma / MergeLuma | This filter makes it possible to merge chroma/luma from a videoclip into another. There is an optional weighing, so a percentage between the two clips can be specified. | YUY2, Y8, YV411, YV12, YV16, YV24 |
Merge | This filter makes it possible to merge both luma and chroma from a videoclip into another. There is an optional weighing, so a percentage between the two clips can be specified. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Overlay | Overlay puts two clips on top of eachother with an optional displacement of the overlaying image, and using different overlay methods. Furthermore opacity can be adjusted for the overlay clip. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
ResetMask | Applies an "all-opaque" alpha-mask to clip. | RGB32 |
RGBAdjust | Adjusts each color channel seperately. | RGB24, RGB32 |
ShowAlpha / ShowRed / ShowGreen / ShowBlue | Shows the selected channel of an (A)RGB clip. | RGB24, RGB32 |
SwapUV | Swaps chroma channels. | YUY2, Y8, YV411, YV12, YV16, YV24 ? |
Subtract | Produces an output clip in which every pixel is set according to the difference between the corresponding pixels. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16 (?), YV24 |
UToY / VToY | Copies chroma U/V plane to Y plane (image is now half as big) | YUY2, Y8, YV411, YV12, YV16, YV24 |
UToY8 / VToY8 | Shorthand for UToY.ConvertToY8 / VToY.ConvertToY8. | YUY2, YV411, YV12, YV16, YV24 |
YToUV | Puts the luma channels of the two clips as U and V channels. Image is now twice as big, and luma is 50% grey. Use MergeLuma, if you want to add luma values. | YUY2, YV12 ? |
Tweak | Adjusts the hue, saturation, brightness, and contrast. | YUY2, Y8, YV411, YV12, YV16, YV24 |
FixLuminance | Correct shifting vertical luma offset. | YUY2 |
Geometric filters
These filters are to change image size, process borders or make other deformation
Filter | Description | Color format |
---|---|---|
AddBorders | Adds black borders around the image. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Crop | Crops excess pixels off of each frame. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
CropBottom | Crops excess pixels off of the bottom of each frame. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Letterbox | Letterbox simply blackens out the top and the bottom and optionally left and right side of each frame. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
ReduceBy2 | Reduces the size of each frame by half. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
HorizontalReduceBy2 / VerticalReduceBy2 | Reduces the size of each frame by half horizontally/vertically. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
BicubicResize / BilinearResize / GaussResize / LanczosResize / Lanczos4Resize / PointResize / Spline16Resize / Spline36Resize | The resize filters rescale the input video frames to an arbitrary new resolution, using different sampling algorithms. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
FlipHorizontal / FlipVertical | Flips the video from left to right/upside-down. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
TurnLeft / TurnRight / Turn180 | Rotates the clip 90 degrees counterclock wise / 90 degrees clock wise. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
StackHorizontal / StackVertical | Takes two or more video clips and displays them together in left-to-right/up-to-down order. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Pixel filters
These filters are for image detail (pixel) restoration (like denoising, sharpening). Most such filters are implemented as a AviSynth external plugins with various advanced algorithmes of pixel processing.
Filter | Description | Color format |
---|---|---|
Blur / Sharpen | This a simple 3x3-kernel blurring/sharpening filter. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
GeneralConvolution | General 3x3 or 5x5 convolution matrix. | RGB32 |
SpatialSoften / TemporalSoften | Removes noise from a video clip by selectively blending pixels spatially/temporally. | YUY2 (SpatialSoften), Y8, YV411, YV12, YV16, YV24 |
FixBrokenChromaUpsampling | The free Canopus DV Codec v1.00 upsamples the chroma channels incorrectly (although newer non-free versions appear to work fine). FixBrokenChromaUpsampling filter compensates for it. | YUY2 |
Timeline editing filters
This filters are to arrange frames in a time (clip cutting, splicing and other editing).
Filter | Description | Color format |
---|---|---|
AlignedSplice / UnalignedSplice | Joins two or more video clips end to end. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
AssumeFPS / AssumeScaledFPS / ChangeFPS / ConvertFPS | Changes framerates in different ways. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
DeleteFrame | Deletes a single frame, given as an argument. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Dissolve | Like AlignedSplice, except that the clips are combined with some overlap. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
DuplicateFrame | Duplicates a single frame given as an argument. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
FadeIn0 / FadeIn / FadeIn2 / FadeOut0 / FadeOut / FadeOut2 / FadeIO0 / FadeIO / FadeIO2 | Causes the video stream to fade linearly to black at the start or end. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
FreezeFrame | Replaces all the frames between first-frame and last-frame with a selected frame. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Interleave | Interleaves frames from several clips on a frame-by-frame basis. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Loop | Loops the segment from start frame to end frame a given number of times. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Reverse | This filter makes a clip play in reverse. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
SelectEven / SelectOdd | Makes an output video stream using only the even/odd numbered frames. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
SelectEvery | Selects frames with a fixed period, it is a generalization of SelectEven and SelectOdd. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
SelectRangeEvery | Selects a range of frames with a fixed period. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Trim | Trims a video clip so that it includes only the frames first-frame through last-frame. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Interlace filters
These filters are for treating interlaced video. Currently (v2.5x and older versions), AviSynth has no interlaced flag which can be used for interlaced video. There is a field-based flag, but contrary to what you might expect, this flag is not related to interlaced video. In fact, all video (progressive or interlaced) is framebased, unless you use AviSynth filters to change that. There are two filters who turn framebased video into fieldbased video: SeparateFields and AssumeFieldBased. More information about field-based video can be found here (...).
Filter | Description | Color format |
---|---|---|
AssumeFrameBased / AssumeFieldBased | Forces frame-based or field-based material. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
AssumeBFF / AssumeTFF | Forces field order. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Bob | Bob takes a clip and bob-deinterlaces it. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
ComplementParity | Changes top fields to bottom fields and vice-versa. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
DoubleWeave | The filter operates like Weave, except that it produces double the number of frames by combining both the odd and even pairs of fields. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Pulldown | This filter simply selects two out of every five frames of the source video. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
SeparateFields | Takes a frame-based clip and splits each frame into its component top and bottom fields. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
SwapFields | Swaps the two fields in an interlaced frame. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Weave | Weave takes even pairs of fields from a Fields Separated input video clip and combines them together to produce interlaced frames. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
PeculiarBlend | This filter blends each frame with the following frame in a peculiar way. | YUY2 |
Audio filters
Prior to v2.5 the audio samples are converted to 16 bits when using one of these audio filters. Starting from v2.5 the audio samples will be automatically converted if any filters requires a special type of sample. This means that most filters will accept several types of input, but if a filter doesn't support the type of sample it is given, it will automatically convert the samples to something it supports. The internal formats supported in each filter is listed in the colorspace column. A specific sample type can be forced by using the ConvertAudio functions.
If the sample type is float, when AviSynth has to output the data, it will be converted to 16 bit, since float cannot be passed as valid AVI data.
Filter | Description | Sample type |
---|---|---|
Amplify / AmplifydB | Amplify multiply audio samples by amount. | 16Bit, Float |
AssumeSampleRate | Adjusts the playback speed of the audio. | All |
AudioDub / AudioDubEx | AudioDub takes the video stream from the first argument and the audio stream from the second argument and combines them. AudioDubEx is similar, but it doesn't throw an exception if both clips don't have a video or audio stream. | All |
ConvertAudioTo8bit / ConvertAudioTo16bit / ConvertAudioTo24bit / ConvertAudioTo32bit / ConvertAudioToFloat | Converts audio samples to 8/16/24/32/Float bits. | All |
ConvertToMono | Merges all audio channels. | 16Bit, Float |
DelayAudio | Delays the audio track by second seconds. | All |
EnsureVBRMP3Sync | Corrects out-of-sync mp3-AVI's, when seeking or trimming. | All |
GetChannel / GetLeftChannel / GetRightChannel | Returns an audio channel from a clip. | All |
KillAudio / KillVideo | Removes the audio from a clip completely. | All |
MergeChannels | Merges channels of two audio clips. | All |
MixAudio | Mixes audio from two clips. | 16Bit, Float |
MonoToStereo | Converts two mono signals to one stereo signal. | 16Bit, Float |
Normalize | Amplifies the entire waveform as much as possible, without clipping. | 16Bit, Float |
ResampleAudio | Performs a high-quality change of audio sample rate. | 16Bit |
SuperEQ | High quality 16 band sound equalizer. | Float |
SSRC | Very high quality samplerate conversion. | Float |
TimeStretch | This filter can change speed of the sound without changing the pitch, and change the pitch of a sound without changing the length of a sound. | Float |
Tone | This will generate sound. | Float |
Meta filters
These are special filters to control other filters execution.
Filter | Description | Color format |
---|---|---|
Animate / ApplyRange | Animate (ApplyRange) is a meta-filter which evaluates its parameter filter with continuously varying (the same) arguments. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 ? |
ConditionalFilter / FrameEvaluate / ScriptClip / ConditionalReader | ConditionalFilter returns source1 if some condition is met, otherwise it returns source2. ScriptClip returns the clip which is returned by the function evaluated on every frame. | YV12 ? |
TCPServer / TCPSource | This filter will enable you to send clips over your network. You can connect several clients to the same machine. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Debug filters
Filter | Description | Color format |
---|---|---|
BlankClip / Blackness | This filter produces a solid color, silent video clip of the specified length (in frames). | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
ColorBars | This filter produces a video clip containing SMPTE color bars scaled to any image size. | RGB32, YUY2, YV12 |
Compare | Compares two clips and prints out information about the differences. | RGB24, RGB32, YUY2 |
Histogram | Adds a histogram. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Info | Prints out image and sound information. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
MessageClip | Produces a clip containing a text message. | RGB32 |
ShowFiveVersions | Takes five video streams and combines them in a staggered arrangement from left to right. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16 (?), YV24 |
ShowFrameNumber / ShowSMPTE | Draws text on every frame indicating what number AviSynth thinks it is. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Subtitle | Adds a single line of anti-aliased text to a range of frames. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
WriteFile / WriteFileIf / WriteFileStart / WriteFileEnd | Output to a textfile. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 ? |
Version | Generates a video clip with a short version and copyright statement. | RGB24 |