rotate
rotate(
input: Clip,
#{
degrees: Int,
}
)
Rotates a clip clockwise by 0, 90, 180, or 270 degrees without changing
its format, timing, or metadata. Rotations of 90 or 270 swap the output width
and height. A rotation of 0 degrees is allowed as a no-op for scripts that pass
through user-selected rotation values.
The input must be one fixed-format, fixed-resolution planar Gray, YUV, or planar
RGB clip. Quarter-turn rotations are only supported for formats whose chroma
sampling remains valid after swapping axes, such as yuv420p* and yuv444p*.
For asymmetric chroma formats such as yuv422p*, resample explicitly before
rotating.
Examples
output = source("input.mkv").std.rotate(#{ degrees: 90 })
rotation = 0
output = source("input.mkv").std.rotate(#{ degrees: rotation })
Input
One fixed-format, fixed-resolution planar Gray, YUV, or planar RGB clip.
Output
A clip with the same format, timing, and metadata. The resolution is unchanged
for 0 and 180 degrees, and width and height are swapped for 90 and 270
degrees.
Options
degrees(Int) – Clockwise rotation amount. Must be0,90,180, or270.