Skip to content

source

source

source(video: Path) -> VideoNode

Load a video source using VapourSynth.

Parameters:

Name Type Description Default
video Path

The path to the video file.

required

Returns:

Name Type Description
VideoNode VideoNode

The loaded video source.

Source code in src/encode_utils_cli/util/source.py
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
def source(video: Path) -> VideoNode:
    """Load a video source using VapourSynth.

    Args:
        video: The path to the video file.

    Returns:
        VideoNode: The loaded video source.
    """
    return (
        core.lsmas.LibavSMASHSource(source=video)
        if video.suffix == ".mp4"
        else core.lsmas.LWLibavSource(source=video)
    )