Letterbox¶
Fills the top and bottom rows of each frame, and optionally the left and right columns, with black or color. This has several common uses:
Black out video noise from the existing black bands in an image that's already letterboxed.
Black out the video noise at the bottom of the frame in VHS tape sources.
Create a quick rectangular mask for other filters – a so-called "garbage matte".
See also: AddBorders, which increases frame size. Letterbox does not change frame size.
The functionality of Letterbox can be duplicated with a combination of Crop and AddBorders, but Letterbox is faster and easier.
Generally, it's better to Crop video noise off than to black it out; many older lossy compression algorithms don't deal well with solid-color borders, unless the border happens to fall on a macroblock boundary (16 pixels for MPEG). However, in some cases, particularly for certain hardware players, it's better to use Letterbox because it lets you keep a standard frame size.
Syntax and Parameters¶
Letterbox (clip, int top, int bottom, int "x1", int "x2", int "color", int "color_yuv")
- clip
Source clip; all color formats supported.
- top, bottom
Number of top and bottom rows to blank out.
For YUV420 sources, top and bottom must be mod2 (divisible by 2).
- x1, x2
Number of left (
x1
) and right (x2
) columns to blank out.For YUV422 and YUV420 sources, left and right must be mod2 (divisible by 2).
For YUV411 sources, left and right must be mod4 (divisible by 4).
Default: 0, 0
- color
- Fill color specified as an RGB value in either hexadecimal or decimal notation.Hex numbers must be preceded with a $. See the colors page for more information on specifying colors.
For YUV clips, colors are converted from full range (0–255) to limited range (16–235) Rec.601.
Use
color_yuv
to specify full range YUV values or a color with a different matrix.
Default: $000000
- color_yuv
- Specifies the fill color using YUV values. Input clip must be YUV.See the YUV colors section for more information.
Changelog¶
Version |
Changes |
---|---|
AviSynth+ 3.4.1 |
Added |
AviSynth+ r2487 |
Added support for RGB48/64 and all Planar RGB(A)/YUV(A) color formats. |
AviSynth 2.0.7 |
Added |
AviSynth 2.0.6 |
Added optional left and right parameters ( |
$Date: 2022/02/08 11:37:04 $