Skip to content

fade ΒΆ

fade(
    clipa: VideoNode,
    clipb: VideoNode,
    invert: bool,
    start: int,
    end: int,
    function: EasingT = Linear,
) -> VideoNode
Source code
19
20
21
22
23
24
25
26
27
28
29
30
31
def fade(
    clipa: vs.VideoNode, clipb: vs.VideoNode, invert: bool, start: int,
    end: int, function: EasingT = Linear
) -> vs.VideoNode:
    clipa_cut = clipa[start:end]
    clipb_cut = clipb[start:end]

    if invert:
        fade = crossfade(clipa_cut, clipb_cut, function)
    else:
        fade = crossfade(clipb_cut, clipa_cut, function)

    return insert_clip(clipa, fade, start)