Functions and Methods
Functions
Methods
Every Kernel class comes with a set of methods:
- class vskernels.kernels.docs.Example.scale(self, clip, width, height, shift=(0, 0))
Perform a regular scaling operation.
- Parameters
clip (
VideoNode
) – Input clipwidth (
int
) – Output widthheight (
int
) – Output heightshift (
Tuple
[float
,float
]) – Shift clip during the operation. Expects a tuple of (src_top, src_left).
- Return type
VideoNode
- class vskernels.kernels.docs.Example.descale(self, clip, width, height, shift=(0, 0))
Perform a regular descaling operation.
- Parameters
clip (
VideoNode
) – Input clipwidth (
int
) – Output widthheight (
int
) – Output heightshift (
Tuple
[float
,float
]) – Shift clip during the operation. Expects a tuple of (src_top, src_left).
- Return type
VideoNode
- class vskernels.kernels.docs.Example.shift(self, clip, shift_top=0.0, shift_left=0.0)
Perform a regular shifting operation.
- Parameters
clip (vs.VideoNode) – Input clip
shift –
Shift clip during the operation.
Expects a tuple of (src_top, src_left)
or two top, left arrays for shifting planes individually.
- Return type
VideoNode
- class vskernels.kernels.docs.Example.resample(self, clip, format, matrix=None, matrix_in=None)
Perform a regular resampling operation.
- Parameters
clip (vs.VideoNode) – Input clip
format (VideoFormatT) – Output format
matrix (Matrix | None) – Output matrix. If None, will take the matrix from the input clip’s frameprops.
matrix_in (Matrix | None) – Input matrix. If None, will take the matrix from the input clip’s frameprops.
- Return type
VideoNode