# --- AUTO-GENERATED FILE ---
from typing import TYPE_CHECKING, Literal
from pyffmpeg._utils import create_source

if TYPE_CHECKING:
    from pyffmpeg.node import Stream, FilterMultiOutput


def abuffer(
    time_base: str | None = None,
    sample_rate: int | None = None,
    sample_fmt: str | None = None,
    channel_layout: str | None = None,
    channels: int | None = None,
) -> "Stream":
    """Buffer audio frames, and make them accessible to the filterchain.
    Args:
        time_base (str): (from 0 to INT_MAX)

            Defaults to 0/1.
        sample_rate (int): (from 0 to INT_MAX)

            Defaults to 0.
        sample_fmt (str): No description available.

            Defaults to none.
        channel_layout (str): No description available.

        channels (int): (from 0 to INT_MAX)

            Defaults to 0.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="abuffer",
        named_arguments={
            "time_base": time_base,
            "sample_rate": sample_rate,
            "sample_fmt": sample_fmt,
            "channel_layout": channel_layout,
            "channels": channels,
        },
    )


def aevalsrc(
    exprs: str | None = None,
    nb_samples: int | None = None,
    n: int | None = None,
    sample_rate: str | None = None,
    s: str | None = None,
    duration: str | None = None,
    d: str | None = None,
    channel_layout: str | None = None,
    c: str | None = None,
) -> "Stream":
    """Generate an audio signal generated by an expression.
    Args:
        exprs (str): set the '|'-separated list of channels expressions

        nb_samples (int): set the number of samples per requested frame (from 0 to INT_MAX)

            Defaults to 1024.
        n (int): set the number of samples per requested frame (from 0 to INT_MAX)

            Defaults to 1024.
        sample_rate (str): set the sample rate

            Defaults to 44100.
        s (str): set the sample rate

            Defaults to 44100.
        duration (str): set audio duration

            Defaults to -0.000001.
        d (str): set audio duration

            Defaults to -0.000001.
        channel_layout (str): set channel layout

        c (str): set channel layout


    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="aevalsrc",
        named_arguments={
            "exprs": exprs,
            "nb_samples": nb_samples,
            "n": n,
            "sample_rate": sample_rate,
            "s": s,
            "duration": duration,
            "d": d,
            "channel_layout": channel_layout,
            "c": c,
        },
    )


def afdelaysrc(
    delay: float | None = None,
    d: float | None = None,
    sample_rate: int | None = None,
    r: int | None = None,
    nb_samples: int | None = None,
    n: int | None = None,
    taps: int | None = None,
    t: int | None = None,
    channel_layout: str | None = None,
    c: str | None = None,
) -> "Stream":
    """Generate a Fractional delay FIR coefficients.
    Args:
        delay (float): set fractional delay (from 0 to 32767)

            Defaults to 0.
        d (float): set fractional delay (from 0 to 32767)

            Defaults to 0.
        sample_rate (int): set sample rate (from 1 to INT_MAX)

            Defaults to 44100.
        r (int): set sample rate (from 1 to INT_MAX)

            Defaults to 44100.
        nb_samples (int): set the number of samples per requested frame (from 1 to INT_MAX)

            Defaults to 1024.
        n (int): set the number of samples per requested frame (from 1 to INT_MAX)

            Defaults to 1024.
        taps (int): set number of taps for delay filter (from 0 to 32768)

            Defaults to 0.
        t (int): set number of taps for delay filter (from 0 to 32768)

            Defaults to 0.
        channel_layout (str): set channel layout

            Defaults to stereo.
        c (str): set channel layout

            Defaults to stereo.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="afdelaysrc",
        named_arguments={
            "delay": delay,
            "d": d,
            "sample_rate": sample_rate,
            "r": r,
            "nb_samples": nb_samples,
            "n": n,
            "taps": taps,
            "t": t,
            "channel_layout": channel_layout,
            "c": c,
        },
    )


def afireqsrc(
    preset: Literal[
        "custom",
        "flat",
        "acoustic",
        "bass",
        "beats",
        "classic",
        "clear",
        "deep",
        "dubstep",
        "electronic",
        "hardstyle",
        "hip-hop",
        "jazz",
        "metal",
        "movie",
        "pop",
        "r&b",
        "rock",
        "vocal",
    ]
    | int
    | None = None,
    p: Literal[
        "custom",
        "flat",
        "acoustic",
        "bass",
        "beats",
        "classic",
        "clear",
        "deep",
        "dubstep",
        "electronic",
        "hardstyle",
        "hip-hop",
        "jazz",
        "metal",
        "movie",
        "pop",
        "r&b",
        "rock",
        "vocal",
    ]
    | int
    | None = None,
    gains: str | None = None,
    g: str | None = None,
    bands: str | None = None,
    b: str | None = None,
    taps: int | None = None,
    t: int | None = None,
    sample_rate: int | None = None,
    r: int | None = None,
    nb_samples: int | None = None,
    n: int | None = None,
    interp: Literal["linear", "cubic"] | int | None = None,
    i: Literal["linear", "cubic"] | int | None = None,
    phase: Literal["linear", "min"] | int | None = None,
    h: Literal["linear", "min"] | int | None = None,
) -> "Stream":
    """Generate a FIR equalizer coefficients audio stream.
    Args:
        preset (int | str): set equalizer preset (from -1 to 17)

            Allowed values:
                * custom
                * flat
                * acoustic
                * bass
                * beats
                * classic
                * clear
                * deep
                * dubstep
                * electronic
                * hardstyle
                * hip-hop
                * jazz
                * metal
                * movie
                * pop
                * r&b
                * rock
                * vocal

            Defaults to flat.
        p (int | str): set equalizer preset (from -1 to 17)

            Allowed values:
                * custom
                * flat
                * acoustic
                * bass
                * beats
                * classic
                * clear
                * deep
                * dubstep
                * electronic
                * hardstyle
                * hip-hop
                * jazz
                * metal
                * movie
                * pop
                * r&b
                * rock
                * vocal

            Defaults to flat.
        gains (str): set gain values per band

            Defaults to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.
        g (str): set gain values per band

            Defaults to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.
        bands (str): set central frequency values per band

            Defaults to 25 40 63 100 160 250 400 630 1000 1600 2500 4000 6300 10000 16000 24000.
        b (str): set central frequency values per band

            Defaults to 25 40 63 100 160 250 400 630 1000 1600 2500 4000 6300 10000 16000 24000.
        taps (int): set number of taps (from 16 to 65535)

            Defaults to 4096.
        t (int): set number of taps (from 16 to 65535)

            Defaults to 4096.
        sample_rate (int): set sample rate (from 1 to INT_MAX)

            Defaults to 44100.
        r (int): set sample rate (from 1 to INT_MAX)

            Defaults to 44100.
        nb_samples (int): set the number of samples per requested frame (from 1 to INT_MAX)

            Defaults to 1024.
        n (int): set the number of samples per requested frame (from 1 to INT_MAX)

            Defaults to 1024.
        interp (int | str): set the interpolation (from 0 to 1)

            Allowed values:
                * linear
                * cubic

            Defaults to linear.
        i (int | str): set the interpolation (from 0 to 1)

            Allowed values:
                * linear
                * cubic

            Defaults to linear.
        phase (int | str): set the phase (from 0 to 1)

            Allowed values:
                * linear
                * min

            Defaults to min.
        h (int | str): set the phase (from 0 to 1)

            Allowed values:
                * linear
                * min

            Defaults to min.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="afireqsrc",
        named_arguments={
            "preset": preset,
            "p": p,
            "gains": gains,
            "g": g,
            "bands": bands,
            "b": b,
            "taps": taps,
            "t": t,
            "sample_rate": sample_rate,
            "r": r,
            "nb_samples": nb_samples,
            "n": n,
            "interp": interp,
            "i": i,
            "phase": phase,
            "h": h,
        },
    )


def afirsrc(
    taps: int | None = None,
    t: int | None = None,
    frequency: str | None = None,
    f: str | None = None,
    magnitude: str | None = None,
    m: str | None = None,
    phase: str | None = None,
    p: str | None = None,
    sample_rate: int | None = None,
    r: int | None = None,
    nb_samples: int | None = None,
    n: int | None = None,
    win_func: Literal[
        "rect",
        "bartlett",
        "hann",
        "hanning",
        "hamming",
        "blackman",
        "welch",
        "flattop",
        "bharris",
        "bnuttall",
        "bhann",
        "sine",
        "nuttall",
        "lanczos",
        "gauss",
        "tukey",
        "dolph",
        "cauchy",
        "parzen",
        "poisson",
        "bohman",
        "kaiser",
        "rect",
        "bartlett",
        "hann",
        "hanning",
        "hamming",
        "blackman",
        "welch",
        "flattop",
        "bharris",
        "bnuttall",
        "bhann",
        "sine",
        "nuttall",
        "lanczos",
        "gauss",
        "tukey",
        "dolph",
        "cauchy",
        "parzen",
        "poisson",
        "bohman",
        "kaiser",
    ]
    | int
    | None = None,
    w: Literal[
        "rect",
        "bartlett",
        "hann",
        "hanning",
        "hamming",
        "blackman",
        "welch",
        "flattop",
        "bharris",
        "bnuttall",
        "bhann",
        "sine",
        "nuttall",
        "lanczos",
        "gauss",
        "tukey",
        "dolph",
        "cauchy",
        "parzen",
        "poisson",
        "bohman",
        "kaiser",
        "rect",
        "bartlett",
        "hann",
        "hanning",
        "hamming",
        "blackman",
        "welch",
        "flattop",
        "bharris",
        "bnuttall",
        "bhann",
        "sine",
        "nuttall",
        "lanczos",
        "gauss",
        "tukey",
        "dolph",
        "cauchy",
        "parzen",
        "poisson",
        "bohman",
        "kaiser",
    ]
    | int
    | None = None,
) -> "Stream":
    """Generate a FIR coefficients audio stream.
    Args:
        taps (int): set number of taps (from 9 to 65535)

            Defaults to 1025.
        t (int): set number of taps (from 9 to 65535)

            Defaults to 1025.
        frequency (str): set frequency points

            Defaults to 0 1.
        f (str): set frequency points

            Defaults to 0 1.
        magnitude (str): set magnitude values

            Defaults to 1 1.
        m (str): set magnitude values

            Defaults to 1 1.
        phase (str): set phase values

            Defaults to 0 0.
        p (str): set phase values

            Defaults to 0 0.
        sample_rate (int): set sample rate (from 1 to INT_MAX)

            Defaults to 44100.
        r (int): set sample rate (from 1 to INT_MAX)

            Defaults to 44100.
        nb_samples (int): set the number of samples per requested frame (from 1 to INT_MAX)

            Defaults to 1024.
        n (int): set the number of samples per requested frame (from 1 to INT_MAX)

            Defaults to 1024.
        win_func (int | str): set window function (from 0 to 20)

            Allowed values:
                * rect
                * bartlett
                * hann
                * hanning
                * hamming
                * blackman
                * welch
                * flattop
                * bharris
                * bnuttall
                * bhann
                * sine
                * nuttall
                * lanczos
                * gauss
                * tukey
                * dolph
                * cauchy
                * parzen
                * poisson
                * bohman
                * kaiser
                * rect
                * bartlett
                * hann
                * hanning
                * hamming
                * blackman
                * welch
                * flattop
                * bharris
                * bnuttall
                * bhann
                * sine
                * nuttall
                * lanczos
                * gauss
                * tukey
                * dolph
                * cauchy
                * parzen
                * poisson
                * bohman
                * kaiser

            Defaults to blackman.
        w (int | str): set window function (from 0 to 20)

            Allowed values:
                * rect
                * bartlett
                * hann
                * hanning
                * hamming
                * blackman
                * welch
                * flattop
                * bharris
                * bnuttall
                * bhann
                * sine
                * nuttall
                * lanczos
                * gauss
                * tukey
                * dolph
                * cauchy
                * parzen
                * poisson
                * bohman
                * kaiser
                * rect
                * bartlett
                * hann
                * hanning
                * hamming
                * blackman
                * welch
                * flattop
                * bharris
                * bnuttall
                * bhann
                * sine
                * nuttall
                * lanczos
                * gauss
                * tukey
                * dolph
                * cauchy
                * parzen
                * poisson
                * bohman
                * kaiser

            Defaults to blackman.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="afirsrc",
        named_arguments={
            "taps": taps,
            "t": t,
            "frequency": frequency,
            "f": f,
            "magnitude": magnitude,
            "m": m,
            "phase": phase,
            "p": p,
            "sample_rate": sample_rate,
            "r": r,
            "nb_samples": nb_samples,
            "n": n,
            "win_func": win_func,
            "w": w,
        },
    )


def allrgb(
    rate: str | None = None,
    r: str | None = None,
    duration: str | None = None,
    d: str | None = None,
    sar: str | None = None,
) -> "Stream":
    """Generate all RGB colors.
    Args:
        rate (str): set video rate

            Defaults to 25.
        r (str): set video rate

            Defaults to 25.
        duration (str): set video duration

            Defaults to -0.000001.
        d (str): set video duration

            Defaults to -0.000001.
        sar (str): set video sample aspect ratio (from 0 to INT_MAX)

            Defaults to 1/1.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="allrgb",
        named_arguments={
            "rate": rate,
            "r": r,
            "duration": duration,
            "d": d,
            "sar": sar,
        },
    )


def allyuv(
    rate: str | None = None,
    r: str | None = None,
    duration: str | None = None,
    d: str | None = None,
    sar: str | None = None,
) -> "Stream":
    """Generate all yuv colors.
    Args:
        rate (str): set video rate

            Defaults to 25.
        r (str): set video rate

            Defaults to 25.
        duration (str): set video duration

            Defaults to -0.000001.
        d (str): set video duration

            Defaults to -0.000001.
        sar (str): set video sample aspect ratio (from 0 to INT_MAX)

            Defaults to 1/1.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="allyuv",
        named_arguments={
            "rate": rate,
            "r": r,
            "duration": duration,
            "d": d,
            "sar": sar,
        },
    )


def amovie(
    filename: str | None = None,
    format_name: str | None = None,
    f: str | None = None,
    stream_index: int | None = None,
    si: int | None = None,
    seek_point: float | None = None,
    sp: float | None = None,
    streams: str | None = None,
    s: str | None = None,
    loop: int | None = None,
    discontinuity: str | None = None,
    dec_threads: int | None = None,
    format_opts: str | None = None,
) -> "FilterMultiOutput":
    """Read audio from a movie source.
    Args:
        filename (str): No description available.

        format_name (str): set format name

        f (str): set format name

        stream_index (int): set stream index (from -1 to INT_MAX)

            Defaults to -1.
        si (int): set stream index (from -1 to INT_MAX)

            Defaults to -1.
        seek_point (float): set seekpoint (seconds) (from 0 to 9.22337e+12)

            Defaults to 0.
        sp (float): set seekpoint (seconds) (from 0 to 9.22337e+12)

            Defaults to 0.
        streams (str): set streams

        s (str): set streams

        loop (int): set loop count (from 0 to INT_MAX)

            Defaults to 1.
        discontinuity (str): set discontinuity threshold

            Defaults to 0.
        dec_threads (int): set the number of threads for decoding (from 0 to INT_MAX)

            Defaults to 0.
        format_opts (str): set format options for the opened file


    Returns:
        "FilterMultiOutput": A FilterMultiOutput object to access dynamic outputs.
    """
    return create_source(
        filter_name="amovie",
        named_arguments={
            "filename": filename,
            "format_name": format_name,
            "f": f,
            "stream_index": stream_index,
            "si": si,
            "seek_point": seek_point,
            "sp": sp,
            "streams": streams,
            "s": s,
            "loop": loop,
            "discontinuity": discontinuity,
            "dec_threads": dec_threads,
            "format_opts": format_opts,
        },
        is_dynamic=True,
    )


def anoisesrc(
    sample_rate: int | None = None,
    r: int | None = None,
    amplitude: float | None = None,
    a: float | None = None,
    duration: str | None = None,
    d: str | None = None,
    color: Literal["white", "pink", "brown", "blue", "violet", "velvet"]
    | int
    | None = None,
    colour: Literal["white", "pink", "brown", "blue", "violet", "velvet"]
    | int
    | None = None,
    c: Literal["white", "pink", "brown", "blue", "violet", "velvet"]
    | int
    | None = None,
    seed: str | None = None,
    s: str | None = None,
    nb_samples: int | None = None,
    n: int | None = None,
    density: float | None = None,
) -> "Stream":
    """Generate a noise audio signal.
    Args:
        sample_rate (int): set sample rate (from 15 to INT_MAX)

            Defaults to 48000.
        r (int): set sample rate (from 15 to INT_MAX)

            Defaults to 48000.
        amplitude (float): set amplitude (from 0 to 1)

            Defaults to 1.
        a (float): set amplitude (from 0 to 1)

            Defaults to 1.
        duration (str): set duration

            Defaults to 0.
        d (str): set duration

            Defaults to 0.
        color (int | str): set noise color (from 0 to 5)

            Allowed values:
                * white
                * pink
                * brown
                * blue
                * violet
                * velvet

            Defaults to white.
        colour (int | str): set noise color (from 0 to 5)

            Allowed values:
                * white
                * pink
                * brown
                * blue
                * violet
                * velvet

            Defaults to white.
        c (int | str): set noise color (from 0 to 5)

            Allowed values:
                * white
                * pink
                * brown
                * blue
                * violet
                * velvet

            Defaults to white.
        seed (str): set random seed (from -1 to UINT32_MAX)

            Defaults to -1.
        s (str): set random seed (from -1 to UINT32_MAX)

            Defaults to -1.
        nb_samples (int): set the number of samples per requested frame (from 1 to INT_MAX)

            Defaults to 1024.
        n (int): set the number of samples per requested frame (from 1 to INT_MAX)

            Defaults to 1024.
        density (float): set density (from 0 to 1)

            Defaults to 0.05.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="anoisesrc",
        named_arguments={
            "sample_rate": sample_rate,
            "r": r,
            "amplitude": amplitude,
            "a": a,
            "duration": duration,
            "d": d,
            "color": color,
            "colour": colour,
            "c": c,
            "seed": seed,
            "s": s,
            "nb_samples": nb_samples,
            "n": n,
            "density": density,
        },
    )


def anullsrc(
    channel_layout: str | None = None,
    cl: str | None = None,
    sample_rate: int | None = None,
    r: int | None = None,
    nb_samples: int | None = None,
    n: int | None = None,
    duration: str | None = None,
    d: str | None = None,
) -> "Stream":
    """Null audio source, return empty audio frames.
    Args:
        channel_layout (str): set channel_layout

            Defaults to stereo.
        cl (str): set channel_layout

            Defaults to stereo.
        sample_rate (int): set sample rate (from 1 to INT_MAX)

            Defaults to 44100.
        r (int): set sample rate (from 1 to INT_MAX)

            Defaults to 44100.
        nb_samples (int): set the number of samples per requested frame (from 1 to 65535)

            Defaults to 1024.
        n (int): set the number of samples per requested frame (from 1 to 65535)

            Defaults to 1024.
        duration (str): set the audio duration

            Defaults to -0.000001.
        d (str): set the audio duration

            Defaults to -0.000001.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="anullsrc",
        named_arguments={
            "channel_layout": channel_layout,
            "cl": cl,
            "sample_rate": sample_rate,
            "r": r,
            "nb_samples": nb_samples,
            "n": n,
            "duration": duration,
            "d": d,
        },
    )


def avsynctest(
    size: str | None = None,
    s: str | None = None,
    framerate: str | None = None,
    fr: str | None = None,
    samplerate: int | None = None,
    sr: int | None = None,
    amplitude: float | None = None,
    a: float | None = None,
    period: int | None = None,
    p: int | None = None,
    delay: int | None = None,
    dl: int | None = None,
    cycle: bool | None = None,
    c: bool | None = None,
    duration: str | None = None,
    d: str | None = None,
    fg: str | None = None,
    bg: str | None = None,
    ag: str | None = None,
) -> list["Stream"]:
    """Generate an Audio Video Sync Test.
    Args:
        size (str): set frame size

            Defaults to hd720.
        s (str): set frame size

            Defaults to hd720.
        framerate (str): set frame rate

            Defaults to 30.
        fr (str): set frame rate

            Defaults to 30.
        samplerate (int): set sample rate (from 8000 to 384000)

            Defaults to 44100.
        sr (int): set sample rate (from 8000 to 384000)

            Defaults to 44100.
        amplitude (float): set beep amplitude (from 0 to 1)

            Defaults to 0.7.
        a (float): set beep amplitude (from 0 to 1)

            Defaults to 0.7.
        period (int): set beep period (from 1 to 99)

            Defaults to 3.
        p (int): set beep period (from 1 to 99)

            Defaults to 3.
        delay (int): set flash delay (from -30 to 30)

            Defaults to 0.
        dl (int): set flash delay (from -30 to 30)

            Defaults to 0.
        cycle (bool): set delay cycle

            Defaults to false.
        c (bool): set delay cycle

            Defaults to false.
        duration (str): set duration

            Defaults to 0.
        d (str): set duration

            Defaults to 0.
        fg (str): set foreground color

            Defaults to white.
        bg (str): set background color

            Defaults to black.
        ag (str): set additional color

            Defaults to gray.

    Returns:
        list["Stream"]: A list of 2 Stream objects.
    """
    return create_source(
        filter_name="avsynctest",
        named_arguments={
            "size": size,
            "s": s,
            "framerate": framerate,
            "fr": fr,
            "samplerate": samplerate,
            "sr": sr,
            "amplitude": amplitude,
            "a": a,
            "period": period,
            "p": p,
            "delay": delay,
            "dl": dl,
            "cycle": cycle,
            "c": c,
            "duration": duration,
            "d": d,
            "fg": fg,
            "bg": bg,
            "ag": ag,
        },
        num_outputs=2,
    )


def buffer(
    width: int | None = None,
    video_size: str | None = None,
    height: int | None = None,
    pix_fmt: str | None = None,
    sar: str | None = None,
    pixel_aspect: str | None = None,
    time_base: str | None = None,
    frame_rate: str | None = None,
    colorspace: Literal[
        "gbr",
        "bt709",
        "unknown",
        "fcc",
        "bt470bg",
        "smpte170m",
        "smpte240m",
        "ycgco",
        "ycgco-re",
        "ycgco-ro",
        "bt2020nc",
        "bt2020c",
        "smpte2085",
        "chroma-derived-nc",
        "chroma-derived-c",
        "ictcp",
        "ipt-c2",
    ]
    | int
    | None = None,
    range: Literal[
        "unspecified", "unknown", "limited", "tv", "mpeg", "full", "pc", "jpeg"
    ]
    | int
    | None = None,
) -> "Stream":
    """Buffer video frames, and make them accessible to the filterchain.
    Args:
        width (int): (from 0 to INT_MAX)

            Defaults to 0.
        video_size (str): No description available.

        height (int): (from 0 to INT_MAX)

            Defaults to 0.
        pix_fmt (str): No description available.

            Defaults to none.
        sar (str): sample aspect ratio (from 0 to DBL_MAX)

            Defaults to 0/1.
        pixel_aspect (str): sample aspect ratio (from 0 to DBL_MAX)

            Defaults to 0/1.
        time_base (str): (from 0 to DBL_MAX)

            Defaults to 0/1.
        frame_rate (str): (from 0 to DBL_MAX)

            Defaults to 0/1.
        colorspace (int | str): select colorspace (from 0 to 17)

            Allowed values:
                * gbr
                * bt709
                * unknown
                * fcc
                * bt470bg
                * smpte170m
                * smpte240m
                * ycgco
                * ycgco-re
                * ycgco-ro
                * bt2020nc
                * bt2020c
                * smpte2085
                * chroma-derived-nc
                * chroma-derived-c
                * ictcp
                * ipt-c2

            Defaults to unknown.
        range (int | str): select color range (from 0 to 2)

            Allowed values:
                * unspecified
                * unknown
                * limited
                * tv
                * mpeg
                * full
                * pc
                * jpeg

            Defaults to unspecified.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="buffer",
        named_arguments={
            "width": width,
            "video_size": video_size,
            "height": height,
            "pix_fmt": pix_fmt,
            "sar": sar,
            "pixel_aspect": pixel_aspect,
            "time_base": time_base,
            "frame_rate": frame_rate,
            "colorspace": colorspace,
            "range": range,
        },
    )


def cellauto(
    filename: str | None = None,
    f: str | None = None,
    pattern: str | None = None,
    p: str | None = None,
    rate: str | None = None,
    r: str | None = None,
    size: str | None = None,
    s: str | None = None,
    rule: int | None = None,
    random_fill_ratio: float | None = None,
    ratio: float | None = None,
    random_seed: str | None = None,
    seed: str | None = None,
    scroll: bool | None = None,
    start_full: bool | None = None,
    full: bool | None = None,
    stitch: bool | None = None,
) -> "Stream":
    """Create pattern generated by an elementary cellular automaton.
    Args:
        filename (str): read initial pattern from file

        f (str): read initial pattern from file

        pattern (str): set initial pattern

        p (str): set initial pattern

        rate (str): set video rate

            Defaults to 25.
        r (str): set video rate

            Defaults to 25.
        size (str): set video size

        s (str): set video size

        rule (int): set rule (from 0 to 255)

            Defaults to 110.
        random_fill_ratio (float): set fill ratio for filling initial grid randomly (from 0 to 1)

            Defaults to 0.618034.
        ratio (float): set fill ratio for filling initial grid randomly (from 0 to 1)

            Defaults to 0.618034.
        random_seed (str): set the seed for filling the initial grid randomly (from -1 to UINT32_MAX)

            Defaults to -1.
        seed (str): set the seed for filling the initial grid randomly (from -1 to UINT32_MAX)

            Defaults to -1.
        scroll (bool): scroll pattern downward

            Defaults to true.
        start_full (bool): start filling the whole video

            Defaults to false.
        full (bool): start filling the whole video

            Defaults to true.
        stitch (bool): stitch boundaries

            Defaults to true.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="cellauto",
        named_arguments={
            "filename": filename,
            "f": f,
            "pattern": pattern,
            "p": p,
            "rate": rate,
            "r": r,
            "size": size,
            "s": s,
            "rule": rule,
            "random_fill_ratio": random_fill_ratio,
            "ratio": ratio,
            "random_seed": random_seed,
            "seed": seed,
            "scroll": scroll,
            "start_full": start_full,
            "full": full,
            "stitch": stitch,
        },
    )


def color(
    color: str | None = None,
    c: str | None = None,
    size: str | None = None,
    s: str | None = None,
    rate: str | None = None,
    r: str | None = None,
    duration: str | None = None,
    d: str | None = None,
    sar: str | None = None,
) -> "Stream":
    """Provide an uniformly colored input.
    Args:
        color (str): set color

            Defaults to black.
        c (str): set color

            Defaults to black.
        size (str): set video size

            Defaults to 320x240.
        s (str): set video size

            Defaults to 320x240.
        rate (str): set video rate

            Defaults to 25.
        r (str): set video rate

            Defaults to 25.
        duration (str): set video duration

            Defaults to -0.000001.
        d (str): set video duration

            Defaults to -0.000001.
        sar (str): set video sample aspect ratio (from 0 to INT_MAX)

            Defaults to 1/1.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="color",
        named_arguments={
            "color": color,
            "c": c,
            "size": size,
            "s": s,
            "rate": rate,
            "r": r,
            "duration": duration,
            "d": d,
            "sar": sar,
        },
    )


def colorchart(
    rate: str | None = None,
    r: str | None = None,
    duration: str | None = None,
    d: str | None = None,
    sar: str | None = None,
    patch_size: str | None = None,
    preset: Literal["reference", "skintones"] | int | None = None,
) -> "Stream":
    """Generate color checker chart.
    Args:
        rate (str): set video rate

            Defaults to 25.
        r (str): set video rate

            Defaults to 25.
        duration (str): set video duration

            Defaults to -0.000001.
        d (str): set video duration

            Defaults to -0.000001.
        sar (str): set video sample aspect ratio (from 0 to INT_MAX)

            Defaults to 1/1.
        patch_size (str): set the single patch size

            Defaults to 64x64.
        preset (int | str): set the color checker chart preset (from 0 to 1)

            Allowed values:
                * reference
                * skintones

            Defaults to reference.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="colorchart",
        named_arguments={
            "rate": rate,
            "r": r,
            "duration": duration,
            "d": d,
            "sar": sar,
            "patch_size": patch_size,
            "preset": preset,
        },
    )


def colorspectrum(
    size: str | None = None,
    s: str | None = None,
    rate: str | None = None,
    r: str | None = None,
    duration: str | None = None,
    d: str | None = None,
    sar: str | None = None,
    type: Literal["black", "white", "all"] | int | None = None,
) -> "Stream":
    """Generate colors spectrum.
    Args:
        size (str): set video size

            Defaults to 320x240.
        s (str): set video size

            Defaults to 320x240.
        rate (str): set video rate

            Defaults to 25.
        r (str): set video rate

            Defaults to 25.
        duration (str): set video duration

            Defaults to -0.000001.
        d (str): set video duration

            Defaults to -0.000001.
        sar (str): set video sample aspect ratio (from 0 to INT_MAX)

            Defaults to 1/1.
        type (int | str): set the color spectrum type (from 0 to 2)

            Allowed values:
                * black
                * white
                * all

            Defaults to black.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="colorspectrum",
        named_arguments={
            "size": size,
            "s": s,
            "rate": rate,
            "r": r,
            "duration": duration,
            "d": d,
            "sar": sar,
            "type": type,
        },
    )


def coreimagesrc(
    size: str | None = None,
    s: str | None = None,
    rate: str | None = None,
    r: str | None = None,
    duration: str | None = None,
    d: str | None = None,
    sar: str | None = None,
    list_filters: bool | None = None,
    list_generators: bool | None = None,
    filter: str | None = None,
    output_rect: str | None = None,
) -> "Stream":
    """Video source using image generators of CoreImage API.
    Args:
        size (str): set video size

            Defaults to 320x240.
        s (str): set video size

            Defaults to 320x240.
        rate (str): set video rate

            Defaults to 25.
        r (str): set video rate

            Defaults to 25.
        duration (str): set video duration

            Defaults to -0.000001.
        d (str): set video duration

            Defaults to -0.000001.
        sar (str): set video sample aspect ratio (from 0 to INT_MAX)

            Defaults to 1/1.
        list_filters (bool): list available filters

            Defaults to false.
        list_generators (bool): list available generators

            Defaults to false.
        filter (str): names and options of filters to apply

        output_rect (str): output rectangle within output image


    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="coreimagesrc",
        named_arguments={
            "size": size,
            "s": s,
            "rate": rate,
            "r": r,
            "duration": duration,
            "d": d,
            "sar": sar,
            "list_filters": list_filters,
            "list_generators": list_generators,
            "filter": filter,
            "output_rect": output_rect,
        },
    )


def frei0r_src(
    size: str | None = None,
    framerate: str | None = None,
    filter_name: str | None = None,
    filter_params: str | None = None,
) -> "Stream":
    """Generate a frei0r source.
    Args:
        size (str): Dimensions of the generated video.

            Defaults to 320x240.
        framerate (str): No description available.

            Defaults to 25.
        filter_name (str): No description available.

        filter_params (str): No description available.


    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="frei0r_src",
        named_arguments={
            "size": size,
            "framerate": framerate,
            "filter_name": filter_name,
            "filter_params": filter_params,
        },
    )


def gradients(
    size: str | None = None,
    s: str | None = None,
    rate: str | None = None,
    r: str | None = None,
    c0: str | None = None,
    c1: str | None = None,
    c2: str | None = None,
    c3: str | None = None,
    c4: str | None = None,
    c5: str | None = None,
    c6: str | None = None,
    c7: str | None = None,
    x0: int | None = None,
    y0: int | None = None,
    x1: int | None = None,
    y1: int | None = None,
    nb_colors: int | None = None,
    n: int | None = None,
    seed: str | None = None,
    duration: str | None = None,
    d: str | None = None,
    speed: float | None = None,
    type: Literal["linear", "radial", "circular", "spiral", "square"]
    | int
    | None = None,
    t: Literal["linear", "radial", "circular", "spiral", "square"] | int | None = None,
) -> "Stream":
    """Draw a gradients.
    Args:
        size (str): set frame size

            Defaults to 640x480.
        s (str): set frame size

            Defaults to 640x480.
        rate (str): set frame rate

            Defaults to 25.
        r (str): set frame rate

            Defaults to 25.
        c0 (str): set 1st color

            Defaults to random.
        c1 (str): set 2nd color

            Defaults to random.
        c2 (str): set 3rd color

            Defaults to random.
        c3 (str): set 4th color

            Defaults to random.
        c4 (str): set 5th color

            Defaults to random.
        c5 (str): set 6th color

            Defaults to random.
        c6 (str): set 7th color

            Defaults to random.
        c7 (str): set 8th color

            Defaults to random.
        x0 (int): set gradient line source x0 (from -1 to INT_MAX)

            Defaults to -1.
        y0 (int): set gradient line source y0 (from -1 to INT_MAX)

            Defaults to -1.
        x1 (int): set gradient line destination x1 (from -1 to INT_MAX)

            Defaults to -1.
        y1 (int): set gradient line destination y1 (from -1 to INT_MAX)

            Defaults to -1.
        nb_colors (int): set the number of colors (from 2 to 8)

            Defaults to 2.
        n (int): set the number of colors (from 2 to 8)

            Defaults to 2.
        seed (str): set the seed (from -1 to UINT32_MAX)

            Defaults to -1.
        duration (str): set video duration

            Defaults to -0.000001.
        d (str): set video duration

            Defaults to -0.000001.
        speed (float): set gradients rotation speed (from 0 to 1)

            Defaults to 0.01.
        type (int | str): set gradient type (from 0 to 4)

            Allowed values:
                * linear
                * radial
                * circular
                * spiral
                * square

            Defaults to linear.
        t (int | str): set gradient type (from 0 to 4)

            Allowed values:
                * linear
                * radial
                * circular
                * spiral
                * square

            Defaults to linear.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="gradients",
        named_arguments={
            "size": size,
            "s": s,
            "rate": rate,
            "r": r,
            "c0": c0,
            "c1": c1,
            "c2": c2,
            "c3": c3,
            "c4": c4,
            "c5": c5,
            "c6": c6,
            "c7": c7,
            "x0": x0,
            "y0": y0,
            "x1": x1,
            "y1": y1,
            "nb_colors": nb_colors,
            "n": n,
            "seed": seed,
            "duration": duration,
            "d": d,
            "speed": speed,
            "type": type,
            "t": t,
        },
    )


def haldclutsrc(
    level: int | None = None,
    rate: str | None = None,
    r: str | None = None,
    duration: str | None = None,
    d: str | None = None,
    sar: str | None = None,
) -> "Stream":
    """Provide an identity Hald CLUT.
    Args:
        level (int): set level (from 2 to 16)

            Defaults to 6.
        rate (str): set video rate

            Defaults to 25.
        r (str): set video rate

            Defaults to 25.
        duration (str): set video duration

            Defaults to -0.000001.
        d (str): set video duration

            Defaults to -0.000001.
        sar (str): set video sample aspect ratio (from 0 to INT_MAX)

            Defaults to 1/1.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="haldclutsrc",
        named_arguments={
            "level": level,
            "rate": rate,
            "r": r,
            "duration": duration,
            "d": d,
            "sar": sar,
        },
    )


def hilbert(
    sample_rate: int | None = None,
    r: int | None = None,
    taps: int | None = None,
    t: int | None = None,
    nb_samples: int | None = None,
    n: int | None = None,
    win_func: Literal[
        "rect",
        "bartlett",
        "hann",
        "hanning",
        "hamming",
        "blackman",
        "welch",
        "flattop",
        "bharris",
        "bnuttall",
        "bhann",
        "sine",
        "nuttall",
        "lanczos",
        "gauss",
        "tukey",
        "dolph",
        "cauchy",
        "parzen",
        "poisson",
        "bohman",
        "kaiser",
        "rect",
        "bartlett",
        "hann",
        "hanning",
        "hamming",
        "blackman",
        "welch",
        "flattop",
        "bharris",
        "bnuttall",
        "bhann",
        "sine",
        "nuttall",
        "lanczos",
        "gauss",
        "tukey",
        "dolph",
        "cauchy",
        "parzen",
        "poisson",
        "bohman",
        "kaiser",
    ]
    | int
    | None = None,
    w: Literal[
        "rect",
        "bartlett",
        "hann",
        "hanning",
        "hamming",
        "blackman",
        "welch",
        "flattop",
        "bharris",
        "bnuttall",
        "bhann",
        "sine",
        "nuttall",
        "lanczos",
        "gauss",
        "tukey",
        "dolph",
        "cauchy",
        "parzen",
        "poisson",
        "bohman",
        "kaiser",
        "rect",
        "bartlett",
        "hann",
        "hanning",
        "hamming",
        "blackman",
        "welch",
        "flattop",
        "bharris",
        "bnuttall",
        "bhann",
        "sine",
        "nuttall",
        "lanczos",
        "gauss",
        "tukey",
        "dolph",
        "cauchy",
        "parzen",
        "poisson",
        "bohman",
        "kaiser",
    ]
    | int
    | None = None,
) -> "Stream":
    """Generate a Hilbert transform FIR coefficients.
    Args:
        sample_rate (int): set sample rate (from 1 to INT_MAX)

            Defaults to 44100.
        r (int): set sample rate (from 1 to INT_MAX)

            Defaults to 44100.
        taps (int): set number of taps (from 11 to 65535)

            Defaults to 22051.
        t (int): set number of taps (from 11 to 65535)

            Defaults to 22051.
        nb_samples (int): set the number of samples per requested frame (from 1 to INT_MAX)

            Defaults to 1024.
        n (int): set the number of samples per requested frame (from 1 to INT_MAX)

            Defaults to 1024.
        win_func (int | str): set window function (from 0 to 20)

            Allowed values:
                * rect
                * bartlett
                * hann
                * hanning
                * hamming
                * blackman
                * welch
                * flattop
                * bharris
                * bnuttall
                * bhann
                * sine
                * nuttall
                * lanczos
                * gauss
                * tukey
                * dolph
                * cauchy
                * parzen
                * poisson
                * bohman
                * kaiser
                * rect
                * bartlett
                * hann
                * hanning
                * hamming
                * blackman
                * welch
                * flattop
                * bharris
                * bnuttall
                * bhann
                * sine
                * nuttall
                * lanczos
                * gauss
                * tukey
                * dolph
                * cauchy
                * parzen
                * poisson
                * bohman
                * kaiser

            Defaults to blackman.
        w (int | str): set window function (from 0 to 20)

            Allowed values:
                * rect
                * bartlett
                * hann
                * hanning
                * hamming
                * blackman
                * welch
                * flattop
                * bharris
                * bnuttall
                * bhann
                * sine
                * nuttall
                * lanczos
                * gauss
                * tukey
                * dolph
                * cauchy
                * parzen
                * poisson
                * bohman
                * kaiser
                * rect
                * bartlett
                * hann
                * hanning
                * hamming
                * blackman
                * welch
                * flattop
                * bharris
                * bnuttall
                * bhann
                * sine
                * nuttall
                * lanczos
                * gauss
                * tukey
                * dolph
                * cauchy
                * parzen
                * poisson
                * bohman
                * kaiser

            Defaults to blackman.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="hilbert",
        named_arguments={
            "sample_rate": sample_rate,
            "r": r,
            "taps": taps,
            "t": t,
            "nb_samples": nb_samples,
            "n": n,
            "win_func": win_func,
            "w": w,
        },
    )


def life(
    filename: str | None = None,
    f: str | None = None,
    size: str | None = None,
    s: str | None = None,
    rate: str | None = None,
    r: str | None = None,
    rule: str | None = None,
    random_fill_ratio: float | None = None,
    ratio: float | None = None,
    random_seed: str | None = None,
    seed: str | None = None,
    stitch: bool | None = None,
    mold: int | None = None,
    life_color: str | None = None,
    death_color: str | None = None,
    mold_color: str | None = None,
) -> "Stream":
    """Create life.
    Args:
        filename (str): set source file

        f (str): set source file

        size (str): set video size

        s (str): set video size

        rate (str): set video rate

            Defaults to 25.
        r (str): set video rate

            Defaults to 25.
        rule (str): set rule

            Defaults to B3/S23.
        random_fill_ratio (float): set fill ratio for filling initial grid randomly (from 0 to 1)

            Defaults to 0.618034.
        ratio (float): set fill ratio for filling initial grid randomly (from 0 to 1)

            Defaults to 0.618034.
        random_seed (str): set the seed for filling the initial grid randomly (from -1 to UINT32_MAX)

            Defaults to -1.
        seed (str): set the seed for filling the initial grid randomly (from -1 to UINT32_MAX)

            Defaults to -1.
        stitch (bool): stitch boundaries

            Defaults to true.
        mold (int): set mold speed for dead cells (from 0 to 255)

            Defaults to 0.
        life_color (str): set life color

            Defaults to white.
        death_color (str): set death color

            Defaults to black.
        mold_color (str): set mold color

            Defaults to black.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="life",
        named_arguments={
            "filename": filename,
            "f": f,
            "size": size,
            "s": s,
            "rate": rate,
            "r": r,
            "rule": rule,
            "random_fill_ratio": random_fill_ratio,
            "ratio": ratio,
            "random_seed": random_seed,
            "seed": seed,
            "stitch": stitch,
            "mold": mold,
            "life_color": life_color,
            "death_color": death_color,
            "mold_color": mold_color,
        },
    )


def mandelbrot(
    size: str | None = None,
    s: str | None = None,
    rate: str | None = None,
    r: str | None = None,
    maxiter: int | None = None,
    start_x: float | None = None,
    start_y: float | None = None,
    start_scale: float | None = None,
    end_scale: float | None = None,
    end_pts: float | None = None,
    bailout: float | None = None,
    morphxf: float | None = None,
    morphyf: float | None = None,
    morphamp: float | None = None,
    outer: Literal["iteration_count", "normalized_iteration_count", "white", "outz"]
    | int
    | None = None,
    inner: Literal["black", "period", "convergence", "mincol"] | int | None = None,
) -> "Stream":
    """Render a Mandelbrot fractal.
    Args:
        size (str): set frame size

            Defaults to 640x480.
        s (str): set frame size

            Defaults to 640x480.
        rate (str): set frame rate

            Defaults to 25.
        r (str): set frame rate

            Defaults to 25.
        maxiter (int): set max iterations number (from 1 to INT_MAX)

            Defaults to 7189.
        start_x (float): set the initial x position (from -100 to 100)

            Defaults to -0.743644.
        start_y (float): set the initial y position (from -100 to 100)

            Defaults to -0.131826.
        start_scale (float): set the initial scale value (from 0 to FLT_MAX)

            Defaults to 3.
        end_scale (float): set the terminal scale value (from 0 to FLT_MAX)

            Defaults to 0.3.
        end_pts (float): set the terminal pts value (from 0 to I64_MAX)

            Defaults to 400.
        bailout (float): set the bailout value (from 0 to FLT_MAX)

            Defaults to 10.
        morphxf (float): set morph x frequency (from -FLT_MAX to FLT_MAX)

            Defaults to 0.01.
        morphyf (float): set morph y frequency (from -FLT_MAX to FLT_MAX)

            Defaults to 0.0123.
        morphamp (float): set morph amplitude (from -FLT_MAX to FLT_MAX)

            Defaults to 0.
        outer (int | str): set outer coloring mode (from 0 to INT_MAX)

            Allowed values:
                * iteration_count
                * normalized_iteration_count
                * white
                * outz

            Defaults to normalized_iteration_count.
        inner (int | str): set inner coloring mode (from 0 to INT_MAX)

            Allowed values:
                * black
                * period
                * convergence
                * mincol

            Defaults to mincol.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="mandelbrot",
        named_arguments={
            "size": size,
            "s": s,
            "rate": rate,
            "r": r,
            "maxiter": maxiter,
            "start_x": start_x,
            "start_y": start_y,
            "start_scale": start_scale,
            "end_scale": end_scale,
            "end_pts": end_pts,
            "bailout": bailout,
            "morphxf": morphxf,
            "morphyf": morphyf,
            "morphamp": morphamp,
            "outer": outer,
            "inner": inner,
        },
    )


def movie(
    filename: str | None = None,
    format_name: str | None = None,
    f: str | None = None,
    stream_index: int | None = None,
    si: int | None = None,
    seek_point: float | None = None,
    sp: float | None = None,
    streams: str | None = None,
    s: str | None = None,
    loop: int | None = None,
    discontinuity: str | None = None,
    dec_threads: int | None = None,
    format_opts: str | None = None,
) -> "FilterMultiOutput":
    """Read from a movie source.
    Args:
        filename (str): No description available.

        format_name (str): set format name

        f (str): set format name

        stream_index (int): set stream index (from -1 to INT_MAX)

            Defaults to -1.
        si (int): set stream index (from -1 to INT_MAX)

            Defaults to -1.
        seek_point (float): set seekpoint (seconds) (from 0 to 9.22337e+12)

            Defaults to 0.
        sp (float): set seekpoint (seconds) (from 0 to 9.22337e+12)

            Defaults to 0.
        streams (str): set streams

        s (str): set streams

        loop (int): set loop count (from 0 to INT_MAX)

            Defaults to 1.
        discontinuity (str): set discontinuity threshold

            Defaults to 0.
        dec_threads (int): set the number of threads for decoding (from 0 to INT_MAX)

            Defaults to 0.
        format_opts (str): set format options for the opened file


    Returns:
        "FilterMultiOutput": A FilterMultiOutput object to access dynamic outputs.
    """
    return create_source(
        filter_name="movie",
        named_arguments={
            "filename": filename,
            "format_name": format_name,
            "f": f,
            "stream_index": stream_index,
            "si": si,
            "seek_point": seek_point,
            "sp": sp,
            "streams": streams,
            "s": s,
            "loop": loop,
            "discontinuity": discontinuity,
            "dec_threads": dec_threads,
            "format_opts": format_opts,
        },
        is_dynamic=True,
    )


def mptestsrc(
    rate: str | None = None,
    r: str | None = None,
    duration: str | None = None,
    d: str | None = None,
    test: Literal[
        "dc_luma",
        "dc_chroma",
        "freq_luma",
        "freq_chroma",
        "amp_luma",
        "amp_chroma",
        "cbp",
        "mv",
        "ring1",
        "ring2",
        "all",
    ]
    | int
    | None = None,
    t: Literal[
        "dc_luma",
        "dc_chroma",
        "freq_luma",
        "freq_chroma",
        "amp_luma",
        "amp_chroma",
        "cbp",
        "mv",
        "ring1",
        "ring2",
        "all",
    ]
    | int
    | None = None,
    max_frames: str | None = None,
    m: str | None = None,
) -> "Stream":
    """Generate various test pattern.
    Args:
        rate (str): set video rate

            Defaults to 25.
        r (str): set video rate

            Defaults to 25.
        duration (str): set video duration

            Defaults to -0.000001.
        d (str): set video duration

            Defaults to -0.000001.
        test (int | str): set test to perform (from 0 to INT_MAX)

            Allowed values:
                * dc_luma
                * dc_chroma
                * freq_luma
                * freq_chroma
                * amp_luma
                * amp_chroma
                * cbp
                * mv
                * ring1
                * ring2
                * all

            Defaults to all.
        t (int | str): set test to perform (from 0 to INT_MAX)

            Allowed values:
                * dc_luma
                * dc_chroma
                * freq_luma
                * freq_chroma
                * amp_luma
                * amp_chroma
                * cbp
                * mv
                * ring1
                * ring2
                * all

            Defaults to all.
        max_frames (str): Set the maximum number of frames generated for each test (from 1 to I64_MAX)

            Defaults to 30.
        m (str): Set the maximum number of frames generated for each test (from 1 to I64_MAX)

            Defaults to 30.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="mptestsrc",
        named_arguments={
            "rate": rate,
            "r": r,
            "duration": duration,
            "d": d,
            "test": test,
            "t": t,
            "max_frames": max_frames,
            "m": m,
        },
    )


def nullsrc(
    size: str | None = None,
    s: str | None = None,
    rate: str | None = None,
    r: str | None = None,
    duration: str | None = None,
    d: str | None = None,
    sar: str | None = None,
) -> "Stream":
    """Null video source, return unprocessed video frames.
    Args:
        size (str): set video size

            Defaults to 320x240.
        s (str): set video size

            Defaults to 320x240.
        rate (str): set video rate

            Defaults to 25.
        r (str): set video rate

            Defaults to 25.
        duration (str): set video duration

            Defaults to -0.000001.
        d (str): set video duration

            Defaults to -0.000001.
        sar (str): set video sample aspect ratio (from 0 to INT_MAX)

            Defaults to 1/1.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="nullsrc",
        named_arguments={
            "size": size,
            "s": s,
            "rate": rate,
            "r": r,
            "duration": duration,
            "d": d,
            "sar": sar,
        },
    )


def pal100bars(
    size: str | None = None,
    s: str | None = None,
    rate: str | None = None,
    r: str | None = None,
    duration: str | None = None,
    d: str | None = None,
    sar: str | None = None,
) -> "Stream":
    """Generate PAL 100% color bars.
    Args:
        size (str): set video size

            Defaults to 320x240.
        s (str): set video size

            Defaults to 320x240.
        rate (str): set video rate

            Defaults to 25.
        r (str): set video rate

            Defaults to 25.
        duration (str): set video duration

            Defaults to -0.000001.
        d (str): set video duration

            Defaults to -0.000001.
        sar (str): set video sample aspect ratio (from 0 to INT_MAX)

            Defaults to 1/1.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="pal100bars",
        named_arguments={
            "size": size,
            "s": s,
            "rate": rate,
            "r": r,
            "duration": duration,
            "d": d,
            "sar": sar,
        },
    )


def pal75bars(
    size: str | None = None,
    s: str | None = None,
    rate: str | None = None,
    r: str | None = None,
    duration: str | None = None,
    d: str | None = None,
    sar: str | None = None,
) -> "Stream":
    """Generate PAL 75% color bars.
    Args:
        size (str): set video size

            Defaults to 320x240.
        s (str): set video size

            Defaults to 320x240.
        rate (str): set video rate

            Defaults to 25.
        r (str): set video rate

            Defaults to 25.
        duration (str): set video duration

            Defaults to -0.000001.
        d (str): set video duration

            Defaults to -0.000001.
        sar (str): set video sample aspect ratio (from 0 to INT_MAX)

            Defaults to 1/1.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="pal75bars",
        named_arguments={
            "size": size,
            "s": s,
            "rate": rate,
            "r": r,
            "duration": duration,
            "d": d,
            "sar": sar,
        },
    )


def perlin(
    size: str | None = None,
    s: str | None = None,
    rate: str | None = None,
    r: str | None = None,
    octaves: int | None = None,
    persistence: float | None = None,
    xscale: float | None = None,
    yscale: float | None = None,
    tscale: float | None = None,
    random_mode: Literal["random", "ken", "seed"] | int | None = None,
    random_seed: str | None = None,
    seed: str | None = None,
) -> "Stream":
    """Generate Perlin noise
    Args:
        size (str): set video size

            Defaults to 320x240.
        s (str): set video size

            Defaults to 320x240.
        rate (str): set video rate

            Defaults to 25.
        r (str): set video rate

            Defaults to 25.
        octaves (int): set the number of components to use to generate the noise (from 1 to INT_MAX)

            Defaults to 1.
        persistence (float): set the octaves persistence (from 0 to DBL_MAX)

            Defaults to 1.
        xscale (float): set x-scale factor (from 0 to DBL_MAX)

            Defaults to 1.
        yscale (float): set y-scale factor (from 0 to DBL_MAX)

            Defaults to 1.
        tscale (float): set t-scale factor (from 0 to DBL_MAX)

            Defaults to 1.
        random_mode (int | str): set random mode used to compute initial pattern (from 0 to 2)

            Allowed values:
                * random
                * ken
                * seed

            Defaults to random.
        random_seed (str): set the seed for filling the initial pattern (from 0 to UINT32_MAX)

            Defaults to 0.
        seed (str): set the seed for filling the initial pattern (from 0 to UINT32_MAX)

            Defaults to 0.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="perlin",
        named_arguments={
            "size": size,
            "s": s,
            "rate": rate,
            "r": r,
            "octaves": octaves,
            "persistence": persistence,
            "xscale": xscale,
            "yscale": yscale,
            "tscale": tscale,
            "random_mode": random_mode,
            "random_seed": random_seed,
            "seed": seed,
        },
    )


def rgbtestsrc(
    size: str | None = None,
    s: str | None = None,
    rate: str | None = None,
    r: str | None = None,
    duration: str | None = None,
    d: str | None = None,
    sar: str | None = None,
    complement: bool | None = None,
    co: bool | None = None,
) -> "Stream":
    """Generate RGB test pattern.
    Args:
        size (str): set video size

            Defaults to 320x240.
        s (str): set video size

            Defaults to 320x240.
        rate (str): set video rate

            Defaults to 25.
        r (str): set video rate

            Defaults to 25.
        duration (str): set video duration

            Defaults to -0.000001.
        d (str): set video duration

            Defaults to -0.000001.
        sar (str): set video sample aspect ratio (from 0 to INT_MAX)

            Defaults to 1/1.
        complement (bool): set complement colors

            Defaults to false.
        co (bool): set complement colors

            Defaults to false.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="rgbtestsrc",
        named_arguments={
            "size": size,
            "s": s,
            "rate": rate,
            "r": r,
            "duration": duration,
            "d": d,
            "sar": sar,
            "complement": complement,
            "co": co,
        },
    )


def sierpinski(
    size: str | None = None,
    s: str | None = None,
    rate: str | None = None,
    r: str | None = None,
    seed: str | None = None,
    jump: int | None = None,
    type: Literal["carpet", "triangle"] | int | None = None,
) -> "Stream":
    """Render a Sierpinski fractal.
    Args:
        size (str): set frame size

            Defaults to 640x480.
        s (str): set frame size

            Defaults to 640x480.
        rate (str): set frame rate

            Defaults to 25.
        r (str): set frame rate

            Defaults to 25.
        seed (str): set the seed (from -1 to UINT32_MAX)

            Defaults to -1.
        jump (int): set the jump (from 1 to 10000)

            Defaults to 100.
        type (int | str): set fractal type (from 0 to 1)

            Allowed values:
                * carpet
                * triangle

            Defaults to carpet.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="sierpinski",
        named_arguments={
            "size": size,
            "s": s,
            "rate": rate,
            "r": r,
            "seed": seed,
            "jump": jump,
            "type": type,
        },
    )


def sinc(
    sample_rate: int | None = None,
    r: int | None = None,
    nb_samples: int | None = None,
    n: int | None = None,
    hp: float | None = None,
    lp: float | None = None,
    phase: float | None = None,
    beta: float | None = None,
    att: float | None = None,
    round: bool | None = None,
    hptaps: int | None = None,
    lptaps: int | None = None,
) -> "Stream":
    """Generate a sinc kaiser-windowed low-pass, high-pass, band-pass, or band-reject FIR coefficients.
    Args:
        sample_rate (int): set sample rate (from 1 to INT_MAX)

            Defaults to 44100.
        r (int): set sample rate (from 1 to INT_MAX)

            Defaults to 44100.
        nb_samples (int): set the number of samples per requested frame (from 1 to INT_MAX)

            Defaults to 1024.
        n (int): set the number of samples per requested frame (from 1 to INT_MAX)

            Defaults to 1024.
        hp (float): set high-pass filter frequency (from 0 to INT_MAX)

            Defaults to 0.
        lp (float): set low-pass filter frequency (from 0 to INT_MAX)

            Defaults to 0.
        phase (float): set filter phase response (from 0 to 100)

            Defaults to 50.
        beta (float): set kaiser window beta (from -1 to 256)

            Defaults to -1.
        att (float): set stop-band attenuation (from 40 to 180)

            Defaults to 120.
        round (bool): enable rounding

            Defaults to false.
        hptaps (int): set number of taps for high-pass filter (from 0 to 32768)

            Defaults to 0.
        lptaps (int): set number of taps for low-pass filter (from 0 to 32768)

            Defaults to 0.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="sinc",
        named_arguments={
            "sample_rate": sample_rate,
            "r": r,
            "nb_samples": nb_samples,
            "n": n,
            "hp": hp,
            "lp": lp,
            "phase": phase,
            "beta": beta,
            "att": att,
            "round": round,
            "hptaps": hptaps,
            "lptaps": lptaps,
        },
    )


def sine(
    frequency: float | None = None,
    f: float | None = None,
    beep_factor: float | None = None,
    b: float | None = None,
    sample_rate: int | None = None,
    r: int | None = None,
    duration: str | None = None,
    d: str | None = None,
    samples_per_frame: str | None = None,
) -> "Stream":
    """Generate sine wave audio signal.
    Args:
        frequency (float): set the sine frequency (from 0 to DBL_MAX)

            Defaults to 440.
        f (float): set the sine frequency (from 0 to DBL_MAX)

            Defaults to 440.
        beep_factor (float): set the beep frequency factor (from 0 to DBL_MAX)

            Defaults to 0.
        b (float): set the beep frequency factor (from 0 to DBL_MAX)

            Defaults to 0.
        sample_rate (int): set the sample rate (from 1 to INT_MAX)

            Defaults to 44100.
        r (int): set the sample rate (from 1 to INT_MAX)

            Defaults to 44100.
        duration (str): set the audio duration

            Defaults to 0.
        d (str): set the audio duration

            Defaults to 0.
        samples_per_frame (str): set the number of samples per frame

            Defaults to 1024.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="sine",
        named_arguments={
            "frequency": frequency,
            "f": f,
            "beep_factor": beep_factor,
            "b": b,
            "sample_rate": sample_rate,
            "r": r,
            "duration": duration,
            "d": d,
            "samples_per_frame": samples_per_frame,
        },
    )


def smptebars(
    size: str | None = None,
    s: str | None = None,
    rate: str | None = None,
    r: str | None = None,
    duration: str | None = None,
    d: str | None = None,
    sar: str | None = None,
) -> "Stream":
    """Generate SMPTE color bars.
    Args:
        size (str): set video size

            Defaults to 320x240.
        s (str): set video size

            Defaults to 320x240.
        rate (str): set video rate

            Defaults to 25.
        r (str): set video rate

            Defaults to 25.
        duration (str): set video duration

            Defaults to -0.000001.
        d (str): set video duration

            Defaults to -0.000001.
        sar (str): set video sample aspect ratio (from 0 to INT_MAX)

            Defaults to 1/1.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="smptebars",
        named_arguments={
            "size": size,
            "s": s,
            "rate": rate,
            "r": r,
            "duration": duration,
            "d": d,
            "sar": sar,
        },
    )


def smptehdbars(
    size: str | None = None,
    s: str | None = None,
    rate: str | None = None,
    r: str | None = None,
    duration: str | None = None,
    d: str | None = None,
    sar: str | None = None,
) -> "Stream":
    """Generate SMPTE HD color bars.
    Args:
        size (str): set video size

            Defaults to 320x240.
        s (str): set video size

            Defaults to 320x240.
        rate (str): set video rate

            Defaults to 25.
        r (str): set video rate

            Defaults to 25.
        duration (str): set video duration

            Defaults to -0.000001.
        d (str): set video duration

            Defaults to -0.000001.
        sar (str): set video sample aspect ratio (from 0 to INT_MAX)

            Defaults to 1/1.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="smptehdbars",
        named_arguments={
            "size": size,
            "s": s,
            "rate": rate,
            "r": r,
            "duration": duration,
            "d": d,
            "sar": sar,
        },
    )


def testsrc(
    size: str | None = None,
    s: str | None = None,
    rate: str | None = None,
    r: str | None = None,
    duration: str | None = None,
    d: str | None = None,
    sar: str | None = None,
    decimals: int | None = None,
    n: int | None = None,
) -> "Stream":
    """Generate test pattern.
    Args:
        size (str): set video size

            Defaults to 320x240.
        s (str): set video size

            Defaults to 320x240.
        rate (str): set video rate

            Defaults to 25.
        r (str): set video rate

            Defaults to 25.
        duration (str): set video duration

            Defaults to -0.000001.
        d (str): set video duration

            Defaults to -0.000001.
        sar (str): set video sample aspect ratio (from 0 to INT_MAX)

            Defaults to 1/1.
        decimals (int): set number of decimals to show (from 0 to 17)

            Defaults to 0.
        n (int): set number of decimals to show (from 0 to 17)

            Defaults to 0.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="testsrc",
        named_arguments={
            "size": size,
            "s": s,
            "rate": rate,
            "r": r,
            "duration": duration,
            "d": d,
            "sar": sar,
            "decimals": decimals,
            "n": n,
        },
    )


def testsrc2(
    size: str | None = None,
    s: str | None = None,
    rate: str | None = None,
    r: str | None = None,
    duration: str | None = None,
    d: str | None = None,
    sar: str | None = None,
    alpha: int | None = None,
) -> "Stream":
    """Generate another test pattern.
    Args:
        size (str): set video size

            Defaults to 320x240.
        s (str): set video size

            Defaults to 320x240.
        rate (str): set video rate

            Defaults to 25.
        r (str): set video rate

            Defaults to 25.
        duration (str): set video duration

            Defaults to -0.000001.
        d (str): set video duration

            Defaults to -0.000001.
        sar (str): set video sample aspect ratio (from 0 to INT_MAX)

            Defaults to 1/1.
        alpha (int): set global alpha (opacity) (from 0 to 255)

            Defaults to 255.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="testsrc2",
        named_arguments={
            "size": size,
            "s": s,
            "rate": rate,
            "r": r,
            "duration": duration,
            "d": d,
            "sar": sar,
            "alpha": alpha,
        },
    )


def yuvtestsrc(
    size: str | None = None,
    s: str | None = None,
    rate: str | None = None,
    r: str | None = None,
    duration: str | None = None,
    d: str | None = None,
    sar: str | None = None,
) -> "Stream":
    """Generate YUV test pattern.
    Args:
        size (str): set video size

            Defaults to 320x240.
        s (str): set video size

            Defaults to 320x240.
        rate (str): set video rate

            Defaults to 25.
        r (str): set video rate

            Defaults to 25.
        duration (str): set video duration

            Defaults to -0.000001.
        d (str): set video duration

            Defaults to -0.000001.
        sar (str): set video sample aspect ratio (from 0 to INT_MAX)

            Defaults to 1/1.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="yuvtestsrc",
        named_arguments={
            "size": size,
            "s": s,
            "rate": rate,
            "r": r,
            "duration": duration,
            "d": d,
            "sar": sar,
        },
    )


def zoneplate(
    size: str | None = None,
    s: str | None = None,
    rate: str | None = None,
    r: str | None = None,
    duration: str | None = None,
    d: str | None = None,
    sar: str | None = None,
    precision: int | None = None,
    xo: int | None = None,
    yo: int | None = None,
    to: int | None = None,
    k0: int | None = None,
    kx: int | None = None,
    ky: int | None = None,
    kt: int | None = None,
    kxt: int | None = None,
    kyt: int | None = None,
    kxy: int | None = None,
    kx2: int | None = None,
    ky2: int | None = None,
    kt2: int | None = None,
    ku: int | None = None,
    kv: int | None = None,
) -> "Stream":
    """Generate zone-plate.
    Args:
        size (str): set video size

            Defaults to 320x240.
        s (str): set video size

            Defaults to 320x240.
        rate (str): set video rate

            Defaults to 25.
        r (str): set video rate

            Defaults to 25.
        duration (str): set video duration

            Defaults to -0.000001.
        d (str): set video duration

            Defaults to -0.000001.
        sar (str): set video sample aspect ratio (from 0 to INT_MAX)

            Defaults to 1/1.
        precision (int): set LUT precision (from 4 to 16)

            Defaults to 10.
        xo (int): set X-axis offset (from INT_MIN to INT_MAX)

            Defaults to 0.
        yo (int): set Y-axis offset (from INT_MIN to INT_MAX)

            Defaults to 0.
        to (int): set T-axis offset (from INT_MIN to INT_MAX)

            Defaults to 0.
        k0 (int): set 0-order phase (from INT_MIN to INT_MAX)

            Defaults to 0.
        kx (int): set 1-order X-axis phase (from INT_MIN to INT_MAX)

            Defaults to 0.
        ky (int): set 1-order Y-axis phase (from INT_MIN to INT_MAX)

            Defaults to 0.
        kt (int): set 1-order T-axis phase (from INT_MIN to INT_MAX)

            Defaults to 0.
        kxt (int): set X-axis*T-axis product phase (from INT_MIN to INT_MAX)

            Defaults to 0.
        kyt (int): set Y-axis*T-axis product phase (from INT_MIN to INT_MAX)

            Defaults to 0.
        kxy (int): set X-axis*Y-axis product phase (from INT_MIN to INT_MAX)

            Defaults to 0.
        kx2 (int): set 2-order X-axis phase (from INT_MIN to INT_MAX)

            Defaults to 0.
        ky2 (int): set 2-order Y-axis phase (from INT_MIN to INT_MAX)

            Defaults to 0.
        kt2 (int): set 2-order T-axis phase (from INT_MIN to INT_MAX)

            Defaults to 0.
        ku (int): set 0-order U-color phase (from INT_MIN to INT_MAX)

            Defaults to 0.
        kv (int): set 0-order V-color phase (from INT_MIN to INT_MAX)

            Defaults to 0.

    Returns:
        "Stream": The output stream.
    """
    return create_source(
        filter_name="zoneplate",
        named_arguments={
            "size": size,
            "s": s,
            "rate": rate,
            "r": r,
            "duration": duration,
            "d": d,
            "sar": sar,
            "precision": precision,
            "xo": xo,
            "yo": yo,
            "to": to,
            "k0": k0,
            "kx": kx,
            "ky": ky,
            "kt": kt,
            "kxt": kxt,
            "kyt": kyt,
            "kxy": kxy,
            "kx2": kx2,
            "ky2": ky2,
            "kt2": kt2,
            "ku": ku,
            "kv": kv,
        },
    )
