AviSynth2.5核心濾鏡
這裡列出了AviSynth2.5中的核心濾鏡,按照他們的功能進行了分類,並附有簡介和他們所支持的顏色空間(音頻濾鏡附有其支持的採樣類型)。其中一部分濾鏡可以將兩個(或更多)剪輯進行不同方式的組合,簡介中分別描述了他們各自處理剪輯的方式,您也可以參考這裡看看他們之間的對比。
本頁編譯:dgwxx。
媒體文件濾鏡
媒體文件濾鏡可以用過來讀/寫媒體文件。他們可以用來創建原始剪輯。要了解不通過文件創建原始剪輯的濾鏡,請參見調試用濾鏡。
濾鏡 | 簡介 | 顏色空間 |
---|---|---|
AviSource / AviFileSource / OpenDMLSource | 打開AVI文件。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
DirectShowSource | 通過DirectShow打開媒體文件。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
ImageReader / ImageSource | 通過讀取圖片創建剪輯。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
ImageWriter | 將視頻幀保存為圖片。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Import | 在當前腳本中導入另一個AVS腳本。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
SegmentedAviSource / SegmentedDirectShowSource | 自動序列導入最多100個視頻文件。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
WavSource | 打開WAV文件或打開AVI文件中的音軌。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
色彩變換和調整濾鏡
以下濾鏡用於改變顏色空間類型或者調整一段視頻中的顏色。
濾鏡 | 簡介 | 顏色空間 |
---|---|---|
ColorYUV | 此濾鏡用於獨立地調節色度和亮度。 | YUY2, Y8, YV411, YV12, YV16, YV24 |
ConvertBackToYUY2 | 此濾鏡用於將一段RGB格式視頻轉換回YUY2格式。 | RGB24, RGB32 |
ConvertToRGB | 此濾鏡用於將視頻轉換成RGB32格式,除非源已是RGB24格式。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
ConvertToRGB24 / ConvertToRGB32 / ConvertToYUY2 / ConvertToY8 / ConvertToYV411 / ConvertToYV12 / ConvertToYV16 / ConvertToYV24 | 此濾鏡將視頻轉換成 RGB24 / RGB32 / YUY2 / Y8 / YV411 / YV12 / YV16 (YUY2的平面版) / YV24 (完整YUV)。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
FixLuminance | 此濾鏡用於校正垂直亮度分量的漂移。 | YUY2 |
GreyScale | 此濾鏡用於將視頻轉換成灰階形式。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Invert | 此濾鏡用於翻轉所選色彩通道的顏色。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Levels | 此濾鏡用於調整黑電平(blacklevel)和白電平(whitelevel)的數值,該濾鏡也可以調整視頻的Gamma值。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Limiter | 此濾鏡將視頻中像素的色度亮度數值限制到CCIR-601標準的範圍內。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
MergeARGB / MergeRGB | 此濾鏡可以將每個輸入的視頻中選擇一個顏色通道並將它們整合。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
MergeChroma / MergeLuma | 此濾鏡可以將一個視頻剪輯的色度/亮度合併到另一個視頻中。有一個可選參數用於調整權重,也就是說可以自由分配兩段視頻的色度/亮度在新視頻中所占的百分比。 | YUY2, Y8, YV411, YV12, YV16, YV24 |
Merge | 此濾鏡可以將一個視頻剪輯的亮度和色度合併到另一個視頻中。有一個可選參數用於調整權重,也就是說可以自由分配兩段視頻的亮度和色度在新視頻中所占的百分比。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
RGBAdjust | 此濾鏡用於獨立地改變視頻中的每個色彩通道。 | RGB24, RGB32 |
ShowAlpha / ShowRed / ShowGreen / ShowBlue | 此濾鏡用於顯示(A)RGB格式視頻中被選擇的色彩通道。 | RGB24, RGB32 |
SwapUV | 此濾鏡用於交換一個視頻的色度通道。 | YUY2, Y8, YV411, YV12, YV16, YV24 ? |
Tweak | 此濾鏡用於調整色彩、飽和度、亮度和對比度。 | YUY2, Y8, YV411, YV12, YV16, YV24 |
UToY / VToY | 將色度平面U/V的信息複製到Y平面。(圖像尺寸會縮小一半) | YUY2, Y8, YV411, YV12, YV16, YV24 |
UToY8 / VToY8 | UToY.ConvertToY8 / VToY.ConvertToY8的簡化形式 | YUY2, YV411, YV12, YV16, YV24 |
YToUV | 此濾鏡將指定兩段視頻中的亮度通道為新視頻的U、V通道。新視頻的圖像尺寸變為源的兩倍,亮度降為源的一半。如需增加亮度值,請使用MergeLuma濾鏡。 | YUY2, YV12 ? |
交疊和遮罩濾鏡
These filters can be used to layer clips with or without using masks and to create masks.
濾鏡 | 簡介 | 顏色空間 |
---|---|---|
ColorKeyMask | Sets the alpha-channel (similar as Mask does) but generates it by comparing the color. | RGB32 |
Layer | 此濾鏡用於層疊(Layering)兩段視頻。 | 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. | YUY2, Y8, YV411, YV12, YV16, YV24 |
Overlay | 此濾鏡將一段視頻交疊在另一段已知視頻上,可以選擇交疊圖像的偏移量,也可以選擇不同的交疊方法。另外,還可以設置交疊視頻的透明度。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
ResetMask | Applies an "all-opaque" alpha-mask to clip. | RGB32 |
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 |
幾何變形濾鏡
以下濾鏡用於改變圖像尺寸、處理圖像邊緣或對視頻進行其他幾何變化。
濾鏡 | 簡介 | 顏色空間 |
---|---|---|
AddBorders | 此濾鏡在圖像四周添加黑邊 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Crop | 此濾鏡用於裁剪每幀圖像四周的超量像素。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
CropBottom | 此濾鏡用於裁剪每幀圖像下部的超量像素。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
FlipHorizontal / FlipVertical | 此濾鏡用於左右/上下翻轉圖像。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Letterbox | 此濾鏡僅用於將每幀視頻的上下部分(亦可選左右部分)黑化。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
HorizontalReduceBy2 / VerticalReduceBy2 / ReduceBy2 | 此濾鏡將每幀圖像的水平/垂直或兩者尺寸縮小一半。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
BicubicResize / BilinearResize / BlackmanResize / GaussResize / LanczosResize / Lanczos4Resize / PointResize / SincResize / Spline16Resize / Spline36Resize / Spline64Resize | 這些濾鏡使用不同的採樣算法將輸入視頻的分辨率調整到任意指定大小。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
TurnLeft / TurnRight / Turn180 | 將視頻順時針/逆時針旋轉90° | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
像素重建濾鏡
以下濾鏡用於重建一段視頻中因為除噪、銳化等原因丟失的圖像細節(像素)。
濾鏡 | 簡介 | 顏色空間 |
---|---|---|
Blur / Sharpen | 這是一個簡易的基於3x3卷積核矩陣的柔化/銳化濾鏡。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
GeneralConvolution | 此濾鏡用於生成3x3或5x5的卷積矩陣。 | RGB32 |
SpatialSoften / TemporalSoften | 這兩個濾鏡分別使用空間/時間選擇合併像素方式除去視頻剪輯中的噪點。 | YUY2 (SpatialSoften), Y8, YV411, YV12, YV16, YV24 |
FixBrokenChromaUpsampling | 使用免費版本的Canpus DV Codec v1.00採集的視頻會存在不正確的提高色度通道採樣率的問題(雖然新的非免費版本不存在此問題),此濾鏡的作用是為了補償不正確的色度值已恢復原效果。 | YUY2 |
時間軸編輯濾鏡
以下濾鏡被用於以時間為綱調整視頻中的各幀(視頻裁剪、合併和其它操作)。
濾鏡 | 簡介 | 顏色空間 |
---|---|---|
AlignedSplice / UnalignedSplice | 此濾鏡用於將兩段或多段視頻前後相接成一段視頻。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
AssumeFPS / AssumeScaledFPS / ChangeFPS / ConvertFPS | 這些濾鏡採用不同方式改變幀率。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
DeleteFrame | 此濾鏡用於刪除參數所指定的單幀。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Dissolve | 此濾鏡的作用與AlignedSplice類似,不同的是此濾鏡整合後的視頻允許有交疊。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
DuplicateFrame | 此濾鏡用於複製參數所指定的單幀。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
FadeIn0 / FadeIn / FadeIn2 / FadeOut0 / FadeOut / FadeOut2 / FadeIO0 / FadeIO / FadeIO2 | FadeIn 和 FadeOut 濾鏡可以讓視頻在開頭和結尾處產生線性淡入淡出效果。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
FreezeFrame | 此濾鏡用於替換所選區域內的所有幀(閉區間)。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Interleave | 此濾鏡基於幀對幀方式交織一組視頻中的各幀。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Loop | 此濾鏡根據設定的次數循環指定段的視頻。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Reverse | 此濾鏡用於倒放一段視頻。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
SelectEven / SelectOdd | 此濾鏡用於輸出一段視頻的偶數/奇數幀。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
SelectEvery | 此濾鏡輸出指定時間段內的視頻,是諸如SelectEven和SelectOdd濾鏡的一般化形式。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
SelectRangeEvery | 此濾鏡用於輸出選擇特定時間區間內的指定幀。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Trim | 此濾鏡用於剪切並生成選擇幀區間內的視頻。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
交錯視頻濾鏡
以下濾鏡用於創建和處理基於場格式的視頻素材(由於基於幀格式的素材被拆成了場格式而產生的)。雖然AviSynth能處理逐行和交錯視頻,但主要問題是它經常不能分辨從源濾鏡獲得視頻剪輯的形式。這就是場標誌(Field-based Flag)存在並被用於處理交錯視頻素材的原因。關於場格式視頻的更多信息請參見[Interlaced and Field-based video|here]。
濾鏡 | 簡介 | 顏色空間 |
---|---|---|
AssumeFrameBased / AssumeFieldBased | AviSynth會自動判斷視頻是基於場格式的還是基於幀格式的。這些濾鏡用於將某段視頻強制識別為場格式或幀格式。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
AssumeBFF / AssumeTFF | 此濾鏡強制指定場序。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Bob | 此濾鏡用於將一段視頻進行Bob解交錯(Bob-deinterlaceing)。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
ComplementParity | 此濾鏡用於對場(適用於場格式field-based視頻)或幀(適用於幀格式frame-based視頻)進行位置求補(上部元素和下部元素交換位置)。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
DoubleWeave | 此濾鏡工作方式類似於Weave濾鏡,不同點在於此濾鏡用合併奇數和偶數對場的方式生成了兩倍與Weave濾鏡的幀數量。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
PeculiarBlend | 此濾鏡用特殊方式合成相鄰兩幀。 | YUY2 |
Pulldown | 此濾鏡簡單地將每5幀中的2幀從源視頻中去掉。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
SeparateFields | 此濾鏡將幀格式視頻中的每幀所包含的兩個場分離成兩個獨立的視頻。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
SwapFields | 此濾鏡將一個交錯幀中的兩個場進行空間位置交換。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Weave | 此濾鏡從已分離場的輸入視頻中選取奇數編號的場,並將其合併生成交錯幀。 | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
音頻處理濾鏡
These filters can be used to process audio. Audio samples from a clip 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.
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.
濾鏡 | 簡介 | 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 |
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 |
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 |
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 the whole clip. This allows for complex video processing that would be difficult or impossible to be performed by a normal AviSynth script.
濾鏡 | 簡介 | 顏色空間 |
---|---|---|
ConditionalFilter / FrameEvaluate / ScriptClip | 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. | YUY2 ?, YV12 |
ConditionalReader | ConditionalReader allows you to import information from a text file, with different values for each frame - or a range of frames. | YUY2 ?, YV12 |
WriteFile / WriteFileIf / WriteFileStart / WriteFileEnd | These filters evaluate expressions and output the results to a text-file. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 ? |
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 ? |
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
濾鏡 | 簡介 | 顏色空間 |
---|---|---|
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, YV12 |
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 clips and combines them in a staggered arrangement from left to right. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16 (?), YV24 |
ShowFrameNumber / ShowSMPTE / ShowTime | Draws text on every frame indicating what number AviSynth thinks it is. | 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 |
Subtitle | Adds a single line of anti-aliased text to a range of frames. | RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 |
Tone | This will generate sound. | Float |
Version | Generates a video clip with a short version and copyright statement. | RGB24 |