From Avisynth wiki
Revision as of 20:30, 16 September 2022 by Reel.Deal (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Up-to-date documentation:

BlankClip produces a solid color video clip with silent audio. The clip passed as an argument is used as a template - for frame rate, image size, and so on, but the template is optional. You can specify as many clip properties explicitly as you wish. By default, BlankClip will produce a pitch-black 10 second clip; 24 fps, 640x480, RGB32, with 16 bit, 44100 Hz, mono, silent audio.

When supplying a template, BlankClip returns a clip with properties copied from that template. If the template is audio-only, you get a blank audio-only clip, and if it's video-only you get a blank video-only clip. If you start to add parameters that force a video track (i.e. width, height or pixel_type) or audio track (i.e. audio_rate, channels or sample_type), the remaining parameters for that track will be the defaults. (AviSynth v2.60)

Blackness is an alias for BlankClip. The parameters are the same.

[edit] Syntax and Parameters

BlankClip( [clip clip, int length, int width, int height, string pixel_type,
      float fps, int fps_denominator, int audio_rate, bool stereo, bool sixteen_bit,
      int color, int color_yuv] ) (deprecated)

BlankClip( [clip clip, int length, int width, int height, string pixel_type,
      float fps, int fps_denominator, int audio_rate, int channels, string sample_type,
      int color, int color_yuv] )

Blackness( ...same parameters as BlankClip )

clip  clip =
if supplied, the resulting clip will have the clip properties of the template, except for the properties you define explicitly.
int  length = 240
Length of the resulting clip, in frames.
int  width = 640
int  height = 480
Width and height of the resulting clip.
string  pixel_type = "RGB32"
Pixel type of the resulting clip; can be any of the following:
RGB24 RGB32 YUY2 YV12 YV16 * YV24 * YV411 * Y8 *
 * AviSynth v2.60
AVS+ these color formats are allowed:
bits RGB(A) YUV(A)444 YUV(A)422 YUV(A)420 YUV411 Y only


YUV444P16 YUV422P16 YUV420P16 Y16
14 RGBP14 YUV444P14 YUV422P14 YUV420P14 Y14
12 RGBP12 YUV444P12 YUV422P12 YUV420P12 Y12
10 RGBP10 YUV444P10 YUV422P10 YUV420P10 Y10




YV411 Y8
with alpha channel


YUVA444P16 YUVA422P16 YUVA420P16
14 RGBAP14 YUVA444P14 YUVA422P14 YUVA420P14
12 RGBAP12 YUVA444P12 YUVA422P12 YUVA420P12
10 RGBAP10 YUVA444P10 YUVA422P10 YUVA420P10


float  fps = 24
Frame rate of the resulting clip.
int  fps_denominator = 1
Specify frame rate in rational form (numerator/denominator). For example, fps=30000,fps_denominator=1001 (approximately 29.97 fps) or fps=24000,fps_denominator=1001 (approximately 23.976 fps).
Note – if fps_denominator is given (even if it is "1"), fps is rounded to the nearest integer.
int  audio_rate = 44100
Sample rate of the (silent) audio.
NoteBlankClip(audio_rate=0) produces the same result as BlankClip.KillAudio.
int  channels = 1
Specifies the number of channels of (silent) audio.
bool  stereo = false
Deprecated: use channels instead.
If true, the (silent) audio is in stereo: channels=2.
string  sample_type = "16bit"
Specifies the audio sample type. It can be 8bit, 16bit, 24bit, 32bit or float.
bool  sixteen_bit = true
Deprecated: use sample_type instead.
true and false give both 16 bit, except when a template is used where a different bit is set.
int  color = $000000
Specifies the color of the clip, black (= $000000) by default. See color presets for preset color. See Colors for more information on specifying colors.
int  color_yuv =
Specifies the color of the clip using YUV values. It requires setting pixel_type to one of the YUV formats; otherwise it doesn't do anything.

[edit] Examples

# produces a black clip (3000 frames, width 720, height 576, framerate 25),
# with a silent audio track (16 bit 44.1 kHz stereo):
BlankClip(length=3000, width=720, height=576, fps=25, color=$000000)
# produces a black clip (3000 frames) with the remaining clip properties of the AVI:
video = AviSource("E:\pdwork\DO-Heaven.AVI")
BlankClip(video, length=3000, color=$000000)
# adds a silent audio stream (with a samplerate of 48 kHz) to a video clip:
video = AviSource("E:\pdwork\DO-Heaven.AVI")
audio = BlankClip(video, audio_rate=48000)
AudioDub(video, audio)

[edit] Changes

v2.55 Added color_yuv.
v2.58 Added channels and sample_type.
v2.60 Added pixel_type="YV24"/"YV16"/"YV411"/"Y8".
Supply useful defaults for new Audio/Video when using a Video/Audio only template clip.
Personal tools