blank_clip
blank_clip(
clip?: Clip,
#{
width?: Int,
height?: Int,
format?: String,
length?: Int,
frame_rate?: Rational | Int | String,
color?: String | Array<Int> | Array<Float>,
}
)
Generates a fixed-format, fixed-resolution clip filled with one constant color.
When clip is provided, blank_clip copies the input clip’s format, width,
height, length, and frame rate. Any explicitly set option overrides the copied
property. Built-in defaults are used only when there is no input clip for that
property. color is not inherited and defaults to "#000000".
width, height, and length must be positive. The selected frame rate must
be positive. For subsampled formats, the selected width and height must align to
the format’s chroma plane divisors. format accepts the canonical pixel format
strings and aliases listed in Format and color metadata strings.
color accepts #RRGGBB or exact per-plane sample values. Hex colors are
interpreted as full-range RGB display colors. Gray and YUV clips convert that
RGB color with the same fixed BT.709-style mapping used by add_borders; the
conversion does not inspect clip color metadata. For exact plane values, pass an
array whose length matches the output plane count. Integer formats require
integer array values in the valid sample range. Float formats accept finite
integer or float array values.
frame_rate accepts rational values, integers treated as n/1, or strings in
numerator/denominator form. If length is omitted and no input clip is
provided, blank_clip defaults to ceil(10 * frame_rate) frames.
Examples
output = std.blank_clip()
output = std.blank_clip(#{
width: 1920,
height: 1080,
format: "rgbp8",
length: 120,
frame_rate: "24000/1001",
color: "#336699",
})
input = source("input.mkv")
output = input.std.blank_clip(#{ color: [16, 128, 128] })
Input
Zero or one clip. If a clip is provided, its media properties are used as defaults.
Output
A generated clip with the selected format, dimensions, length, frame rate, and constant color.
Options
width(Int, default:1280without input) – Set the output width in pixels.height(Int, default:720without input) – Set the output height in pixels.format(String, default:"yuv420p8"without input) – Set the output pixel format.length(Int, default:ceil(10 * frame_rate)without input) – Set the output frame count.frame_rate(Rational | Int | String, default:30/1without input) – Set the output constant frame rate.color(String | Array<Int> | Array<Float>, default:"#000000") – Set the generated color as#RRGGBBor exact per-plane sample values.