misc ¶
change_fps ¶
Convert the framerate of a clip.
This is different from AssumeFPS as this will actively adjust the framerate of a clip, rather than simply set the framerate properties.
Parameters:
-
clip
¶VideoNode
) –Input clip.
-
fps
¶Fraction
) –Framerate to convert the clip to. Must be a Fraction.
Returns:
-
VideoNode
–Clip with the framerate converted and frames adjusted as necessary.
Source code
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
match_clip ¶
match_clip(
clip: VideoNode,
ref: VideoNode,
dimensions: bool = True,
vformat: bool = True,
matrices: bool = True,
length: bool = False,
) -> VideoNode
Try to match the formats, dimensions, etc. of a reference clip to match the original clip.
Parameters:
-
clip
¶VideoNode
) –Original clip.
-
ref
¶VideoNode
) –Reference clip.
-
dimensions
¶bool
, default:True
) –Whether to adjust the dimensions of the reference clip to match the original clip. If True, uses resize.Bicubic to resize the image. Default: True.
-
vformat
¶bool
, default:True
) –Whether to change the reference clip's format to match the original clip's. Default: True.
-
matrices
¶bool
, default:True
) –Whether to adjust the Matrix, Transfer, and Primaries of the reference clip to match the original clip. Default: True.
-
length
¶bool
, default:False
) –Whether to adjust the length of the reference clip to match the original clip.
Source code
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
pick_func_stype ¶
Pick the function matching the sample type of the clip's format.
Parameters:
-
clip
¶VideoNode
) –Input clip.
-
func_int
¶FINT
) –Function to run on integer clips.
-
func_float
¶FFLOAT
) –Function to run on float clips.
Returns:
Source code
377 378 379 380 381 382 383 384 385 386 387 388 389 390 |
|
set_output ¶
set_output(
node: VideoNode,
index: int = ...,
/,
*,
alpha: VideoNode | None = ...,
**kwargs: Any,
) -> None
set_output(
node: VideoNode,
name: str | bool | None = ...,
/,
*,
alpha: VideoNode | None = ...,
**kwargs: Any,
) -> None
set_output(
node: VideoNode,
index: int = ...,
name: str | bool | None = ...,
/,
alpha: VideoNode | None = ...,
**kwargs: Any,
) -> None
set_output(
node: AudioNode,
index: int = ...,
name: str | bool | None = ...,
/,
**kwargs: Any,
) -> None
set_output(
node: Iterable[VideoNode | Iterable[VideoNode | Iterable[VideoNode]]],
index: int | Sequence[int] = ...,
/,
**kwargs: Any,
) -> None
set_output(
node: Iterable[VideoNode | Iterable[VideoNode | Iterable[VideoNode]]],
name: str | bool | None = ...,
/,
**kwargs: Any,
) -> None
set_output(
node: Iterable[VideoNode | Iterable[VideoNode | Iterable[VideoNode]]],
index: int | Sequence[int] = ...,
name: str | bool | None = ...,
/,
**kwargs: Any,
) -> None
set_output(
node: Iterable[AudioNode | Iterable[AudioNode | Iterable[AudioNode]]],
index: int | Sequence[int] = ...,
/,
**kwargs: Any,
) -> None
set_output(
node: Iterable[AudioNode | Iterable[AudioNode | Iterable[AudioNode]]],
name: str | bool | None = ...,
/,
**kwargs: Any,
) -> None
set_output(
node: RawNode | Iterable[RawNode | Iterable[RawNode | Iterable[RawNode]]],
index_or_name: int | Sequence[int] | str | bool | None = None,
name: str | bool | None = None,
/,
alpha: VideoNode | None = None,
**kwargs: Any,
) -> None
Set output node with optional name, and if available, use vspreview set_output.
Parameters:
-
node
¶RawNode | Iterable[RawNode | Iterable[RawNode | Iterable[RawNode]]]
) –Output node
-
index
¶Index number, defaults to current maximum index number + 1 or 0 if no ouput exists yet
-
name
¶str | bool | None
, default:None
) –Node's name, defaults to variable name
-
alpha
¶VideoNode | None
, default:None
) –Alpha planes node, defaults to None
Source code
528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 |
|