BlankClip
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.
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:
- AVS+ these additional color formats are allowed:
RGB48 RGB64 RGB(A)PS RGB(A)Pxx YUV(A)422Pxx YUV(A)420Pxx YUV(A)444Pxx Yxx where
S = 32-bit float (RGB only)
xx = integer bit depth: 10, 12, 14, or 16
(A) = optional alpha channel; for example RGBAP16 or 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.
- 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.
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)
# produces a black clip (3000 frames) with the remaining clip properties of the AVI: # produces a black clip (3000 frames) with the remaining clip properties of the AVI: video = AviSource("E:\pdwork\DO-Heaven.AVI") audio = BlankClip(video, audio_rate=48000) AudioDub(video, audio)
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. |