Internal filters

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
m (tweak appearance)
(Undo (error))
Line 1: Line 1:
<div style="max-width:82em; min-width:42em;" >
+
<div style="max-width:76em; min-width:48em">
{{AvsPlusHeader}}<div style="max-width:62em" >
+
The available (internal) filters are listed here and divided into categories. A short description is added, including the supported [[Color_spaces|color formats]] (and sample types for the audio filters). There are some functions which combine two or more clips in different ways. How the video content is calculated is described for each function, but [[filters_with_multiple_input_clips|here is a summary which explains which properties that the resulting clip will have]].
'''''All AVS+ color formats (pixel types)'''''
+
 
{|border=1 cellspacing=1 cellpadding=1 class="wikitable sortable"
+
An alphabetical listing of the internal filters can be found [[:Category:Internal_filters|here]].
! style="width:6em" | Group
+
 
! style="width:8em" | PixelType
+
=== Source filters ===
! style="width:6em" | [[#footnotes|FourCC{{BoldColor|black|140|¹}}]]
+
 
! style="width:6em" | [[#footnotes|Bit depth{{BoldColor|black|140|²}}]]
+
These filters can read media files and return an AviSynth clip. See [[#Debug_filters|debug filters]] for non-file source filters.
! [[#footnotes|Interleaved{{BoldColor|black|140|³}}]]
+
 
! style="width:4em" | Version
+
{| style="height:100px; width:95%" border="1" cellpadding="4" class="wikitable"
! style="width:12em" class="unsortable" | Remarks
+
!width=25%| Filter
 +
!width=50%| Description
 +
!width=15%| Color format
 +
|-
 +
| [[AviSource]] / [[AviFileSource]] / [[OpenDMLSource]]
 +
| Opens an AVI file.
 +
| [[#Color_formats|All]]
 
|-
 
|-
| RGB
+
| [[DirectShowSource]]
| RGB24
+
| Opens a filename using [[DirectShow]].
| style="padding-left:1em"  | <code>BGR[24]</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 8
+
| style="text-align:center" | x
+
| style="text-align:center" | {{AvsIcon2}}
+
+
 
|-
 
|-
| RGB 
+
| [[ImageReader]] / [[ImageSource]] / [[ImageSourceAnim]]
|  RGB48
+
| Reads in still or animated images. See [[#Export_filters|ImageWriter]].
| style="padding-left:1em"  | <code>BGR0</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 16
+
| style="text-align:center" | x
+
| style="text-align:center" | {{AvsPluscon2}}
+
|
+
 
|-
 
|-
| RGBA 
+
| [[Import]]
| RGB32
+
| Imports an AviSynth script into the current script.
| style="padding-left:1em"  | <code>BGRA</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 8
+
| style="text-align:center" | x
+
| style="text-align:center" | {{AvsIcon2}}
+
+
 
|-
 
|-
| RGBA
+
| [[SegmentedAviSource]] / [[SegmentedDirectShowSource]]
|  RGB64
+
| Loads up to 100 avi files per argument.
| style="padding-left:1em" | <code>BRA[64]</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 16
+
| style="text-align:center" | x
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| RGB 
+
| [[WavSource]]
| RGBP8
+
| Opens a WAV file or the audio of an AVI file.
| style="padding-left:1em" | <code>G3[0][8]</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 8
+
|}
|
+
 
| style="text-align:center" | {{AvsPluscon2}}
+
=== Color conversion and adjustment filters ===
| ''aka RGBP''
+
 
 +
These filters can be used to change the color format or adjust the colors of a clip.
 +
 
 +
{| style="height:100px; width:95%" border="1" cellpadding="4" class="wikitable"
 +
!width=25%| Filter
 +
!width=50%| Description
 +
!width=15%| Color format
 +
|-  
 +
| [[ColorYUV]]
 +
| Adjusts colors and luma independently.
 +
| [[#Color_formats|YUV]]
 
|-
 
|-
| RGB 
+
| [[ConvertBackToYUY2]]
|  RGBP10
+
| Converts a RGB clip back to YUY2.
| style="padding-left:1em" | <code>G3[0][10]</code>
+
| [[#Color_formats|RGB]]
| style="text-align:right;padding-right:3em" | 10
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| RGB 
+
| [[ConvertToRGB]]
|  RGBP12
+
| Converts to RGB32 unless clip is RGB24.
| style="padding-left:1em" | <code>G3[0][12]</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 12
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| RGB 
+
| [[ConvertToRGB24]] / [[ConvertToRGB32]] / [[ConvertToYUY2]] / [[ConvertToY8]] / [[ConvertToYV411]] / [[ConvertToYV12]] / [[ConvertToYV16]] / [[ConvertToYV24]]
|  RGBP14
+
| Converts to RGB24 / RGB32 / YUY2 / Y8 / YV411 / YV12 / YV16 (planar version of YUY2) / YV24 (full YUV).
| style="padding-left:1em" | <code>G3[0][14]</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 14
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| RGB 
+
| [[FixLuminance]]
|  RGBP16
+
| Correct shifting vertical luma offset.
| style="padding-left:1em" | <code>G3[0][16]</code>
+
| YUY2
| style="text-align:right;padding-right:3em" | 16
+
+
| style="text-align:center" | {{AvsPluscon2}}
+
|
+
 
|-
 
|-
| RGB 
+
| [[Greyscale]]/[[Grayscale]]
|  RGBPS
+
| Converts a video to greyscale (no color)
| style="padding-left:1em" | <code></code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 32
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
|
+
 
|-
 
|-
| RGBA 
+
| [[Invert]]
|  RGBAP8
+
| Inverts selected color channels of a video.
| style="padding-left:1em" | <code>G4[0][8]</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 8
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
|  ''aka RGBAP''
+
 
|-
 
|-
| RGBA 
+
| [[Levels]]
|  RGBAP10
+
| Scales and clamps the black and white levels, and adjusts the gamma.
| style="padding-left:1em" | <code>G4[0][10]</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 10
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| RGBA 
+
| [[Limiter]]
|  RGBAP12
+
| Clips levels to within CCIR-601 range, and optionally highlights pixels outside that range.
| style="padding-left:1em" | <code>G4[0][12]</code>
+
| [[#Color_formats|YUV]]
| style="text-align:right;padding-right:3em" | 12
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| RGBA 
+
| [[MergeARGB]] / [[MergeRGB]]
|  RGBAP14
+
| Select and combine a color channel from each of the input video clips.
| style="padding-left:1em" | <code></code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 14
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
|
+
 
|-
 
|-
| RGBA 
+
| [[MergeChroma]] / [[MergeLuma]]
|  RGBAP16
+
| Merge (blend) chroma or luma from one video clip into another. There is an optional weighting, so a percentage between the two clips can be specified.
| style="padding-left:1em" | <code>G4[0][16]</code>
+
| [[#Color_formats|YUV]]
| style="text-align:right;padding-right:3em" | 16
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| RGBA 
+
| [[RGBAdjust]]
| RGBAPS
+
| Adjusts each color channel separately.
| style="padding-left:1em" | <code></code>
+
| [[#Color_formats|RGB]]
| style="text-align:right;padding-right:3em" | 32
+
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| YUV444
+
| [[ShowAlpha]] / [[ShowRed]] / [[ShowGreen]] / [[ShowBlue]]
| YUV444P8
+
| Shows the selected channel of an (A)RGB clip.
| style="padding-left:1em" | <code>444P</code>
+
| [[#Color_formats|RGB]]
| style="text-align:right;padding-right:3em" | 8
+
|
+
| style="text-align:center" | {{AvsIcon2}} 
+
| ''aka YUV444, YV24''
+
 
|-
 
|-
| YUV444 
+
| [[SwapUV]]
|  YUV444P10
+
| Swaps chroma channels.
| style="padding-left:1em" | <code>Y3[0][10]</code>
+
| [[#Color_formats|YUV]]
| style="text-align:right;padding-right:3em" | 10
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| YUV444 
+
| [[Tweak]]
|  YUV444P12
+
| Adjusts the hue, saturation, brightness, and contrast.
| style="padding-left:1em" | <code>Y3[0][12]</code>
+
| [[#Color_formats|YUV]]
| style="text-align:right;padding-right:3em" | 12
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| YUV444 
+
| [[UToY]] / [[UToY8]] / [[VToY]] / [[VToY8]]
|  YUV444P14
+
| Copies U or V chroma plane to the Y luma plane.
| style="padding-left:1em" | <code>Y3[0][14]</code>
+
| [[#Color_formats|YUV]], except [[Y8]]
| style="text-align:right;padding-right:3em" | 14
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| YUV444 
+
| [[YToUV]]
| YUV444P16
+
| Puts the luma channels of two clips as U and V channels. Luma is now 50% grey.
| style="padding-left:1em" | <code>Y3[0][16]</code>
+
| [[#Color_formats|YUV]]
| style="text-align:right;padding-right:3em" | 16
+
|}
|
+
 
| style="text-align:center" | {{AvsPluscon2}}
+
=== Overlay and Mask filters ===
|
+
 
 +
These filters can be used to layer clips with or without using masks and to create masks.
 +
 
 +
{| style="height:100px; width:95%" border="1" cellpadding="4" class="wikitable"
 +
!width=25%| Filter
 +
!width=50%| Description
 +
!width=15%| Color format
 
|-
 
|-
| YUV444 
+
| [[ColorKeyMask]]
| YUV444PS
+
| Sets the alpha-channel (similar as Mask does) but generates it by comparing the color.
| style="padding-left:1em" | <code></code>
+
| RGB32
| style="text-align:right;padding-right:3em" | 32
+
+
| style="text-align:center" | {{AvsPluscon2}}
+
|
+
 
|-
 
|-
| YUVA444 
+
| [[Layer]]
|  YUVA444P8
+
| Puts one clip on top of another using different layer (blend) modes and variable opacity. Supports alpha-channel transparency.
| style="padding-left:1em" | <code>Y4[0][8]</code>
+
| RGB32, YUY2
| style="text-align:right;padding-right:3em" | 8
+
|
+
| style="text-align:center" | {{AvsIcon2}} 
+
| ''aka YUVA444''
+
 
|-
 
|-
| YUVA444 
+
| [[Mask]]
|  YUVA444P10
+
| Applies an alpha-mask to a clip.
| style="padding-left:1em" | <code>Y4[0][10]</code>
+
| RGB32
| style="text-align:right;padding-right:3em" | 10
+
+
| style="text-align:center" | {{AvsPluscon2}}
+
|
+
 
|-
 
|-
| YUVA444 
+
| [[MaskHS]]
| YUVA444P12
+
| This filter returns a mask (as Y8) of clip using a given hue and saturation range.
| style="padding-left:1em" | <code></code>
+
| [[#Color_formats|YUV]]
| style="text-align:right;padding-right:3em" | 12
+
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| YUVA444 
+
| [[Merge]]
| YUVA444P14
+
| Merge (blend) one video clip into another. There is an optional weighting, so a percentage between the two clips can be specified.
| style="padding-left:1em" | <code></code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 14
+
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| YUVA444 
+
| [[Overlay]]
|  YUVA444P16
+
| Puts one clip on top of another with optional XY displacement of the overlaying image, using different overlay (blend) modes and variable opacity. Uses a separate ''mask'' clip for transparency information.
| style="padding-left:1em" | <code>Y4[0][16]</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 16
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| YUVA444 
+
| [[ResetMask]]
| YUVA444PS
+
| Applies an "all-opaque" alpha-mask to clip.
| style="padding-left:1em" | <code></code>
+
| RGB32
| style="text-align:right;padding-right:3em" | 32
+
+
| style="text-align:center" | {{AvsPluscon2}}
+
|
+
 
|-
 
|-
| YUV422
+
| [[Subtract]]
| YUY2
+
| Shows the difference between the corresponding pixels of two clips.
| style="padding-left:1em" | <code>YUY2</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 8
+
|}
| style="text-align:center" | x
+
 
| style="text-align:center" | {{AvsIcon2}}
+
=== Geometric deformation filters ===
|
+
 
 +
These filters can be used to change image size, process borders or make other deformations of a clip.
 +
 
 +
{| style="height:100px; width:95%" border="1" cellpadding="4" class="wikitable"
 +
!width=25%| Filter
 +
!width=50%| Description
 +
!width=15%| Color format
 +
|-  
 +
| [[AddBorders]]
 +
| Adds black or colored borders around the image.
 +
| [[#Color_formats|All]]
 
|-
 
|-
| YUV422
+
| [[Crop]]
| YUV422P8
+
| Crops excess pixels from each frame.
| style="padding-left:1em" | <code>Y42B</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 8
+
|
+
| style="text-align:center" | {{AvsIcon2}} 
+
|  ''aka YUV422, YV16''
+
 
|-
 
|-
| YUV422 
+
| [[CropBottom]]
|  YUV422P10
+
| Crops excess pixels from the bottom of each frame.
| style="padding-left:1em" | <code>Y3[10][10]</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 10
+
| style="text-align:center" | x
+
| style="text-align:center" | {{AvsPluscon2}}
+
|  aka [http://wiki.multimedia.cx/index.php/V210 v210]; [[#footnotes|''VfW only'' {{BoldColor|black|100|§}}]]
+
 
|-
 
|-
| YUV422 
+
| [[FlipHorizontal]] / [[FlipVertical]]
|  YUV422P12
+
| Flips the video from left to right/upside-down.
| style="padding-left:1em" | <code>Y3[10][12]</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 12
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| YUV422 
+
| [[Letterbox]]
|  YUV422P14
+
| Blackens out (or colors out) the top and bottom (and optionally left and right) of each frame.
| style="padding-left:1em" | <code>Y3[10][14]</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 14
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| YUV422 
+
| [[HorizontalReduceBy2]] / [[VerticalReduceBy2]] / [[ReduceBy2]]
|  YUV422P16
+
| Reduces the size of each frame by half horizontally, vertically or in both directions.
| style="padding-left:1em" | <code>Y3[10][16]</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 16
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
|  ''aka P216'' 
+
 
|-
 
|-
| YUV422 
+
| [[BicubicResize]] / [[BilinearResize]] / [[BlackmanResize]] / [[GaussResize]] / [[LanczosResize]] / [[Lanczos4Resize]] / [[PointResize]] / [[SincResize]] / [[Spline16Resize]] / [[Spline36Resize]] / [[Spline64Resize]]
|  YUV422PS
+
| Rescale the input video frames to an arbitrary new resolution, using different sampling algorithms.
| style="padding-left:1em" | <code></code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 32
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
|
+
 
|-
 
|-
| YUVA422 
+
| [[SkewRows]]
|  YUVA422P8
+
| Skews (or deskews) the rows of a clip.
| style="padding-left:1em" | <code>Y4[10][8]</code>
+
| RGB24, RGB32, YUY2, Y8
| style="text-align:right;padding-right:3em" | 8
+
|
+
| style="text-align:center" | {{AvsIcon2}} 
+
| ''aka YUVA422''
+
 
|-
 
|-
| YUVA422
+
| [[TurnLeft]] / [[TurnRight]] / [[Turn180]]
| YUVA422P10
+
| Rotates the clip 90 degrees counter-clockwise / 90 degrees clockwise.
| style="padding-left:1em" | <code>Y4[10][10]</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 10
+
|}
|
+
 
| style="text-align:center" | {{AvsPluscon2}}
+
=== Pixel restoration filters ===
|
+
 
 +
These filters can be used for image detail (pixel) restoration (like denoising, sharpening) of a clip.
 +
 
 +
{| style="height:100px; width:95%" border="1" cellpadding="4" class="wikitable"
 +
!width=25%| Filter
 +
!width=50%| Description
 +
!width=15%| Color format
 +
|-  
 +
| [[Blur]] / [[Sharpen]]
 +
| Simple 3x3-kernel blurring/sharpening filter.
 +
| [[#Color_formats|All]]
 
|-
 
|-
| YUVA422 
+
| [[GeneralConvolution]]
| YUVA422P12
+
| General 3x3 or 5x5 convolution matrix.
| style="padding-left:1em" | <code></code>
+
| RGB32
| style="text-align:right;padding-right:3em" | 12
+
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| YUVA422 
+
| [[SpatialSoften]] / [[TemporalSoften]]
| YUVA422P14
+
| Removes noise from a video clip by selectively blending pixels spatially/temporally.
| style="padding-left:1em" | <code></code>
+
| YUY2 (SpatialSoften), [[#Color_formats|YUV Planar]]
| style="text-align:right;padding-right:3em" | 14
+
+
| style="text-align:center" | {{AvsPluscon2}}
+
|
+
 
|-
 
|-
| YUVA422 
+
| [[FixBrokenChromaUpsampling]]
| YUVA422P16
+
| The free Canopus DV Codec v1.00 upsamples the chroma channels incorrectly (although newer non-free versions appear to work fine). This filter compensates for it.
| style="padding-left:1em" | <code>Y4[10][16]</code>
+
| YUY2
| style="text-align:right;padding-right:3em" | 16
+
|}
|
+
 
| style="text-align:center" | {{AvsPluscon2}}
+
=== Timeline editing filters ===
|
+
 
 +
These filters can be used to arrange frames in time (clip cutting, splicing and other editing).
 +
 
 +
{| style="height:100px; width:95%" border="1" cellpadding="4" class="wikitable"
 +
!width=25%| Filter
 +
!width=50%| Description
 +
!width=15%| Color format
 
|-
 
|-
| YUVA422 
+
| [[AlignedSplice]] / [[UnalignedSplice]]
|  YUVA422PS
+
| Joins two or more video clips end to end.
| style="padding-left:1em" | <code></code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 32
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
|
+
 
|-
 
|-
| YUV420
+
| [[AssumeFPS]] / [[AssumeScaledFPS]] / [[ChangeFPS]] / [[ConvertFPS]]
| YV12
+
| Changes framerate and/or video speed in different ways.
| style="padding-left:1em" | <code>I420</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 8
+
|
+
| style="text-align:center" | {{AvsIcon2}}
+
| ''aka YUV420, YV12''
+
 
|-
 
|-
| YUV420 
+
| [[DeleteFrame]]
| YUV420P8
+
| Deletes a single frame, given as an argument.
| style="padding-left:1em" | <code>I420</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 8
+
|
+
| style="text-align:center" | {{AvsIcon2}} 
+
|  ''aka YUV420, YV12''
+
 
|-
 
|-
| YUV420
+
| [[Dissolve]]
| YUV420P10
+
| Like [[AlignedSplice]], except that the clips are combined with some overlap.
| style="padding-left:1em" | <code>Y3[11][10]</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 10
+
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| YUV420
+
| [[DuplicateFrame]]
|  YUV420P12
+
| Duplicates a single frame given as an argument.
| style="padding-left:1em" | <code>Y3[11][12]</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 12
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| YUV420
+
| [[FadeIn0]] / [[FadeIn]] / [[FadeIn2]] / [[FadeOut0]] / [[FadeOut]] / [[FadeOut2]] / [[FadeIO0]] / [[FadeIO]] / [[FadeIO2]]
|  YUV420P14
+
| Causes the video stream to fade linearly to black at the start or end.
| style="padding-left:1em" | <code>Y3[11][14]</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 14
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| YUV420 
+
| [[FreezeFrame]]
|  YUV420P16
+
| Replaces all the frames between ''first-frame'' and ''last-frame'' with a selected frame.
| style="padding-left:1em" | <code>Y3[11][16]</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 16
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| YUV420 
+
| [[Interleave]]
| YUV420PS
+
| Interleaves frames from several clips on a frame-by-frame basis.
| style="padding-left:1em" | <code></code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 32
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
|
+
 
|-
 
|-
| YUVA420
+
| [[Loop]]
|  YUVA420P8
+
| Loops the segment from ''start_frame'' to ''end_frame'' a given number of times.
| style="padding-left:1em" | <code>Y4[11][8]</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 8
+
|
+
| style="text-align:center" | {{AvsIcon2}} 
+
''aka YUVA420''
+
 
|-
 
|-
| YUVA420
+
| [[Reverse]]
|  YUVA420P10
+
| Makes a clip play in reverse.
| style="padding-left:1em" | <code>Y4[11][10]</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 10
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| YUVA420
+
| [[SelectEven]] / [[SelectOdd]]
|  YUVA420P12
+
| Makes an output video stream using only the even- or odd-numbered frames.
| style="padding-left:1em" | <code></code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 12
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
|
+
 
|-
 
|-
| YUVA420
+
| [[SelectEvery]]
| YUVA420P14
+
| Selects frames with a fixed period; a generalization of [[SelectEven]] and [[SelectOdd]].
| style="padding-left:1em" | <code></code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 14
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
|
+
 
|-
 
|-
| YUVA420
+
| [[SelectRangeEvery]]
|  YUVA420P16
+
| Selects a range of frames with a fixed period.
| style="padding-left:1em" | <code>Y4[11][16]</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 16
+
|
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| YUV420 
+
| [[Trim]]
| YUVA420PS
+
| Trims a video clip so that it includes only the frames ''first_frame'' through ''last_frame''.
| style="padding-left:1em" | <code></code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 32
+
|}
|
+
 
| style="text-align:center" | {{AvsPluscon2}}
+
=== Interlace filters ===
|
+
 
 +
These filters can be used for creating and processing field-based material (which is frame-based material separated into fields). AviSynth is capable of dealing with both progressive and interlaced material. The main problem is, that it often doesn't know what it receives from source filters. This is the reason that the field-based flag exists and can be used when dealing with interlaced material. More information about field-based video can be found [[Interlaced_fieldbased|here]].
 +
 
 +
{| style="height:100px; width:95%" border="1" cellpadding="4" class="wikitable"
 +
!width=25%| Filter
 +
!width=50%| Description
 +
!width=15%| Color format
 +
|-
 +
| [[AssumeFrameBased]] / [[AssumeFieldBased]]
 +
| Forces frame-based or field-based material.
 +
| [[#Color_formats|All]]
 +
|-
 +
| [[AssumeBFF]] / [[AssumeTFF]]
 +
| Forces field order.
 +
| [[#Color_formats|All]]
 +
|-
 +
| [[Bob]]
 +
| Takes a clip and [[Wikipedia:Deinterlacing#Field_extension_deinterlacing|bob-deinterlaces]] it.
 +
| [[#Color_formats|All]]
 +
|-
 +
| [[ComplementParity]]
 +
| Changes top fields to bottom fields and vice-versa.
 +
| [[#Color_formats|All]]
 
|-
 
|-
| YUV411
+
| [[DoubleWeave]]
| YUV411P8
+
| Operates like [[Weave]], except that it produces double the number of frames by combining both the odd and even pairs of fields.
| style="padding-left:1em" | <code>Y41B</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 8
+
|
+
| style="text-align:center" | {{AvsIcon2}} 
+
|  ''aka YUV411, YV411''
+
 
|-
 
|-
| YUV410
+
| [[PeculiarBlend]]
| YUV9
+
| Blends each frame with the following frame in a peculiar way.
| style="padding-left:1em" | <code></code>
+
| YUY2
| style="text-align:right;padding-right:3em" | 8
+
+
| style="text-align:center" | {{AvsPluscon2}}
+
|  ''read only?''
+
 
|-
 
|-
| Y only
+
| [[Pulldown]]
| Y8
+
| Selects two out of every five frames of the source video.
| style="padding-left:1em" | <code>Y800</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 8
+
| style="text-align:center" | (both)
+
| style="text-align:center" | {{AvsIcon2}}
+
+
 
|-
 
|-
| Y only 
+
| [[SeparateColumns]] / [[SeparateRows]]
|  Y10
+
| Separates the columns or rows of each frame into new frames.
| style="padding-left:1em" | <code></code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 10
+
| style="text-align:center" | (both) 
+
| style="text-align:center" | {{AvsPluscon2}}
+
|
+
 
|-
 
|-
| Y only 
+
| [[SeparateFields]]
| Y12
+
| Splits each frame into its component top and bottom fields.
| style="padding-left:1em" | <code></code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 12
+
| style="text-align:center" | (both) 
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| Y only 
+
| [[SwapFields]]
| Y14
+
| Swaps the two fields in an interlaced frame.
| style="padding-left:1em" | <code></code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 14
+
| style="text-align:center" | (both) 
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| Y only 
+
| [[Weave]]
|  Y16
+
| Combines fields together to produce interlaced frames.
| style="padding-left:1em" | <code>Y1[0][16]</code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 16
+
| style="text-align:center" | (both) 
+
| style="text-align:center" | {{AvsPluscon2}}
+
+
 
|-
 
|-
| Y only 
+
| [[WeaveColumns]] / [[WeaveRows]]
|  Y32
+
| Takes a clip and weaves sets of columns or rows together to produce composite frames.
| style="padding-left:1em" | <code></code>
+
| [[#Color_formats|All]]
| style="text-align:right;padding-right:3em" | 32
+
| style="text-align:center" | (both)
+
| style="text-align:center" | {{AvsPluscon2}}
+
|
+
 
|}
 
|}
{{HiddenAnchor|footnotes}}
 
  
{| border="0"
+
=== Audio processing filters ===
 +
 
 +
These filters process audio. Audio samples will be automatically converted if any filters requires a special type of sample. This means that 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 sample type column. A specific sample type can be forced by using the [[ConvertAudio]] functions.
 +
 
 +
{{AvsPluscon}} automatic conversion is ''not'' performed. The new behavior is to raise an error when a sample type is not compatible. It is your responsibility to use [[ConvertAudio]] where needed.
 +
 
 +
[[Float]] audio is converted to 16 bit when [[Frameserver|frameserving]] through [[ACM]], unless [[Internal_functions#OPT_AllowFloatAudio|OPT_AllowFloatAudio]] is set to true. In that case the audio is kept as it is. When accessing AviSynth directly (like MeGUI, BeHappy or ffmpeg do for example), there is no automatic conversion.
 +
 
 +
The automatic conversion is done for clients that cannot handle [[Float]] audio (in the old days most of them couldn't). Note conversion takes place ''after'' the script processing is finished. [[Float]] audio is always allowed within the script.
 +
 
 +
{| style="height:100px; width:95%" border="1" cellpadding="4" class="wikitable"
 +
!width=25%| Filter
 +
!width=50%| Description
 +
!width=15%| Sample type
 
|-
 
|-
|align="center" style="width:3em"|{{AvsIcon2}}
+
| [[Amplify]] / [[AmplifydB]]
| Supported in AviSynth 2.6.x
+
| Amplify multiply audio samples by amount.
 +
| 16 bit, Float
 
|-
 
|-
|align="center"|{{AvsPluscon2}}
+
| [[AssumeSampleRate]]
| Supported in both AviSynth &amp; AviSynth+
+
| Adjusts the playback speed of the audio.
 +
| All
 
|-
 
|-
|align="center"|{{BoldColor|black|140|¹}}
+
| [[AudioDub]] / [[AudioDubEx]]
|''[[FourCC]]: 4 characters used to identify media data formats. Data from [https://www.ffmpeg.org/ ffmpeg]. Unknown if blank.''
+
| ''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
 
|-
 
|-
|align="center"|{{BoldColor|black|140|²}}
+
| [[AudioTrim]]
|''32bit is floating-point; all others are integer.''
+
| Trims an audio clip so that it includes only the ''start_time'' through ''end_time''.
 +
| All
 
|-
 
|-
|align="center"|{{BoldColor|black|140|³}}
+
| [[ConvertAudioTo8bit]] / [[ConvertAudioTo16bit]] / [[ConvertAudioTo24bit]] / [[ConvertAudioTo32bit]] / [[ConvertAudioToFloat]]
|''[[Interleaved]] if marked; else [[Planar]].''
+
| Converts audio samples to 8/16/24/32/Float bits.
 +
| All
 
|-
 
|-
|align="center"|{{BoldColor|black|100|§}}
+
| [[ConvertToMono]]
|''VfW only: this format is served to [[wikipedia:Video_for_Windows|Video for Windows]] clients but not used within AviSynth''
+
| Merges all audio channels.
 +
| 16 bit, Float
 
|-
 
|-
|align="center"|{{BoldColor|black|100|§}}
+
| [[DelayAudio]]
|''v210 output requires [[Internal_functions#OPT_Enable_V210|OPT_Enable_V210]]''
+
| 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 or video from a clip completely.
 +
| All
 +
|-
 +
| [[MergeChannels]]
 +
| Merges channels of two audio clips.
 +
| All
 +
|-
 +
| [[MixAudio]]
 +
| Mixes audio from two clips.
 +
| 16 bit, Float
 +
|-
 +
| [[MonoToStereo]]
 +
| Converts two mono signals to one stereo signal.
 +
| 16 bit, Float
 +
|-
 +
| [[Normalize]]
 +
| Amplifies the entire waveform as much as possible, without clipping.
 +
| 16 bit, Float
 +
|-
 +
| [[ResampleAudio]]
 +
| Performs a high-quality change of audio sample rate.
 +
| 16 bit, Float
 +
|-
 +
| [[SuperEQ]]
 +
| High quality 18 band sound equalizer.
 +
| Float
 +
|-
 +
| [[SSRC]]
 +
| Very high quality sample rate conversion.
 +
| Float
 +
|-
 +
| [[TimeStretch]]
 +
| Change speed of a sound without changing the pitch, and change pitch without changing duration.
 +
| Float
 
|}
 
|}
  
===== See also: =====
+
=== Conditional and other meta filters  ===
* [[Convert]]
+
* [[ConvertBits]]
+
  
===== External Links: =====
+
''Meta'' filters can be used to control other filters' execution. The basic characteristic of conditional filters is that their scripts are evaluated (executed) at every frame instead of when the clip is loaded. This allows for complex video processing that would be difficult or impossible to be performed by a normal AviSynth script.  
* [http://msdn.microsoft.com/en-us/library/windows/desktop/bb970578(v=vs.85).aspx ''10-bit and 16-bit YUV Video Formats''] (microsoft.com)
+
* [http://wiki.multimedia.cx/index.php/V210 ''V210''] (multimedia.cx)
+
* [http://www.fourcc.org/yuv.php ''YUV pixel formats''] (fourcc.org)
+
* [http://www.fourcc.org/rgb.php ''RGB pixel formats''] (fourcc.org)
+
</div>
+
</div>
+
  
[[Category:Avisynthplus]]
+
{| style="height:100px; width:95%" border="1" cellpadding="4" class="wikitable"
<!--
+
!width=25%| Filter
 +
!width=50%| Description
 +
!width=15%| Color format
 +
|-
 +
| [[ConditionalFilter]] / [[FrameEvaluate]] / [[ScriptClip]] / [[ConditionalSelect]]
 +
| ''ConditionalFilter'' returns source1 if some condition is met, otherwise it returns source2. ''ScriptClip/FrameEvaluate'' returns the clip which is returned by the function evaluated on every frame. ''ConditionalSelect'' returns one frame from several sources based on an integer evaluator.
 +
| [[#Color_formats|All]]
 +
|-
 +
| [[ConditionalReader]]
 +
| Import information from a text file, with different values for each frame - or a range of frames.
 +
| [[#Color_formats|All]]
 +
|-
 +
| [[WriteFile]] / [[WriteFileIf]] / [[WriteFileStart]] / [[WriteFileEnd]]
 +
| These filters evaluate expressions and output the results to a text-file.
 +
| [[#Color_formats|All]]
 +
|-
 +
| [[Animate]] / [[ApplyRange]]
 +
| ''Animate'' is a meta-filter which evaluates another filter with continuously varying arguments.
 +
''ApplyRange'' 'is a special case of ''Animate'' where ''start_args'' = ''end_args''.
 +
| [[#Color_formats|All]]
 +
|-
 +
| [[TCPServer]] / [[TCPSource]]
 +
| Send clips over your network. You can connect several clients to the same machine.
 +
| [[#Color_formats|All]]
 +
|}
 +
 
 +
=== Export filters ===
 +
 
 +
These filters can write directly to media files.
 +
 
 +
{| style="height:100px; width:95%" border="1" cellpadding="4" class="wikitable"
 +
!width=25%| Filter
 +
!width=50%| Description
 +
!width=15%| Color format
 +
|-
 +
| [[ImageWriter]]
 +
| Writes frames as images to your hard disk. See [[#Source_filters|ImageReader]].
 +
| [[#Color_formats|All]]
 +
|}
 +
 
 +
=== Debug filters ===
 +
 
 +
{| style="height:100px; width:95%" border="1" cellpadding="4" class="wikitable"
 +
!width=25%| Filter
 +
!width=50%| Description
 +
!width=15%| Color format
 +
|-
 +
| [[BlankClip]] / [[Blackness]]
 +
| Produces a solid color, silent video clip of the specified length (in frames).
 +
| [[#Color_formats|All]]
 +
|-
 +
| [[ColorBars]] / [[ColorBarsHD]]
 +
| Produce a video clip containing SMPTE colorbars scaled to any image size.
 +
| RGB32, YUY2, YV12, YV24
 +
|-
 +
| [[Compare]]
 +
| Compares two clips and prints out information about the differences.
 +
| [[#Color_formats|All]]
 +
|-
 +
| [[Echo]]
 +
| Forces internal <tt>GetFrame</tt> calls to all input clips. Returns only first clip result.
 +
| [[#Color_formats|All]]
 +
|-
 +
| [[Histogram]]
 +
| A multipurpose audio/video analysis tool.
 +
| [[#Color_formats|All]]
 +
|-
 +
| [[Info]]
 +
| Prints out image and sound information.
 +
| [[#Color_formats|All]]
 +
|-
 +
| [[MessageClip]]
 +
| Produces a clip containing a text message.
 +
| RGB32
 +
|-
 +
| [[Preroll]]
 +
| Preroll the audio or video on non-linear access.
 +
| [[#Color_formats|All]]
 +
|-
 +
| [[ShowFiveVersions]]
 +
| Takes five video clips and combines them in a staggered arrangement from left to right.
 +
| [[#Color_formats|All]]
 +
|-
 +
| [[ShowFrameNumber]] / [[ShowSMPTE]] / [[ShowTime]]
 +
| Draws text on every frame indicating what number AviSynth thinks it is.
 +
| [[#Color_formats|All]]
 +
|-
 +
| [[StackHorizontal]] / [[StackVertical]]
 +
| Takes two or more video clips and displays them together in left-to-right/up-to-down order.
 +
| [[#Color_formats|All]]
 +
|-
 +
| [[Subtitle]]
 +
| Adds anti-aliased text to a range of frames.
 +
| [[#Color_formats|All]]
 +
|-
 +
| [[Tone]]
 +
| Generates a sound.
 +
| Float
 +
|-
 +
| [[Version]]
 +
| Generates a video clip with a short AviSynth version and copyright statement.
 +
| RGB24
 +
|}
 +
 
 +
 
 +
{{HiddenAnchor|Color_formats}}
 +
=== Footnote: Color Formats ===
  
{| style="height:100px; border="1" cellpadding="4" class="wikitable"
+
''The above filters work with the following named color formats.''
 +
{| style="height:100px" border="1" cellpadding="4" class="wikitable"
 
|-
 
|-
 
!Name
 
!Name
Line 565: Line 573:
 
| [[YV24]]&diams;, [[YV16]]&diams;, [[YV12]], [[YV411]]&diams;, [[Y8]]&diams;&nbsp;
 
| [[YV24]]&diams;, [[YV16]]&diams;, [[YV12]], [[YV411]]&diams;, [[Y8]]&diams;&nbsp;
 
|}
 
|}
 +
(&diams; = not supported in AviSynth version 2.58 or below)
 +
 +
</div>
  
{| border="0"
 
|-
 
| colspan="2"|''Notes and exceptions.''
 
|-
 
| style="width:1.5em" |&diams;
 
| Not supported in AviSynth version 2.58 or below
 
|-
 
| §
 
| 8-bit only; no [[Deep_Color|Deep color]]
 
|-
 
| &hearts;
 
| 32-bit Float not supported (8, 10, 12, 14, 16 bit)
 
|-
 
| ¦
 
| [[Planar]] color not supported
 
|-
 
| ?
 
| [[Interleaved]] color not supported
 
|}
 
  
-->
+
[[Category:AviSynth_Usage]]
 +
[[Category:AviSynth_Syntax]]

Revision as of 05:26, 16 October 2017

The available (internal) filters are listed here and divided into categories. A short description is added, including the supported color formats (and sample types for the audio filters). There are some functions which combine two or more clips in different ways. How the video content is calculated is described for each function, but here is a summary which explains which properties that the resulting clip will have.

An alphabetical listing of the internal filters can be found here.

Contents

Source filters

These filters can read media files and return an AviSynth clip. See debug filters for non-file source filters.

Filter Description Color format
AviSource / AviFileSource / OpenDMLSource Opens an AVI file. All
DirectShowSource Opens a filename using DirectShow. All
ImageReader / ImageSource / ImageSourceAnim Reads in still or animated images. See ImageWriter. All
Import Imports an AviSynth script into the current script. All
SegmentedAviSource / SegmentedDirectShowSource Loads up to 100 avi files per argument. All
WavSource Opens a WAV file or the audio of an AVI file. All

Color conversion and adjustment filters

These filters can be used to change the color format or adjust the colors of a clip.

Filter Description Color format
ColorYUV Adjusts colors and luma independently. YUV
ConvertBackToYUY2 Converts a RGB clip back to YUY2. RGB
ConvertToRGB Converts to RGB32 unless clip is RGB24. All
ConvertToRGB24 / ConvertToRGB32 / ConvertToYUY2 / ConvertToY8 / ConvertToYV411 / ConvertToYV12 / ConvertToYV16 / ConvertToYV24 Converts to RGB24 / RGB32 / YUY2 / Y8 / YV411 / YV12 / YV16 (planar version of YUY2) / YV24 (full YUV). All
FixLuminance Correct shifting vertical luma offset. YUY2
Greyscale/Grayscale Converts a video to greyscale (no color) All
Invert Inverts selected color channels of a video. All
Levels Scales and clamps the black and white levels, and adjusts the gamma. All
Limiter Clips levels to within CCIR-601 range, and optionally highlights pixels outside that range. YUV
MergeARGB / MergeRGB Select and combine a color channel from each of the input video clips. All
MergeChroma / MergeLuma Merge (blend) chroma or luma from one video clip into another. There is an optional weighting, so a percentage between the two clips can be specified. YUV
RGBAdjust Adjusts each color channel separately. RGB
ShowAlpha / ShowRed / ShowGreen / ShowBlue Shows the selected channel of an (A)RGB clip. RGB
SwapUV Swaps chroma channels. YUV
Tweak Adjusts the hue, saturation, brightness, and contrast. YUV
UToY / UToY8 / VToY / VToY8 Copies U or V chroma plane to the Y luma plane. YUV, except Y8
YToUV Puts the luma channels of two clips as U and V channels. Luma is now 50% grey. YUV

Overlay and Mask filters

These filters can be used to layer clips with or without using masks and to create masks.

Filter Description Color format
ColorKeyMask Sets the alpha-channel (similar as Mask does) but generates it by comparing the color. RGB32
Layer Puts one clip on top of another using different layer (blend) modes and variable opacity. Supports alpha-channel transparency. RGB32, YUY2
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. YUV
Merge Merge (blend) one video clip into another. There is an optional weighting, so a percentage between the two clips can be specified. All
Overlay Puts one clip on top of another with optional XY displacement of the overlaying image, using different overlay (blend) modes and variable opacity. Uses a separate mask clip for transparency information. All
ResetMask Applies an "all-opaque" alpha-mask to clip. RGB32
Subtract Shows the difference between the corresponding pixels of two clips. All

Geometric deformation filters

These filters can be used to change image size, process borders or make other deformations of a clip.

Filter Description Color format
AddBorders Adds black or colored borders around the image. All
Crop Crops excess pixels from each frame. All
CropBottom Crops excess pixels from the bottom of each frame. All
FlipHorizontal / FlipVertical Flips the video from left to right/upside-down. All
Letterbox Blackens out (or colors out) the top and bottom (and optionally left and right) of each frame. All
HorizontalReduceBy2 / VerticalReduceBy2 / ReduceBy2 Reduces the size of each frame by half horizontally, vertically or in both directions. All
BicubicResize / BilinearResize / BlackmanResize / GaussResize / LanczosResize / Lanczos4Resize / PointResize / SincResize / Spline16Resize / Spline36Resize / Spline64Resize Rescale the input video frames to an arbitrary new resolution, using different sampling algorithms. All
SkewRows Skews (or deskews) the rows of a clip. RGB24, RGB32, YUY2, Y8
TurnLeft / TurnRight / Turn180 Rotates the clip 90 degrees counter-clockwise / 90 degrees clockwise. All

Pixel restoration filters

These filters can be used for image detail (pixel) restoration (like denoising, sharpening) of a clip.

Filter Description Color format
Blur / Sharpen Simple 3x3-kernel blurring/sharpening filter. All
GeneralConvolution General 3x3 or 5x5 convolution matrix. RGB32
SpatialSoften / TemporalSoften Removes noise from a video clip by selectively blending pixels spatially/temporally. YUY2 (SpatialSoften), YUV Planar
FixBrokenChromaUpsampling The free Canopus DV Codec v1.00 upsamples the chroma channels incorrectly (although newer non-free versions appear to work fine). This filter compensates for it. YUY2

Timeline editing filters

These filters can be used to arrange frames in time (clip cutting, splicing and other editing).

Filter Description Color format
AlignedSplice / UnalignedSplice Joins two or more video clips end to end. All
AssumeFPS / AssumeScaledFPS / ChangeFPS / ConvertFPS Changes framerate and/or video speed in different ways. All
DeleteFrame Deletes a single frame, given as an argument. All
Dissolve Like AlignedSplice, except that the clips are combined with some overlap. All
DuplicateFrame Duplicates a single frame given as an argument. All
FadeIn0 / FadeIn / FadeIn2 / FadeOut0 / FadeOut / FadeOut2 / FadeIO0 / FadeIO / FadeIO2 Causes the video stream to fade linearly to black at the start or end. All
FreezeFrame Replaces all the frames between first-frame and last-frame with a selected frame. All
Interleave Interleaves frames from several clips on a frame-by-frame basis. All
Loop Loops the segment from start_frame to end_frame a given number of times. All
Reverse Makes a clip play in reverse. All
SelectEven / SelectOdd Makes an output video stream using only the even- or odd-numbered frames. All
SelectEvery Selects frames with a fixed period; a generalization of SelectEven and SelectOdd. All
SelectRangeEvery Selects a range of frames with a fixed period. All
Trim Trims a video clip so that it includes only the frames first_frame through last_frame. All

Interlace filters

These filters can be used for creating and processing field-based material (which is frame-based material separated into fields). AviSynth is capable of dealing with both progressive and interlaced material. The main problem is, that it often doesn't know what it receives from source filters. This is the reason that the field-based flag exists and can be used when dealing with interlaced material. More information about field-based video can be found here.

Filter Description Color format
AssumeFrameBased / AssumeFieldBased Forces frame-based or field-based material. All
AssumeBFF / AssumeTFF Forces field order. All
Bob Takes a clip and bob-deinterlaces it. All
ComplementParity Changes top fields to bottom fields and vice-versa. All
DoubleWeave Operates like Weave, except that it produces double the number of frames by combining both the odd and even pairs of fields. All
PeculiarBlend Blends each frame with the following frame in a peculiar way. YUY2
Pulldown Selects two out of every five frames of the source video. All
SeparateColumns / SeparateRows Separates the columns or rows of each frame into new frames. All
SeparateFields Splits each frame into its component top and bottom fields. All
SwapFields Swaps the two fields in an interlaced frame. All
Weave Combines fields together to produce interlaced frames. All
WeaveColumns / WeaveRows Takes a clip and weaves sets of columns or rows together to produce composite frames. All

Audio processing filters

These filters process audio. Audio samples will be automatically converted if any filters requires a special type of sample. This means that 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 sample type column. A specific sample type can be forced by using the ConvertAudio functions.

AVS+ automatic conversion is not performed. The new behavior is to raise an error when a sample type is not compatible. It is your responsibility to use ConvertAudio where needed.

Float audio is converted to 16 bit when frameserving through ACM, unless OPT_AllowFloatAudio is set to true. In that case the audio is kept as it is. When accessing AviSynth directly (like MeGUI, BeHappy or ffmpeg do for example), there is no automatic conversion.

The automatic conversion is done for clients that cannot handle Float audio (in the old days most of them couldn't). Note conversion takes place after the script processing is finished. Float audio is always allowed within the script.

Filter Description Sample type
Amplify / AmplifydB Amplify multiply audio samples by amount. 16 bit, 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
AudioTrim Trims an audio clip so that it includes only the start_time through end_time. All
ConvertAudioTo8bit / ConvertAudioTo16bit / ConvertAudioTo24bit / ConvertAudioTo32bit / ConvertAudioToFloat Converts audio samples to 8/16/24/32/Float bits. All
ConvertToMono Merges all audio channels. 16 bit, 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 or video from a clip completely. All
MergeChannels Merges channels of two audio clips. All
MixAudio Mixes audio from two clips. 16 bit, Float
MonoToStereo Converts two mono signals to one stereo signal. 16 bit, Float
Normalize Amplifies the entire waveform as much as possible, without clipping. 16 bit, Float
ResampleAudio Performs a high-quality change of audio sample rate. 16 bit, Float
SuperEQ High quality 18 band sound equalizer. Float
SSRC Very high quality sample rate conversion. Float
TimeStretch Change speed of a sound without changing the pitch, and change pitch without changing duration. Float

Conditional and other meta filters

Meta filters can be used to control other filters' execution. The basic characteristic of conditional filters is that their scripts are evaluated (executed) at every frame instead of when the clip is loaded. This allows for complex video processing that would be difficult or impossible to be performed by a normal AviSynth script.

Filter Description Color format
ConditionalFilter / FrameEvaluate / ScriptClip / ConditionalSelect ConditionalFilter returns source1 if some condition is met, otherwise it returns source2. ScriptClip/FrameEvaluate returns the clip which is returned by the function evaluated on every frame. ConditionalSelect returns one frame from several sources based on an integer evaluator. All
ConditionalReader Import information from a text file, with different values for each frame - or a range of frames. All
WriteFile / WriteFileIf / WriteFileStart / WriteFileEnd These filters evaluate expressions and output the results to a text-file. All
Animate / ApplyRange Animate is a meta-filter which evaluates another filter with continuously varying arguments.

ApplyRange 'is a special case of Animate where start_args = end_args.

All
TCPServer / TCPSource Send clips over your network. You can connect several clients to the same machine. All

Export filters

These filters can write directly to media files.

Filter Description Color format
ImageWriter Writes frames as images to your hard disk. See ImageReader. All

Debug filters

Filter Description Color format
BlankClip / Blackness Produces a solid color, silent video clip of the specified length (in frames). All
ColorBars / ColorBarsHD Produce a video clip containing SMPTE colorbars scaled to any image size. RGB32, YUY2, YV12, YV24
Compare Compares two clips and prints out information about the differences. All
Echo Forces internal GetFrame calls to all input clips. Returns only first clip result. All
Histogram A multipurpose audio/video analysis tool. All
Info Prints out image and sound information. All
MessageClip Produces a clip containing a text message. RGB32
Preroll Preroll the audio or video on non-linear access. All
ShowFiveVersions Takes five video clips and combines them in a staggered arrangement from left to right. All
ShowFrameNumber / ShowSMPTE / ShowTime Draws text on every frame indicating what number AviSynth thinks it is. All
StackHorizontal / StackVertical Takes two or more video clips and displays them together in left-to-right/up-to-down order. All
Subtitle Adds anti-aliased text to a range of frames. All
Tone Generates a sound. Float
Version Generates a video clip with a short AviSynth version and copyright statement. RGB24


Footnote: Color Formats

The above filters work with the following named color formats.

Name Formats
All RGB, YUV
RGB RGB24, RGB32
YUV YUY2, YUV Planar
YUV Planar  YV24♦, YV16♦, YV12, YV411♦, Y8♦ 

(♦ = not supported in AviSynth version 2.58 or below)

Personal tools