Skip to content

audio

Audio stream.

Classes:

Name Description
AudioStream

Audio stream.

AudioStream dataclass

AudioStream(
    *,
    node: FilterNode | InputNode,
    index: int | None = None,
    optional: bool = False
)

Bases: FilterableStream

Audio stream.

Methods:

Name Description
a3dscope

Convert input audio to 3d scope video output.

abench

Benchmark part of a filtergraph.

abitscope

Convert input audio to audio bit scope video output.

acompressor

Audio compressor.

acontrast

Simple audio dynamic range compression/expansion filter.

acopy

Copy the input audio unchanged to the output.

acrossfade

Cross fade two input audio streams.

acrossover

Split audio into per-bands streams.

acrusher

Reduce audio bit resolution.

acue

Delay filtering to match a cue.

adeclick

Remove impulsive noise from input audio.

adeclip

Remove clipping from input audio.

adecorrelate

Apply decorrelation to input audio.

adelay

Delay one or more audio channels.

adenorm

Remedy denormals by adding extremely low-level noise.

aderivative

Compute derivative of input audio.

adrawgraph

Draw a graph using input audio metadata.

adrc

Audio Spectral Dynamic Range Controller.

adynamicequalizer

Apply Dynamic Equalization of input audio.

adynamicsmooth

Apply Dynamic Smoothing of input audio.

aecho

Add echoing to the audio.

aemphasis

Audio emphasis.

aeval

Filter audio signal according to a specified expression.

aexciter

Enhance high frequency part of audio.

afade

Fade in/out input audio.

afftdn

Denoise audio samples using FFT.

afftfilt

Apply arbitrary expressions to samples in frequency domain.

afilter

Apply a custom audio filter to this stream.

aformat

Convert the input audio to one of the specified formats.

afreqshift

Apply frequency shifting to input audio.

afwtdn

Denoise audio stream using Wavelets.

agate

Audio gate.

agraphmonitor

Show various filtergraph stats.

ahistogram

Convert input audio to histogram video output.

aiir

Apply Infinite Impulse Response filter with supplied coefficients.

aintegral

Compute integral of input audio.

alatency

Report audio filtering latency.

alimiter

Audio lookahead limiter.

allpass

Apply a two-pole all-pass filter.

aloop

Loop audio samples.

ametadata

Manipulate audio frame metadata.

amultiply

Multiply two audio streams.

anequalizer

Apply high-order audio parametric multi band equalizer.

anlmdn

Reduce broadband noise from stream using Non-Local Means.

anlmf

Apply Normalized Least-Mean-Fourth algorithm to first audio stream.

anlms

Apply Normalized Least-Mean-Squares algorithm to first audio stream.

anull

Pass the source unchanged to the output.

apad

Pad audio with silence.

aperms

Set permissions for the output audio frame.

aphasemeter

Convert input audio to phase meter video output.

aphaser

Add a phasing effect to the audio.

aphaseshift

Apply phase shifting to input audio.

apsnr

Measure Audio Peak Signal-to-Noise Ratio.

apsyclip

Audio Psychoacoustic Clipper.

apulsator

Audio pulsator.

arealtime

Slow down filtering to match realtime.

aresample

Resample audio data.

areverse

Reverse an audio clip.

arls

Apply Recursive Least Squares algorithm to first audio stream.

arnndn

Reduce noise from speech using Recurrent Neural Networks.

asdr

Measure Audio Signal-to-Distortion Ratio.

asegment

Segment audio stream.

aselect

Select audio frames to pass in output.

asendcmd

Send commands to filters.

asetnsamples

Set the number of samples for each output audio frames.

asetpts

Set PTS for the output audio frame.

asetrate

Change the sample rate without altering the data.

asettb

Set timebase for the audio output link.

ashowinfo

Show textual information for each audio frame.

asidedata

Manipulate audio frame side data.

asisdr

Measure Audio Scale-Invariant Signal-to-Distortion Ratio.

asoftclip

Audio Soft Clipper.

aspectralstats

Show frequency domain statistics about audio frames.

asplit

Pass on the audio input to N audio outputs.

asr

Automatic Speech Recognition.

astats

Show time domain statistics about audio frames.

asubboost

Boost subwoofer frequencies.

asubcut

Cut subwoofer frequencies.

asupercut

Cut super frequencies.

asuperpass

Apply high order Butterworth band-pass filter.

asuperstop

Apply high order Butterworth band-stop filter.

atempo

Adjust audio tempo.

atilt

Apply spectral tilt to audio.

atrim

Pick one continuous section from the input, drop the rest.

avectorscope

Convert input audio to vectorscope video output.

axcorrelate

Cross-correlate two audio streams.

azmq

Receive commands through ZMQ and broker them to filters.

bandpass

Apply a two-pole Butterworth band-pass filter.

bandreject

Apply a two-pole Butterworth band-reject filter.

bass

Boost or cut lower frequencies.

biquad

Apply a biquad IIR filter with the given coefficients.

bs2b

Bauer stereo-to-binaural filter.

channelmap

Remap audio channels.

channelsplit

Split audio into per-channel streams.

chorus

Add a chorus effect to the audio.

compand

Compress or expand audio dynamic range.

compensationdelay

Audio Compensation Delay Line.

crossfeed

Apply headphone crossfeed filter.

crystalizer

Simple audio noise sharpening filter.

dcshift

Apply a DC shift to the audio.

deesser

Apply de-essing to the audio.

dialoguenhance

Audio Dialogue Enhancement.

drmeter

Measure audio dynamic range.

dynaudnorm

Dynamic Audio Normalizer.

earwax

Widen the stereo image.

ebur128

EBU R128 scanner.

equalizer

Apply two-pole peaking equalization (EQ) filter.

extrastereo

Increase difference between stereo audio channels.

filter_multi_output

Apply a custom filter with multiple outputs to this stream.

firequalizer

Finite Impulse Response Equalizer.

flanger

Apply a flanging effect to the audio.

haas

Apply Haas Stereo Enhancer.

hdcd

Apply High Definition Compatible Digital (HDCD) decoding.

highpass

Apply a high-pass filter with 3dB point frequency.

highshelf

Apply a high shelf filter.

loudnorm

EBU R128 loudness normalization.

lowpass

Apply a low-pass filter with 3dB point frequency.

lowshelf

Apply a low shelf filter.

mcompand

Multiband Compress or expand audio dynamic range.

output

Output file URL.

pan

Remix channels with coefficients (panning).

replaygain

ReplayGain scanner.

rubberband

Apply time-stretching and pitch-shifting.

showcqt

Convert input audio to a CQT (Constant/Clamped Q Transform) spectrum video output.

showcwt

Convert input audio to a CWT (Continuous Wavelet Transform) spectrum video output.

showfreqs

Convert input audio to a frequencies video output.

showspatial

Convert input audio to a spatial video output.

showspectrum

Convert input audio to a spectrum video output.

showspectrumpic

Convert input audio to a spectrum video output single picture.

showvolume

Convert input audio volume to video output.

showwaves

Convert input audio to a video output.

showwavespic

Convert input audio to a video output single picture.

sidechaincompress

Sidechain compressor.

sidechaingate

Audio sidechain gate.

silencedetect

Detect silence.

silenceremove

Remove silence.

sofalizer

SOFAlizer (Spatially Oriented Format for Acoustics).

speechnorm

Speech Normalizer.

stereotools

Apply various stereo tools.

stereowiden

Apply stereo widening effect.

superequalizer

Apply 18 band equalization filter.

surround

Apply audio surround upmix filter.

tiltshelf

Apply a tilt shelf filter.

treble

Boost or cut upper frequencies.

tremolo

Apply tremolo effect.

vfilter

Apply a custom video filter to this stream.

vibrato

Apply vibrato effect.

view

Visualize the stream.

virtualbass

Audio Virtual Bass.

volume

Change input volume.

volumedetect

Detect audio volume.

Attributes:

Name Type Description
hex str

Get the hexadecimal hash of the object.

index int | None

Represents the index of the stream in the node's output streams.

node FilterNode | InputNode

Represents the node that the stream is connected to in the upstream direction.

optional bool

Represents whether the stream is optional.

hex cached property

hex: str

Get the hexadecimal hash of the object.

index class-attribute instance-attribute

index: int | None = None

Represents the index of the stream in the node's output streams.

Note

See Also: Stream specifiers stream_index

node instance-attribute

Represents the node that the stream is connected to in the upstream direction.

Note

In the context of a data stream, the 'upstream' refers to the source of the data, or where the data is coming from. Therefore, the 'upstream node' is the node that is providing the data to the current stream.

optional class-attribute instance-attribute

optional: bool = False

Represents whether the stream is optional.

Note

See Also: Advanced options

a3dscope

a3dscope(
    *,
    rate: Video_rate = Default("25"),
    size: Image_size = Default("hd720"),
    fov: Float = Default("90"),
    roll: Float = Default("0"),
    pitch: Float = Default("0"),
    yaw: Float = Default("0"),
    xzoom: Float = Default("1"),
    xpos: Float = Default("0"),
    length: Int = Default("15"),
    extra_options: dict[str, Any] | None = None
) -> VideoStream

Convert input audio to 3d scope video output.

Parameters:

Name Type Description Default
rate Video_rate

set video rate (default "25")

Default('25')
size Image_size

set video size (default "hd720")

Default('hd720')
fov Float

set camera FoV (from 40 to 150) (default 90)

Default('90')
roll Float

set camera roll (from -180 to 180) (default 0)

Default('0')
pitch Float

set camera pitch (from -180 to 180) (default 0)

Default('0')
yaw Float

set camera yaw (from -180 to 180) (default 0)

Default('0')
xzoom Float

set camera zoom (from 0.01 to 10) (default 1)

Default('1')
xpos Float

set camera position (from -60 to 60) (default 0)

Default('0')
length Int

set length (from 1 to 60) (default 15)

Default('15')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default VideoStream

the video stream

References

FFmpeg Documentation

abench

abench(
    *,
    action: (
        Int | Literal["start", "stop"] | Default
    ) = Default("start"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Benchmark part of a filtergraph.

Parameters:

Name Type Description Default
action Int | Literal['start', 'stop'] | Default

set action (from 0 to 1) (default start)

Default('start')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

abitscope

abitscope(
    *,
    rate: Video_rate = Default("25"),
    size: Image_size = Default("1024x256"),
    colors: String = Default(
        "red|green|blue|yellow|orange|lime|pink|magenta|brown"
    ),
    mode: (
        Int | Literal["bars", "trace"] | Default
    ) = Default("bars"),
    extra_options: dict[str, Any] | None = None
) -> VideoStream

Convert input audio to audio bit scope video output.

Parameters:

Name Type Description Default
rate Video_rate

set video rate (default "25")

Default('25')
size Image_size

set video size (default "1024x256")

Default('1024x256')
colors String

set channels colors (default "red|green|blue|yellow|orange|lime|pink|magenta|brown")

Default('red|green|blue|yellow|orange|lime|pink|magenta|brown')
mode Int | Literal['bars', 'trace'] | Default

set output mode (from 0 to 1) (default bars)

Default('bars')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default VideoStream

the video stream

References

FFmpeg Documentation

acompressor

acompressor(
    *,
    level_in: Double = Default("1"),
    mode: (
        Int | Literal["downward", "upward"] | Default
    ) = Default("downward"),
    threshold: Double = Default("0.125"),
    ratio: Double = Default("2"),
    attack: Double = Default("20"),
    release: Double = Default("250"),
    makeup: Double = Default("1"),
    knee: Double = Default("2.82843"),
    link: (
        Int | Literal["average", "maximum"] | Default
    ) = Default("average"),
    detection: (
        Int | Literal["peak", "rms"] | Default
    ) = Default("rms"),
    level_sc: Double = Default("1"),
    mix: Double = Default("1"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Audio compressor.

Parameters:

Name Type Description Default
level_in Double

set input gain (from 0.015625 to 64) (default 1)

Default('1')
mode Int | Literal['downward', 'upward'] | Default

set mode (from 0 to 1) (default downward)

Default('downward')
threshold Double

set threshold (from 0.000976563 to 1) (default 0.125)

Default('0.125')
ratio Double

set ratio (from 1 to 20) (default 2)

Default('2')
attack Double

set attack (from 0.01 to 2000) (default 20)

Default('20')
release Double

set release (from 0.01 to 9000) (default 250)

Default('250')
makeup Double

set make up gain (from 1 to 64) (default 1)

Default('1')
knee Double

set knee (from 1 to 8) (default 2.82843)

Default('2.82843')
link Int | Literal['average', 'maximum'] | Default

set link type (from 0 to 1) (default average)

Default('average')
detection Int | Literal['peak', 'rms'] | Default

set detection (from 0 to 1) (default rms)

Default('rms')
level_sc Double

set sidechain gain (from 0.015625 to 64) (default 1)

Default('1')
mix Double

set mix (from 0 to 1) (default 1)

Default('1')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

acontrast

acontrast(
    *,
    contrast: Float = Default("33"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Simple audio dynamic range compression/expansion filter.

Parameters:

Name Type Description Default
contrast Float

set contrast (from 0 to 100) (default 33)

Default('33')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

acopy

acopy(
    extra_options: dict[str, Any] | None = None,
) -> AudioStream

Copy the input audio unchanged to the output.

Parameters:

Name Type Description Default
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

acrossfade

acrossfade(
    _crossfade1: AudioStream,
    *,
    nb_samples: Int = Default("44100"),
    duration: Duration = Default("0"),
    overlap: Boolean = Default("true"),
    curve1: (
        Int
        | Literal[
            "nofade",
            "tri",
            "qsin",
            "esin",
            "hsin",
            "log",
            "ipar",
            "qua",
            "cub",
            "squ",
            "cbr",
            "par",
            "exp",
            "iqsin",
            "ihsin",
            "dese",
            "desi",
            "losi",
            "sinc",
            "isinc",
            "quat",
            "quatr",
            "qsin2",
            "hsin2",
        ]
        | Default
    ) = Default("tri"),
    curve2: (
        Int
        | Literal[
            "nofade",
            "tri",
            "qsin",
            "esin",
            "hsin",
            "log",
            "ipar",
            "qua",
            "cub",
            "squ",
            "cbr",
            "par",
            "exp",
            "iqsin",
            "ihsin",
            "dese",
            "desi",
            "losi",
            "sinc",
            "isinc",
            "quat",
            "quatr",
            "qsin2",
            "hsin2",
        ]
        | Default
    ) = Default("tri"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Cross fade two input audio streams.

Parameters:

Name Type Description Default
nb_samples Int

set number of samples for cross fade duration (from 1 to 2.14748e+08) (default 44100)

Default('44100')
duration Duration

set cross fade duration (default 0)

Default('0')
overlap Boolean

overlap 1st stream end with 2nd stream start (default true)

Default('true')
curve1 Int | Literal['nofade', 'tri', 'qsin', 'esin', 'hsin', 'log', 'ipar', 'qua', 'cub', 'squ', 'cbr', 'par', 'exp', 'iqsin', 'ihsin', 'dese', 'desi', 'losi', 'sinc', 'isinc', 'quat', 'quatr', 'qsin2', 'hsin2'] | Default

set fade curve type for 1st stream (from -1 to 22) (default tri)

Default('tri')
curve2 Int | Literal['nofade', 'tri', 'qsin', 'esin', 'hsin', 'log', 'ipar', 'qua', 'cub', 'squ', 'cbr', 'par', 'exp', 'iqsin', 'ihsin', 'dese', 'desi', 'losi', 'sinc', 'isinc', 'quat', 'quatr', 'qsin2', 'hsin2'] | Default

set fade curve type for 2nd stream (from -1 to 22) (default tri)

Default('tri')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

acrossover

acrossover(
    *,
    split: String = Default("500"),
    order: (
        Int
        | Literal[
            "2nd",
            "4th",
            "6th",
            "8th",
            "10th",
            "12th",
            "14th",
            "16th",
            "18th",
            "20th",
        ]
        | Default
    ) = Default("4th"),
    level: Float = Default("1"),
    gain: String = Default("1.f"),
    precision: (
        Int | Literal["auto", "float", "double"] | Default
    ) = Default("auto"),
    extra_options: dict[str, Any] | None = None
) -> FilterNode

Split audio into per-bands streams.

Parameters:

Name Type Description Default
split String

set split frequencies (default "500")

Default('500')
order Int | Literal['2nd', '4th', '6th', '8th', '10th', '12th', '14th', '16th', '18th', '20th'] | Default

set filter order (from 0 to 9) (default 4th)

Default('4th')
level Float

set input gain (from 0 to 1) (default 1)

Default('1')
gain String

set output bands gain (default "1.f")

Default('1.f')
precision Int | Literal['auto', 'float', 'double'] | Default

set processing precision (from 0 to 2) (default auto)

Default('auto')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
filter_node FilterNode

the filter node

References

FFmpeg Documentation

acrusher

acrusher(
    *,
    level_in: Double = Default("1"),
    level_out: Double = Default("1"),
    bits: Double = Default("8"),
    mix: Double = Default("0.5"),
    mode: Int | Literal["lin", "log"] | Default = Default(
        "lin"
    ),
    dc: Double = Default("1"),
    aa: Double = Default("0.5"),
    samples: Double = Default("1"),
    lfo: Boolean = Default("false"),
    lforange: Double = Default("20"),
    lforate: Double = Default("0.3"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Reduce audio bit resolution.

Parameters:

Name Type Description Default
level_in Double

set level in (from 0.015625 to 64) (default 1)

Default('1')
level_out Double

set level out (from 0.015625 to 64) (default 1)

Default('1')
bits Double

set bit reduction (from 1 to 64) (default 8)

Default('8')
mix Double

set mix (from 0 to 1) (default 0.5)

Default('0.5')
mode Int | Literal['lin', 'log'] | Default

set mode (from 0 to 1) (default lin)

Default('lin')
dc Double

set DC (from 0.25 to 4) (default 1)

Default('1')
aa Double

set anti-aliasing (from 0 to 1) (default 0.5)

Default('0.5')
samples Double

set sample reduction (from 1 to 250) (default 1)

Default('1')
lfo Boolean

enable LFO (default false)

Default('false')
lforange Double

set LFO depth (from 1 to 250) (default 20)

Default('20')
lforate Double

set LFO rate (from 0.01 to 200) (default 0.3)

Default('0.3')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

acue

acue(
    *,
    cue: Int64 = Default("0"),
    preroll: Duration = Default("0"),
    buffer: Duration = Default("0"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Delay filtering to match a cue.

Parameters:

Name Type Description Default
cue Int64

cue unix timestamp in microseconds (from 0 to I64_MAX) (default 0)

Default('0')
preroll Duration

preroll duration in seconds (default 0)

Default('0')
buffer Duration

buffer duration in seconds (default 0)

Default('0')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

adeclick

adeclick(
    *,
    window: Double = Default("55"),
    overlap: Double = Default("75"),
    arorder: Double = Default("2"),
    threshold: Double = Default("2"),
    burst: Double = Default("2"),
    method: (
        Int | Literal["add", "a", "save", "s"] | Default
    ) = Default("add"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Remove impulsive noise from input audio.

Parameters:

Name Type Description Default
window Double

set window size (from 10 to 100) (default 55)

Default('55')
overlap Double

set window overlap (from 50 to 95) (default 75)

Default('75')
arorder Double

set autoregression order (from 0 to 25) (default 2)

Default('2')
threshold Double

set threshold (from 1 to 100) (default 2)

Default('2')
burst Double

set burst fusion (from 0 to 10) (default 2)

Default('2')
method Int | Literal['add', 'a', 'save', 's'] | Default

set overlap method (from 0 to 1) (default add)

Default('add')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

adeclip

adeclip(
    *,
    window: Double = Default("55"),
    overlap: Double = Default("75"),
    arorder: Double = Default("8"),
    threshold: Double = Default("10"),
    hsize: Int = Default("1000"),
    method: (
        Int | Literal["add", "a", "save", "s"] | Default
    ) = Default("add"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Remove clipping from input audio.

Parameters:

Name Type Description Default
window Double

set window size (from 10 to 100) (default 55)

Default('55')
overlap Double

set window overlap (from 50 to 95) (default 75)

Default('75')
arorder Double

set autoregression order (from 0 to 25) (default 8)

Default('8')
threshold Double

set threshold (from 1 to 100) (default 10)

Default('10')
hsize Int

set histogram size (from 100 to 9999) (default 1000)

Default('1000')
method Int | Literal['add', 'a', 'save', 's'] | Default

set overlap method (from 0 to 1) (default add)

Default('add')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

adecorrelate

adecorrelate(
    *,
    stages: Int = Default("6"),
    seed: Int64 = Default("-1"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply decorrelation to input audio.

Parameters:

Name Type Description Default
stages Int

set filtering stages (from 1 to 16) (default 6)

Default('6')
seed Int64

set random seed (from -1 to UINT32_MAX) (default -1)

Default('-1')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

adelay

adelay(
    *,
    delays: String = Default(None),
    all: Boolean = Default("false"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Delay one or more audio channels.

Parameters:

Name Type Description Default
delays String

set list of delays for each channel

Default(None)
all Boolean

use last available delay for remained channels (default false)

Default('false')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

adenorm

adenorm(
    *,
    level: Double = Default("-351"),
    type: (
        Int
        | Literal["dc", "ac", "square", "pulse"]
        | Default
    ) = Default("dc"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Remedy denormals by adding extremely low-level noise.

Parameters:

Name Type Description Default
level Double

set level (from -451 to -90) (default -351)

Default('-351')
type Int | Literal['dc', 'ac', 'square', 'pulse'] | Default

set type (from 0 to 3) (default dc)

Default('dc')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

aderivative

aderivative(
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None,
) -> AudioStream

Compute derivative of input audio.

Parameters:

Name Type Description Default
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

adrawgraph

adrawgraph(
    *,
    m1: String = Default(""),
    fg1: String = Default("0xffff0000"),
    m2: String = Default(""),
    fg2: String = Default("0xff00ff00"),
    m3: String = Default(""),
    fg3: String = Default("0xffff00ff"),
    m4: String = Default(""),
    fg4: String = Default("0xffffff00"),
    bg: Color = Default("white"),
    min: Float = Default("-1"),
    max: Float = Default("1"),
    mode: (
        Int | Literal["bar", "dot", "line"] | Default
    ) = Default("line"),
    slide: (
        Int
        | Literal[
            "frame",
            "replace",
            "scroll",
            "rscroll",
            "picture",
        ]
        | Default
    ) = Default("frame"),
    size: Image_size = Default("900x256"),
    rate: Video_rate = Default("25"),
    extra_options: dict[str, Any] | None = None
) -> VideoStream

Draw a graph using input audio metadata.

Parameters:

Name Type Description Default
m1 String

set 1st metadata key (default "")

Default('')
fg1 String

set 1st foreground color expression (default "0xffff0000")

Default('0xffff0000')
m2 String

set 2nd metadata key (default "")

Default('')
fg2 String

set 2nd foreground color expression (default "0xff00ff00")

Default('0xff00ff00')
m3 String

set 3rd metadata key (default "")

Default('')
fg3 String

set 3rd foreground color expression (default "0xffff00ff")

Default('0xffff00ff')
m4 String

set 4th metadata key (default "")

Default('')
fg4 String

set 4th foreground color expression (default "0xffffff00")

Default('0xffffff00')
bg Color

set background color (default "white")

Default('white')
min Float

set minimal value (from INT_MIN to INT_MAX) (default -1)

Default('-1')
max Float

set maximal value (from INT_MIN to INT_MAX) (default 1)

Default('1')
mode Int | Literal['bar', 'dot', 'line'] | Default

set graph mode (from 0 to 2) (default line)

Default('line')
slide Int | Literal['frame', 'replace', 'scroll', 'rscroll', 'picture'] | Default

set slide mode (from 0 to 4) (default frame)

Default('frame')
size Image_size

set graph size (default "900x256")

Default('900x256')
rate Video_rate

set video rate (default "25")

Default('25')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default VideoStream

the video stream

References

FFmpeg Documentation

adrc

adrc(
    *,
    transfer: String = Default("p"),
    attack: Double = Default("50"),
    release: Double = Default("100"),
    channels: String = Default("all"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Audio Spectral Dynamic Range Controller.

Parameters:

Name Type Description Default
transfer String

set the transfer expression (default "p")

Default('p')
attack Double

set the attack (from 1 to 1000) (default 50)

Default('50')
release Double

set the release (from 5 to 2000) (default 100)

Default('100')
channels String

set channels to filter (default "all")

Default('all')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

adynamicequalizer

adynamicequalizer(
    *,
    threshold: Double = Default("0"),
    dfrequency: Double = Default("1000"),
    dqfactor: Double = Default("1"),
    tfrequency: Double = Default("1000"),
    tqfactor: Double = Default("1"),
    attack: Double = Default("20"),
    release: Double = Default("200"),
    ratio: Double = Default("1"),
    makeup: Double = Default("0"),
    range: Double = Default("50"),
    mode: (
        Int | Literal["listen", "cut", "boost"] | Default
    ) = Default("cut"),
    dftype: (
        Int
        | Literal["bandpass", "lowpass", "highpass", "peak"]
        | Default
    ) = Default("bandpass"),
    tftype: (
        Int
        | Literal["bell", "lowshelf", "highshelf"]
        | Default
    ) = Default("bell"),
    direction: (
        Int | Literal["downward", "upward"] | Default
    ) = Default("downward"),
    auto: (
        Int | Literal["disabled", "off", "on"] | Default
    ) = Default("disabled"),
    precision: (
        Int | Literal["auto", "float", "double"] | Default
    ) = Default("auto"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply Dynamic Equalization of input audio.

Parameters:

Name Type Description Default
threshold Double

set detection threshold (from 0 to 100) (default 0)

Default('0')
dfrequency Double

set detection frequency (from 2 to 1e+06) (default 1000)

Default('1000')
dqfactor Double

set detection Q factor (from 0.001 to 1000) (default 1)

Default('1')
tfrequency Double

set target frequency (from 2 to 1e+06) (default 1000)

Default('1000')
tqfactor Double

set target Q factor (from 0.001 to 1000) (default 1)

Default('1')
attack Double

set attack duration (from 1 to 2000) (default 20)

Default('20')
release Double

set release duration (from 1 to 2000) (default 200)

Default('200')
ratio Double

set ratio factor (from 0 to 30) (default 1)

Default('1')
makeup Double

set makeup gain (from 0 to 100) (default 0)

Default('0')
range Double

set max gain (from 1 to 200) (default 50)

Default('50')
mode Int | Literal['listen', 'cut', 'boost'] | Default

set mode (from -1 to 1) (default cut)

Default('cut')
dftype Int | Literal['bandpass', 'lowpass', 'highpass', 'peak'] | Default

set detection filter type (from 0 to 3) (default bandpass)

Default('bandpass')
tftype Int | Literal['bell', 'lowshelf', 'highshelf'] | Default

set target filter type (from 0 to 2) (default bell)

Default('bell')
direction Int | Literal['downward', 'upward'] | Default

set direction (from 0 to 1) (default downward)

Default('downward')
auto Int | Literal['disabled', 'off', 'on'] | Default

set auto threshold (from -1 to 1) (default disabled)

Default('disabled')
precision Int | Literal['auto', 'float', 'double'] | Default

set processing precision (from 0 to 2) (default auto)

Default('auto')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

adynamicsmooth

adynamicsmooth(
    *,
    sensitivity: Double = Default("2"),
    basefreq: Double = Default("22050"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply Dynamic Smoothing of input audio.

Parameters:

Name Type Description Default
sensitivity Double

set smooth sensitivity (from 0 to 1e+06) (default 2)

Default('2')
basefreq Double

set base frequency (from 2 to 1e+06) (default 22050)

Default('22050')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

aecho

aecho(
    *,
    in_gain: Float = Default("0.6"),
    out_gain: Float = Default("0.3"),
    delays: String = Default("1000"),
    decays: String = Default("0.5"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Add echoing to the audio.

Parameters:

Name Type Description Default
in_gain Float

set signal input gain (from 0 to 1) (default 0.6)

Default('0.6')
out_gain Float

set signal output gain (from 0 to 1) (default 0.3)

Default('0.3')
delays String

set list of signal delays (default "1000")

Default('1000')
decays String

set list of signal decays (default "0.5")

Default('0.5')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

aemphasis

aemphasis(
    *,
    level_in: Double = Default("1"),
    level_out: Double = Default("1"),
    mode: (
        Int
        | Literal["reproduction", "production"]
        | Default
    ) = Default("reproduction"),
    type: (
        Int
        | Literal[
            "col",
            "emi",
            "bsi",
            "riaa",
            "cd",
            "50fm",
            "75fm",
            "50kf",
            "75kf",
        ]
        | Default
    ) = Default("cd"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Audio emphasis.

Parameters:

Name Type Description Default
level_in Double

set input gain (from 0 to 64) (default 1)

Default('1')
level_out Double

set output gain (from 0 to 64) (default 1)

Default('1')
mode Int | Literal['reproduction', 'production'] | Default

set filter mode (from 0 to 1) (default reproduction)

Default('reproduction')
type Int | Literal['col', 'emi', 'bsi', 'riaa', 'cd', '50fm', '75fm', '50kf', '75kf'] | Default

set filter type (from 0 to 8) (default cd)

Default('cd')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

aeval

aeval(
    *,
    exprs: String = Default(None),
    channel_layout: String = Default(None),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Filter audio signal according to a specified expression.

Parameters:

Name Type Description Default
exprs String

set the '|'-separated list of channels expressions

Default(None)
channel_layout String

set channel layout

Default(None)
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

aexciter

aexciter(
    *,
    level_in: Double = Default("1"),
    level_out: Double = Default("1"),
    amount: Double = Default("1"),
    drive: Double = Default("8.5"),
    blend: Double = Default("0"),
    freq: Double = Default("7500"),
    ceil: Double = Default("9999"),
    listen: Boolean = Default("false"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Enhance high frequency part of audio.

Parameters:

Name Type Description Default
level_in Double

set level in (from 0 to 64) (default 1)

Default('1')
level_out Double

set level out (from 0 to 64) (default 1)

Default('1')
amount Double

set amount (from 0 to 64) (default 1)

Default('1')
drive Double

set harmonics (from 0.1 to 10) (default 8.5)

Default('8.5')
blend Double

set blend harmonics (from -10 to 10) (default 0)

Default('0')
freq Double

set scope (from 2000 to 12000) (default 7500)

Default('7500')
ceil Double

set ceiling (from 9999 to 20000) (default 9999)

Default('9999')
listen Boolean

enable listen mode (default false)

Default('false')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

afade

afade(
    *,
    type: Int | Literal["in", "out"] | Default = Default(
        "in"
    ),
    start_sample: Int64 = Default("0"),
    nb_samples: Int64 = Default("44100"),
    start_time: Duration = Default("0"),
    duration: Duration = Default("0"),
    curve: (
        Int
        | Literal[
            "nofade",
            "tri",
            "qsin",
            "esin",
            "hsin",
            "log",
            "ipar",
            "qua",
            "cub",
            "squ",
            "cbr",
            "par",
            "exp",
            "iqsin",
            "ihsin",
            "dese",
            "desi",
            "losi",
            "sinc",
            "isinc",
            "quat",
            "quatr",
            "qsin2",
            "hsin2",
        ]
        | Default
    ) = Default("tri"),
    silence: Double = Default("0"),
    unity: Double = Default("1"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Fade in/out input audio.

Parameters:

Name Type Description Default
type Int | Literal['in', 'out'] | Default

set the fade direction (from 0 to 1) (default in)

Default('in')
start_sample Int64

set number of first sample to start fading (from 0 to I64_MAX) (default 0)

Default('0')
nb_samples Int64

set number of samples for fade duration (from 1 to I64_MAX) (default 44100)

Default('44100')
start_time Duration

set time to start fading (default 0)

Default('0')
duration Duration

set fade duration (default 0)

Default('0')
curve Int | Literal['nofade', 'tri', 'qsin', 'esin', 'hsin', 'log', 'ipar', 'qua', 'cub', 'squ', 'cbr', 'par', 'exp', 'iqsin', 'ihsin', 'dese', 'desi', 'losi', 'sinc', 'isinc', 'quat', 'quatr', 'qsin2', 'hsin2'] | Default

set fade curve type (from -1 to 22) (default tri)

Default('tri')
silence Double

set the silence gain (from 0 to 1) (default 0)

Default('0')
unity Double

set the unity gain (from 0 to 1) (default 1)

Default('1')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

afftdn

afftdn(
    *,
    noise_reduction: Float = Default("12"),
    noise_floor: Float = Default("-50"),
    noise_type: (
        Int
        | Literal[
            "white",
            "w",
            "vinyl",
            "v",
            "shellac",
            "s",
            "custom",
            "c",
        ]
        | Default
    ) = Default("white"),
    band_noise: String = Default(None),
    residual_floor: Float = Default("-38"),
    track_noise: Boolean = Default("false"),
    track_residual: Boolean = Default("false"),
    output_mode: (
        Int
        | Literal["input", "i", "output", "o", "noise", "n"]
        | Default
    ) = Default("output"),
    adaptivity: Float = Default("0.5"),
    floor_offset: Float = Default("1"),
    noise_link: (
        Int
        | Literal["none", "min", "max", "average"]
        | Default
    ) = Default("min"),
    band_multiplier: Float = Default("1.25"),
    sample_noise: (
        Int
        | Literal["none", "start", "begin", "stop", "end"]
        | Default
    ) = Default("none"),
    gain_smooth: Int = Default("0"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Denoise audio samples using FFT.

Parameters:

Name Type Description Default
noise_reduction Float

set the noise reduction (from 0.01 to 97) (default 12)

Default('12')
noise_floor Float

set the noise floor (from -80 to -20) (default -50)

Default('-50')
noise_type Int | Literal['white', 'w', 'vinyl', 'v', 'shellac', 's', 'custom', 'c'] | Default

set the noise type (from 0 to 3) (default white)

Default('white')
band_noise String

set the custom bands noise

Default(None)
residual_floor Float

set the residual floor (from -80 to -20) (default -38)

Default('-38')
track_noise Boolean

track noise (default false)

Default('false')
track_residual Boolean

track residual (default false)

Default('false')
output_mode Int | Literal['input', 'i', 'output', 'o', 'noise', 'n'] | Default

set output mode (from 0 to 2) (default output)

Default('output')
adaptivity Float

set adaptivity factor (from 0 to 1) (default 0.5)

Default('0.5')
floor_offset Float

set noise floor offset factor (from -2 to 2) (default 1)

Default('1')
noise_link Int | Literal['none', 'min', 'max', 'average'] | Default

set the noise floor link (from 0 to 3) (default min)

Default('min')
band_multiplier Float

set band multiplier (from 0.2 to 5) (default 1.25)

Default('1.25')
sample_noise Int | Literal['none', 'start', 'begin', 'stop', 'end'] | Default

set sample noise mode (from 0 to 2) (default none)

Default('none')
gain_smooth Int

set gain smooth radius (from 0 to 50) (default 0)

Default('0')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

afftfilt

afftfilt(
    *,
    real: String = Default("re"),
    imag: String = Default("im"),
    win_size: Int = Default("4096"),
    win_func: (
        Int
        | Literal[
            "rect",
            "bartlett",
            "hann",
            "hanning",
            "hamming",
            "blackman",
            "welch",
            "flattop",
            "bharris",
            "bnuttall",
            "bhann",
            "sine",
            "nuttall",
            "lanczos",
            "gauss",
            "tukey",
            "dolph",
            "cauchy",
            "parzen",
            "poisson",
            "bohman",
            "kaiser",
        ]
        | Default
    ) = Default("hann"),
    overlap: Float = Default("0.75"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply arbitrary expressions to samples in frequency domain.

Parameters:

Name Type Description Default
real String

set channels real expressions (default "re")

Default('re')
imag String

set channels imaginary expressions (default "im")

Default('im')
win_size Int

set window size (from 16 to 131072) (default 4096)

Default('4096')
win_func Int | Literal['rect', 'bartlett', 'hann', 'hanning', 'hamming', 'blackman', 'welch', 'flattop', 'bharris', 'bnuttall', 'bhann', 'sine', 'nuttall', 'lanczos', 'gauss', 'tukey', 'dolph', 'cauchy', 'parzen', 'poisson', 'bohman', 'kaiser'] | Default

set window function (from 0 to 20) (default hann)

Default('hann')
overlap Float

set window overlap (from 0 to 1) (default 0.75)

Default('0.75')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

afilter

afilter(
    *streams: FilterableStream,
    name: str,
    input_typings: tuple[StreamType, ...] = (audio,),
    **kwargs: Any
) -> AudioStream

Apply a custom audio filter to this stream.

This method applies a custom FFmpeg audio filter to this stream and returns the resulting audio stream. It's a convenience wrapper around filter_multi_output that handles the case of filters with a single audio output.

Parameters:

Name Type Description Default
*streams FilterableStream

Additional input streams for the filter

()
name str

The name of the FFmpeg filter to apply

required
input_typings tuple[StreamType, ...]

The expected types of the input streams (defaults to all audio)

(audio,)
**kwargs Any

Filter-specific parameters as keyword arguments

{}

Returns:

Type Description
AudioStream

An AudioStream representing the filter's output

Example
# Apply a volume filter to an audio stream
louder = stream.afilter(name="volume", volume=2.0)

aformat

aformat(
    *,
    sample_fmts: String = Default(None),
    sample_rates: String = Default(None),
    channel_layouts: String = Default(None),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Convert the input audio to one of the specified formats.

Parameters:

Name Type Description Default
sample_fmts String

A '|'-separated list of sample formats.

Default(None)
sample_rates String

A '|'-separated list of sample rates.

Default(None)
channel_layouts String

A '|'-separated list of channel layouts.

Default(None)
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

afreqshift

afreqshift(
    *,
    shift: Double = Default("0"),
    level: Double = Default("1"),
    order: Int = Default("8"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply frequency shifting to input audio.

Parameters:

Name Type Description Default
shift Double

set frequency shift (from -2.14748e+09 to INT_MAX) (default 0)

Default('0')
level Double

set output level (from 0 to 1) (default 1)

Default('1')
order Int

set filter order (from 1 to 16) (default 8)

Default('8')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

afwtdn

afwtdn(
    *,
    sigma: Double = Default("0"),
    levels: Int = Default("10"),
    wavet: (
        Int
        | Literal[
            "sym2",
            "sym4",
            "rbior68",
            "deb10",
            "sym10",
            "coif5",
            "bl3",
        ]
        | Default
    ) = Default("sym10"),
    percent: Double = Default("85"),
    profile: Boolean = Default("false"),
    adaptive: Boolean = Default("false"),
    samples: Int = Default("8192"),
    softness: Double = Default("1"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Denoise audio stream using Wavelets.

Parameters:

Name Type Description Default
sigma Double

set noise sigma (from 0 to 1) (default 0)

Default('0')
levels Int

set number of wavelet levels (from 1 to 12) (default 10)

Default('10')
wavet Int | Literal['sym2', 'sym4', 'rbior68', 'deb10', 'sym10', 'coif5', 'bl3'] | Default

set wavelet type (from 0 to 6) (default sym10)

Default('sym10')
percent Double

set percent of full denoising (from 0 to 100) (default 85)

Default('85')
profile Boolean

profile noise (default false)

Default('false')
adaptive Boolean

adaptive profiling of noise (default false)

Default('false')
samples Int

set frame size in number of samples (from 512 to 65536) (default 8192)

Default('8192')
softness Double

set thresholding softness (from 0 to 10) (default 1)

Default('1')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

agate

agate(
    *,
    level_in: Double = Default("1"),
    mode: (
        Int | Literal["downward", "upward"] | Default
    ) = Default("downward"),
    range: Double = Default("0.06125"),
    threshold: Double = Default("0.125"),
    ratio: Double = Default("2"),
    attack: Double = Default("20"),
    release: Double = Default("250"),
    makeup: Double = Default("1"),
    knee: Double = Default("2.82843"),
    detection: (
        Int | Literal["peak", "rms"] | Default
    ) = Default("rms"),
    link: (
        Int | Literal["average", "maximum"] | Default
    ) = Default("average"),
    level_sc: Double = Default("1"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Audio gate.

Parameters:

Name Type Description Default
level_in Double

set input level (from 0.015625 to 64) (default 1)

Default('1')
mode Int | Literal['downward', 'upward'] | Default

set mode (from 0 to 1) (default downward)

Default('downward')
range Double

set max gain reduction (from 0 to 1) (default 0.06125)

Default('0.06125')
threshold Double

set threshold (from 0 to 1) (default 0.125)

Default('0.125')
ratio Double

set ratio (from 1 to 9000) (default 2)

Default('2')
attack Double

set attack (from 0.01 to 9000) (default 20)

Default('20')
release Double

set release (from 0.01 to 9000) (default 250)

Default('250')
makeup Double

set makeup gain (from 1 to 64) (default 1)

Default('1')
knee Double

set knee (from 1 to 8) (default 2.82843)

Default('2.82843')
detection Int | Literal['peak', 'rms'] | Default

set detection (from 0 to 1) (default rms)

Default('rms')
link Int | Literal['average', 'maximum'] | Default

set link (from 0 to 1) (default average)

Default('average')
level_sc Double

set sidechain gain (from 0.015625 to 64) (default 1)

Default('1')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

agraphmonitor

agraphmonitor(
    *,
    size: Image_size = Default("hd720"),
    opacity: Float = Default("0.9"),
    mode: (
        Flags
        | Literal[
            "full",
            "compact",
            "nozero",
            "noeof",
            "nodisabled",
        ]
        | Default
    ) = Default("0"),
    flags: (
        Flags
        | Literal[
            "none",
            "all",
            "queue",
            "frame_count_in",
            "frame_count_out",
            "frame_count_delta",
            "pts",
            "pts_delta",
            "time",
            "time_delta",
            "timebase",
            "format",
            "size",
            "rate",
            "eof",
            "sample_count_in",
            "sample_count_out",
            "sample_count_delta",
            "disabled",
        ]
        | Default
    ) = Default("all+queue"),
    rate: Video_rate = Default("25"),
    extra_options: dict[str, Any] | None = None
) -> VideoStream

Show various filtergraph stats.

Parameters:

Name Type Description Default
size Image_size

set monitor size (default "hd720")

Default('hd720')
opacity Float

set video opacity (from 0 to 1) (default 0.9)

Default('0.9')
mode Flags | Literal['full', 'compact', 'nozero', 'noeof', 'nodisabled'] | Default

set mode (default 0)

Default('0')
flags Flags | Literal['none', 'all', 'queue', 'frame_count_in', 'frame_count_out', 'frame_count_delta', 'pts', 'pts_delta', 'time', 'time_delta', 'timebase', 'format', 'size', 'rate', 'eof', 'sample_count_in', 'sample_count_out', 'sample_count_delta', 'disabled'] | Default

set flags (default all+queue)

Default('all+queue')
rate Video_rate

set video rate (default "25")

Default('25')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default VideoStream

the video stream

References

FFmpeg Documentation

ahistogram

ahistogram(
    *,
    dmode: (
        Int | Literal["single", "separate"] | Default
    ) = Default("single"),
    rate: Video_rate = Default("25"),
    size: Image_size = Default("hd720"),
    scale: (
        Int
        | Literal["log", "sqrt", "cbrt", "lin", "rlog"]
        | Default
    ) = Default("log"),
    ascale: Int | Literal["log", "lin"] | Default = Default(
        "log"
    ),
    acount: Int = Default("1"),
    rheight: Float = Default("0.1"),
    slide: (
        Int | Literal["replace", "scroll"] | Default
    ) = Default("replace"),
    hmode: Int | Literal["abs", "sign"] | Default = Default(
        "abs"
    ),
    extra_options: dict[str, Any] | None = None
) -> VideoStream

Convert input audio to histogram video output.

Parameters:

Name Type Description Default
dmode Int | Literal['single', 'separate'] | Default

set method to display channels (from 0 to 1) (default single)

Default('single')
rate Video_rate

set video rate (default "25")

Default('25')
size Image_size

set video size (default "hd720")

Default('hd720')
scale Int | Literal['log', 'sqrt', 'cbrt', 'lin', 'rlog'] | Default

set display scale (from 0 to 4) (default log)

Default('log')
ascale Int | Literal['log', 'lin'] | Default

set amplitude scale (from 0 to 1) (default log)

Default('log')
acount Int

how much frames to accumulate (from -1 to 100) (default 1)

Default('1')
rheight Float

set histogram ratio of window height (from 0 to 1) (default 0.1)

Default('0.1')
slide Int | Literal['replace', 'scroll'] | Default

set sonogram sliding (from 0 to 1) (default replace)

Default('replace')
hmode Int | Literal['abs', 'sign'] | Default

set histograms mode (from 0 to 1) (default abs)

Default('abs')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default VideoStream

the video stream

References

FFmpeg Documentation

aiir

aiir(
    *,
    zeros: String = Default("1+0i 1-0i"),
    poles: String = Default("1+0i 1-0i"),
    gains: String = Default("1|1"),
    dry: Double = Default("1"),
    wet: Double = Default("1"),
    format: (
        Int
        | Literal["ll", "sf", "tf", "zp", "pr", "pd", "sp"]
        | Default
    ) = Default("zp"),
    process: (
        Int | Literal["d", "s", "p"] | Default
    ) = Default("s"),
    precision: (
        Int | Literal["dbl", "flt", "i32", "i16"] | Default
    ) = Default("dbl"),
    e: (
        Int | Literal["dbl", "flt", "i32", "i16"] | Default
    ) = Default("dbl"),
    normalize: Boolean = Default("true"),
    mix: Double = Default("1"),
    response: Boolean = Default("false"),
    channel: Int = Default("0"),
    size: Image_size = Default("hd720"),
    rate: Video_rate = Default("25"),
    extra_options: dict[str, Any] | None = None
) -> FilterNode

Apply Infinite Impulse Response filter with supplied coefficients.

Parameters:

Name Type Description Default
zeros String

set B/numerator/zeros/reflection coefficients (default "1+0i 1-0i")

Default('1+0i 1-0i')
poles String

set A/denominator/poles/ladder coefficients (default "1+0i 1-0i")

Default('1+0i 1-0i')
gains String

set channels gains (default "1|1")

Default('1|1')
dry Double

set dry gain (from 0 to 1) (default 1)

Default('1')
wet Double

set wet gain (from 0 to 1) (default 1)

Default('1')
format Int | Literal['ll', 'sf', 'tf', 'zp', 'pr', 'pd', 'sp'] | Default

set coefficients format (from -2 to 4) (default zp)

Default('zp')
process Int | Literal['d', 's', 'p'] | Default

set kind of processing (from 0 to 2) (default s)

Default('s')
precision Int | Literal['dbl', 'flt', 'i32', 'i16'] | Default

set filtering precision (from 0 to 3) (default dbl)

Default('dbl')
e Int | Literal['dbl', 'flt', 'i32', 'i16'] | Default

set precision (from 0 to 3) (default dbl)

Default('dbl')
normalize Boolean

normalize coefficients (default true)

Default('true')
mix Double

set mix (from 0 to 1) (default 1)

Default('1')
response Boolean

show IR frequency response (default false)

Default('false')
channel Int

set IR channel to display frequency response (from 0 to 1024) (default 0)

Default('0')
size Image_size

set video size (default "hd720")

Default('hd720')
rate Video_rate

set video rate (default "25")

Default('25')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
filter_node FilterNode

the filter node

References

FFmpeg Documentation

aintegral

aintegral(
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None,
) -> AudioStream

Compute integral of input audio.

Parameters:

Name Type Description Default
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

alatency

alatency(
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None,
) -> AudioStream

Report audio filtering latency.

Parameters:

Name Type Description Default
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

alimiter

alimiter(
    *,
    level_in: Double = Default("1"),
    level_out: Double = Default("1"),
    limit: Double = Default("1"),
    attack: Double = Default("5"),
    release: Double = Default("50"),
    asc: Boolean = Default("false"),
    asc_level: Double = Default("0.5"),
    level: Boolean = Default("true"),
    latency: Boolean = Default("false"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Audio lookahead limiter.

Parameters:

Name Type Description Default
level_in Double

set input level (from 0.015625 to 64) (default 1)

Default('1')
level_out Double

set output level (from 0.015625 to 64) (default 1)

Default('1')
limit Double

set limit (from 0.0625 to 1) (default 1)

Default('1')
attack Double

set attack (from 0.1 to 80) (default 5)

Default('5')
release Double

set release (from 1 to 8000) (default 50)

Default('50')
asc Boolean

enable asc (default false)

Default('false')
asc_level Double

set asc level (from 0 to 1) (default 0.5)

Default('0.5')
level Boolean

auto level (default true)

Default('true')
latency Boolean

compensate delay (default false)

Default('false')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

allpass

allpass(
    *,
    frequency: Double = Default("3000"),
    width_type: (
        Int | Literal["h", "q", "o", "s", "k"] | Default
    ) = Default("q"),
    width: Double = Default("0.707"),
    mix: Double = Default("1"),
    channels: String = Default("all"),
    normalize: Boolean = Default("false"),
    order: Int = Default("2"),
    transform: (
        Int
        | Literal[
            "di", "dii", "tdi", "tdii", "latt", "svf", "zdf"
        ]
        | Default
    ) = Default("di"),
    precision: (
        Int
        | Literal["auto", "s16", "s32", "f32", "f64"]
        | Default
    ) = Default("auto"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply a two-pole all-pass filter.

Parameters:

Name Type Description Default
frequency Double

set central frequency (from 0 to 999999) (default 3000)

Default('3000')
width_type Int | Literal['h', 'q', 'o', 's', 'k'] | Default

set filter-width type (from 1 to 5) (default q)

Default('q')
width Double

set width (from 0 to 99999) (default 0.707)

Default('0.707')
mix Double

set mix (from 0 to 1) (default 1)

Default('1')
channels String

set channels to filter (default "all")

Default('all')
normalize Boolean

normalize coefficients (default false)

Default('false')
order Int

set filter order (from 1 to 2) (default 2)

Default('2')
transform Int | Literal['di', 'dii', 'tdi', 'tdii', 'latt', 'svf', 'zdf'] | Default

set transform type (from 0 to 6) (default di)

Default('di')
precision Int | Literal['auto', 's16', 's32', 'f32', 'f64'] | Default

set filtering precision (from -1 to 3) (default auto)

Default('auto')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

aloop

aloop(
    *,
    loop: Int = Default("0"),
    size: Int64 = Default("0"),
    start: Int64 = Default("0"),
    time: Duration = Default("INT64_MAX"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Loop audio samples.

Parameters:

Name Type Description Default
loop Int

number of loops (from -1 to INT_MAX) (default 0)

Default('0')
size Int64

max number of samples to loop (from 0 to INT_MAX) (default 0)

Default('0')
start Int64

set the loop start sample (from -1 to I64_MAX) (default 0)

Default('0')
time Duration

set the loop start time (default INT64_MAX)

Default('INT64_MAX')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

ametadata

ametadata(
    *,
    mode: (
        Int
        | Literal[
            "select", "add", "modify", "delete", "print"
        ]
        | Default
    ) = Default("select"),
    key: String = Default(None),
    value: String = Default(None),
    function: (
        Int
        | Literal[
            "same_str",
            "starts_with",
            "less",
            "equal",
            "greater",
            "expr",
            "ends_with",
        ]
        | Default
    ) = Default("same_str"),
    expr: String = Default(None),
    file: String = Default(None),
    direct: Boolean = Default("false"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Manipulate audio frame metadata.

Parameters:

Name Type Description Default
mode Int | Literal['select', 'add', 'modify', 'delete', 'print'] | Default

set a mode of operation (from 0 to 4) (default select)

Default('select')
key String

set metadata key

Default(None)
value String

set metadata value

Default(None)
function Int | Literal['same_str', 'starts_with', 'less', 'equal', 'greater', 'expr', 'ends_with'] | Default

function for comparing values (from 0 to 6) (default same_str)

Default('same_str')
expr String

set expression for expr function

Default(None)
file String

set file where to print metadata information

Default(None)
direct Boolean

reduce buffering when printing to user-set file or pipe (default false)

Default('false')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

amultiply

amultiply(
    _multiply1: AudioStream,
    extra_options: dict[str, Any] | None = None,
) -> AudioStream

Multiply two audio streams.

Parameters:

Name Type Description Default
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

anequalizer

anequalizer(
    *,
    params: String = Default(""),
    curves: Boolean = Default("false"),
    size: Image_size = Default("hd720"),
    mgain: Double = Default("60"),
    fscale: Int | Literal["lin", "log"] | Default = Default(
        "log"
    ),
    colors: String = Default(
        "red|green|blue|yellow|orange|lime|pink|magenta|brown"
    ),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> FilterNode

Apply high-order audio parametric multi band equalizer.

Parameters:

Name Type Description Default
params String

(default "")

Default('')
curves Boolean

draw frequency response curves (default false)

Default('false')
size Image_size

set video size (default "hd720")

Default('hd720')
mgain Double

set max gain (from -900 to 900) (default 60)

Default('60')
fscale Int | Literal['lin', 'log'] | Default

set frequency scale (from 0 to 1) (default log)

Default('log')
colors String

set channels curves colors (default "red|green|blue|yellow|orange|lime|pink|magenta|brown")

Default('red|green|blue|yellow|orange|lime|pink|magenta|brown')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
filter_node FilterNode

the filter node

References

FFmpeg Documentation

anlmdn

anlmdn(
    *,
    strength: Float = Default("1e-05"),
    patch: Duration = Default("0.002"),
    research: Duration = Default("0.006"),
    output: (
        Int | Literal["i", "o", "n"] | Default
    ) = Default("o"),
    smooth: Float = Default("11"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Reduce broadband noise from stream using Non-Local Means.

Parameters:

Name Type Description Default
strength Float

set denoising strength (from 1e-05 to 10000) (default 1e-05)

Default('1e-05')
patch Duration

set patch duration (default 0.002)

Default('0.002')
research Duration

set research duration (default 0.006)

Default('0.006')
output Int | Literal['i', 'o', 'n'] | Default

set output mode (from 0 to 2) (default o)

Default('o')
smooth Float

set smooth factor (from 1 to 1000) (default 11)

Default('11')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

anlmf

anlmf(
    _desired: AudioStream,
    *,
    order: Int = Default("256"),
    mu: Float = Default("0.75"),
    eps: Float = Default("1"),
    leakage: Float = Default("0"),
    out_mode: (
        Int | Literal["i", "d", "o", "n", "e"] | Default
    ) = Default("o"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply Normalized Least-Mean-Fourth algorithm to first audio stream.

Parameters:

Name Type Description Default
order Int

set the filter order (from 1 to 32767) (default 256)

Default('256')
mu Float

set the filter mu (from 0 to 2) (default 0.75)

Default('0.75')
eps Float

set the filter eps (from 0 to 1) (default 1)

Default('1')
leakage Float

set the filter leakage (from 0 to 1) (default 0)

Default('0')
out_mode Int | Literal['i', 'd', 'o', 'n', 'e'] | Default

set output mode (from 0 to 4) (default o)

Default('o')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

anlms

anlms(
    _desired: AudioStream,
    *,
    order: Int = Default("256"),
    mu: Float = Default("0.75"),
    eps: Float = Default("1"),
    leakage: Float = Default("0"),
    out_mode: (
        Int | Literal["i", "d", "o", "n", "e"] | Default
    ) = Default("o"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply Normalized Least-Mean-Squares algorithm to first audio stream.

Parameters:

Name Type Description Default
order Int

set the filter order (from 1 to 32767) (default 256)

Default('256')
mu Float

set the filter mu (from 0 to 2) (default 0.75)

Default('0.75')
eps Float

set the filter eps (from 0 to 1) (default 1)

Default('1')
leakage Float

set the filter leakage (from 0 to 1) (default 0)

Default('0')
out_mode Int | Literal['i', 'd', 'o', 'n', 'e'] | Default

set output mode (from 0 to 4) (default o)

Default('o')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

anull

anull(
    extra_options: dict[str, Any] | None = None,
) -> AudioStream

Pass the source unchanged to the output.

Parameters:

Name Type Description Default
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

apad

apad(
    *,
    packet_size: Int = Default("4096"),
    pad_len: Int64 = Default("-1"),
    whole_len: Int64 = Default("-1"),
    pad_dur: Duration = Default("-0.000001"),
    whole_dur: Duration = Default("-0.000001"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Pad audio with silence.

Parameters:

Name Type Description Default
packet_size Int

set silence packet size (from 0 to INT_MAX) (default 4096)

Default('4096')
pad_len Int64

set number of samples of silence to add (from -1 to I64_MAX) (default -1)

Default('-1')
whole_len Int64

set minimum target number of samples in the audio stream (from -1 to I64_MAX) (default -1)

Default('-1')
pad_dur Duration

set duration of silence to add (default -0.000001)

Default('-0.000001')
whole_dur Duration

set minimum target duration in the audio stream (default -0.000001)

Default('-0.000001')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

aperms

aperms(
    *,
    mode: (
        Int
        | Literal["none", "ro", "rw", "toggle", "random"]
        | Default
    ) = Default("none"),
    seed: Int64 = Default("-1"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Set permissions for the output audio frame.

Parameters:

Name Type Description Default
mode Int | Literal['none', 'ro', 'rw', 'toggle', 'random'] | Default

select permissions mode (from 0 to 4) (default none)

Default('none')
seed Int64

set the seed for the random mode (from -1 to UINT32_MAX) (default -1)

Default('-1')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

aphasemeter

aphasemeter(
    *,
    rate: Video_rate = Default("25"),
    size: Image_size = Default("800x400"),
    rc: Int = Default("2"),
    gc: Int = Default("7"),
    bc: Int = Default("1"),
    mpc: String = Default("none"),
    video: Boolean = Default("true"),
    phasing: Boolean = Default("false"),
    tolerance: Float = Default("0"),
    angle: Float = Default("170"),
    duration: Duration = Default("2"),
    extra_options: dict[str, Any] | None = None
) -> FilterNode

Convert input audio to phase meter video output.

Parameters:

Name Type Description Default
rate Video_rate

set video rate (default "25")

Default('25')
size Image_size

set video size (default "800x400")

Default('800x400')
rc Int

set red contrast (from 0 to 255) (default 2)

Default('2')
gc Int

set green contrast (from 0 to 255) (default 7)

Default('7')
bc Int

set blue contrast (from 0 to 255) (default 1)

Default('1')
mpc String

set median phase color (default "none")

Default('none')
video Boolean

set video output (default true)

Default('true')
phasing Boolean

set mono and out-of-phase detection output (default false)

Default('false')
tolerance Float

set phase tolerance for mono detection (from 0 to 1) (default 0)

Default('0')
angle Float

set angle threshold for out-of-phase detection (from 90 to 180) (default 170)

Default('170')
duration Duration

set minimum mono or out-of-phase duration in seconds (default 2)

Default('2')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
filter_node FilterNode

the filter node

References

FFmpeg Documentation

aphaser

aphaser(
    *,
    in_gain: Double = Default("0.4"),
    out_gain: Double = Default("0.74"),
    delay: Double = Default("3"),
    decay: Double = Default("0.4"),
    speed: Double = Default("0.5"),
    type: (
        Int
        | Literal["triangular", "t", "sinusoidal", "s"]
        | Default
    ) = Default("triangular"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Add a phasing effect to the audio.

Parameters:

Name Type Description Default
in_gain Double

set input gain (from 0 to 1) (default 0.4)

Default('0.4')
out_gain Double

set output gain (from 0 to 1e+09) (default 0.74)

Default('0.74')
delay Double

set delay in milliseconds (from 0 to 5) (default 3)

Default('3')
decay Double

set decay (from 0 to 0.99) (default 0.4)

Default('0.4')
speed Double

set modulation speed (from 0.1 to 2) (default 0.5)

Default('0.5')
type Int | Literal['triangular', 't', 'sinusoidal', 's'] | Default

set modulation type (from 0 to 1) (default triangular)

Default('triangular')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

aphaseshift

aphaseshift(
    *,
    shift: Double = Default("0"),
    level: Double = Default("1"),
    order: Int = Default("8"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply phase shifting to input audio.

Parameters:

Name Type Description Default
shift Double

set phase shift (from -1 to 1) (default 0)

Default('0')
level Double

set output level (from 0 to 1) (default 1)

Default('1')
order Int

set filter order (from 1 to 16) (default 8)

Default('8')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

apsnr

apsnr(
    _input1: AudioStream,
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None,
) -> AudioStream

Measure Audio Peak Signal-to-Noise Ratio.

Parameters:

Name Type Description Default
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

apsyclip

apsyclip(
    *,
    level_in: Double = Default("1"),
    level_out: Double = Default("1"),
    clip: Double = Default("1"),
    diff: Boolean = Default("false"),
    adaptive: Double = Default("0.5"),
    iterations: Int = Default("10"),
    level: Boolean = Default("false"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Audio Psychoacoustic Clipper.

Parameters:

Name Type Description Default
level_in Double

set input level (from 0.015625 to 64) (default 1)

Default('1')
level_out Double

set output level (from 0.015625 to 64) (default 1)

Default('1')
clip Double

set clip level (from 0.015625 to 1) (default 1)

Default('1')
diff Boolean

enable difference (default false)

Default('false')
adaptive Double

set adaptive distortion (from 0 to 1) (default 0.5)

Default('0.5')
iterations Int

set iterations (from 1 to 20) (default 10)

Default('10')
level Boolean

set auto level (default false)

Default('false')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

apulsator

apulsator(
    *,
    level_in: Double = Default("1"),
    level_out: Double = Default("1"),
    mode: (
        Int
        | Literal[
            "sine", "triangle", "square", "sawup", "sawdown"
        ]
        | Default
    ) = Default("sine"),
    amount: Double = Default("1"),
    offset_l: Double = Default("0"),
    offset_r: Double = Default("0.5"),
    width: Double = Default("1"),
    timing: (
        Int | Literal["bpm", "ms", "hz"] | Default
    ) = Default("hz"),
    bpm: Double = Default("120"),
    ms: Int = Default("500"),
    hz: Double = Default("2"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Audio pulsator.

Parameters:

Name Type Description Default
level_in Double

set input gain (from 0.015625 to 64) (default 1)

Default('1')
level_out Double

set output gain (from 0.015625 to 64) (default 1)

Default('1')
mode Int | Literal['sine', 'triangle', 'square', 'sawup', 'sawdown'] | Default

set mode (from 0 to 4) (default sine)

Default('sine')
amount Double

set modulation (from 0 to 1) (default 1)

Default('1')
offset_l Double

set offset L (from 0 to 1) (default 0)

Default('0')
offset_r Double

set offset R (from 0 to 1) (default 0.5)

Default('0.5')
width Double

set pulse width (from 0 to 2) (default 1)

Default('1')
timing Int | Literal['bpm', 'ms', 'hz'] | Default

set timing (from 0 to 2) (default hz)

Default('hz')
bpm Double

set BPM (from 30 to 300) (default 120)

Default('120')
ms Int

set ms (from 10 to 2000) (default 500)

Default('500')
hz Double

set frequency (from 0.01 to 100) (default 2)

Default('2')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

arealtime

arealtime(
    *,
    limit: Duration = Default("2"),
    speed: Double = Default("1"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Slow down filtering to match realtime.

Parameters:

Name Type Description Default
limit Duration

sleep time limit (default 2)

Default('2')
speed Double

speed factor (from DBL_MIN to DBL_MAX) (default 1)

Default('1')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

aresample

aresample(
    *,
    sample_rate: Int = Default("0"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Resample audio data.

Parameters:

Name Type Description Default
sample_rate Int

(from 0 to INT_MAX) (default 0)

Default('0')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

areverse

areverse(
    extra_options: dict[str, Any] | None = None,
) -> AudioStream

Reverse an audio clip.

Parameters:

Name Type Description Default
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

arls

arls(
    _desired: AudioStream,
    *,
    order: Int = Default("16"),
    _lambda: Float = Default("1"),
    delta: Float = Default("2"),
    out_mode: (
        Int | Literal["i", "d", "o", "n", "e"] | Default
    ) = Default("o"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply Recursive Least Squares algorithm to first audio stream.

Parameters:

Name Type Description Default
order Int

set the filter order (from 1 to 32767) (default 16)

Default('16')
_lambda Float

set the filter lambda (from 0 to 1) (default 1)

Default('1')
delta Float

set the filter delta (from 0 to 32767) (default 2)

Default('2')
out_mode Int | Literal['i', 'd', 'o', 'n', 'e'] | Default

set output mode (from 0 to 4) (default o)

Default('o')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

arnndn

arnndn(
    *,
    model: String = Default(None),
    mix: Float = Default("1"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Reduce noise from speech using Recurrent Neural Networks.

Parameters:

Name Type Description Default
model String

set model name

Default(None)
mix Float

set output vs input mix (from -1 to 1) (default 1)

Default('1')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

asdr

asdr(
    _input1: AudioStream,
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None,
) -> AudioStream

Measure Audio Signal-to-Distortion Ratio.

Parameters:

Name Type Description Default
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

asegment

asegment(
    *,
    timestamps: String = Default(None),
    samples: String = Default(None),
    extra_options: dict[str, Any] | None = None
) -> FilterNode

Segment audio stream.

Parameters:

Name Type Description Default
timestamps String

timestamps of input at which to split input

Default(None)
samples String

samples at which to split input

Default(None)
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
filter_node FilterNode

the filter node

References

FFmpeg Documentation

aselect

aselect(
    *,
    expr: String = Default("1"),
    outputs: Int = Default("1"),
    extra_options: dict[str, Any] | None = None
) -> FilterNode

Select audio frames to pass in output.

Parameters:

Name Type Description Default
expr String

set an expression to use for selecting frames (default "1")

Default('1')
outputs Int

set the number of outputs (from 1 to INT_MAX) (default 1)

Default('1')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
filter_node FilterNode

the filter node

References

FFmpeg Documentation

asendcmd

asendcmd(
    *,
    commands: String = Default(None),
    filename: String = Default(None),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Send commands to filters.

Parameters:

Name Type Description Default
commands String

set commands

Default(None)
filename String

set commands file

Default(None)
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

asetnsamples

asetnsamples(
    *,
    nb_out_samples: Int = Default("1024"),
    pad: Boolean = Default("true"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Set the number of samples for each output audio frames.

Parameters:

Name Type Description Default
nb_out_samples Int

set the number of per-frame output samples (from 1 to INT_MAX) (default 1024)

Default('1024')
pad Boolean

pad last frame with zeros (default true)

Default('true')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

asetpts

asetpts(
    *,
    expr: String = Default("PTS"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Set PTS for the output audio frame.

Parameters:

Name Type Description Default
expr String

Expression determining the frame timestamp (default "PTS")

Default('PTS')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

asetrate

asetrate(
    *,
    sample_rate: Int = Default("44100"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Change the sample rate without altering the data.

Parameters:

Name Type Description Default
sample_rate Int

set the sample rate (from 1 to INT_MAX) (default 44100)

Default('44100')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

asettb

asettb(
    *,
    expr: String = Default("intb"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Set timebase for the audio output link.

Parameters:

Name Type Description Default
expr String

set expression determining the output timebase (default "intb")

Default('intb')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

ashowinfo

ashowinfo(
    extra_options: dict[str, Any] | None = None,
) -> AudioStream

Show textual information for each audio frame.

Parameters:

Name Type Description Default
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

asidedata

asidedata(
    *,
    mode: (
        Int | Literal["select", "delete"] | Default
    ) = Default("select"),
    type: (
        Int
        | Literal[
            "PANSCAN",
            "A53_CC",
            "STEREO3D",
            "MATRIXENCODING",
            "DOWNMIX_INFO",
            "REPLAYGAIN",
            "DISPLAYMATRIX",
            "AFD",
            "MOTION_VECTORS",
            "SKIP_SAMPLES",
            "AUDIO_SERVICE_TYPE",
            "MASTERING_DISPLAY_METADATA",
            "GOP_TIMECODE",
            "SPHERICAL",
            "CONTENT_LIGHT_LEVEL",
            "ICC_PROFILE",
            "S12M_TIMECOD",
            "DYNAMIC_HDR_PLUS",
            "REGIONS_OF_INTEREST",
            "DETECTION_BOUNDING_BOXES",
            "SEI_UNREGISTERED",
        ]
        | Default
    ) = Default("-1"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Manipulate audio frame side data.

Parameters:

Name Type Description Default
mode Int | Literal['select', 'delete'] | Default

set a mode of operation (from 0 to 1) (default select)

Default('select')
type Int | Literal['PANSCAN', 'A53_CC', 'STEREO3D', 'MATRIXENCODING', 'DOWNMIX_INFO', 'REPLAYGAIN', 'DISPLAYMATRIX', 'AFD', 'MOTION_VECTORS', 'SKIP_SAMPLES', 'AUDIO_SERVICE_TYPE', 'MASTERING_DISPLAY_METADATA', 'GOP_TIMECODE', 'SPHERICAL', 'CONTENT_LIGHT_LEVEL', 'ICC_PROFILE', 'S12M_TIMECOD', 'DYNAMIC_HDR_PLUS', 'REGIONS_OF_INTEREST', 'DETECTION_BOUNDING_BOXES', 'SEI_UNREGISTERED'] | Default

set side data type (from -1 to INT_MAX) (default -1)

Default('-1')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

asisdr

asisdr(
    _input1: AudioStream,
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None,
) -> AudioStream

Measure Audio Scale-Invariant Signal-to-Distortion Ratio.

Parameters:

Name Type Description Default
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

asoftclip

asoftclip(
    *,
    type: (
        Int
        | Literal[
            "hard",
            "tanh",
            "atan",
            "cubic",
            "exp",
            "alg",
            "quintic",
            "sin",
            "erf",
        ]
        | Default
    ) = Default("tanh"),
    threshold: Double = Default("1"),
    output: Double = Default("1"),
    param: Double = Default("1"),
    oversample: Int = Default("1"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Audio Soft Clipper.

Parameters:

Name Type Description Default
type Int | Literal['hard', 'tanh', 'atan', 'cubic', 'exp', 'alg', 'quintic', 'sin', 'erf'] | Default

set softclip type (from -1 to 7) (default tanh)

Default('tanh')
threshold Double

set softclip threshold (from 1e-06 to 1) (default 1)

Default('1')
output Double

set softclip output gain (from 1e-06 to 16) (default 1)

Default('1')
param Double

set softclip parameter (from 0.01 to 3) (default 1)

Default('1')
oversample Int

set oversample factor (from 1 to 64) (default 1)

Default('1')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

aspectralstats

aspectralstats(
    *,
    win_size: Int = Default("2048"),
    win_func: (
        Int
        | Literal[
            "rect",
            "bartlett",
            "hann",
            "hanning",
            "hamming",
            "blackman",
            "welch",
            "flattop",
            "bharris",
            "bnuttall",
            "bhann",
            "sine",
            "nuttall",
            "lanczos",
            "gauss",
            "tukey",
            "dolph",
            "cauchy",
            "parzen",
            "poisson",
            "bohman",
            "kaiser",
        ]
        | Default
    ) = Default("hann"),
    overlap: Float = Default("0.5"),
    measure: (
        Flags
        | Literal[
            "none",
            "all",
            "mean",
            "variance",
            "centroid",
            "spread",
            "skewness",
            "kurtosis",
            "entropy",
            "flatness",
            "crest",
            "flux",
            "slope",
            "decrease",
            "rolloff",
        ]
        | Default
    ) = Default(
        "all+mean+variance+centroid+spread+skewness+kurtosis+entropy+flatness+crest+flux+slope+decrease+rolloff"
    ),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Show frequency domain statistics about audio frames.

Parameters:

Name Type Description Default
win_size Int

set the window size (from 32 to 65536) (default 2048)

Default('2048')
win_func Int | Literal['rect', 'bartlett', 'hann', 'hanning', 'hamming', 'blackman', 'welch', 'flattop', 'bharris', 'bnuttall', 'bhann', 'sine', 'nuttall', 'lanczos', 'gauss', 'tukey', 'dolph', 'cauchy', 'parzen', 'poisson', 'bohman', 'kaiser'] | Default

set window function (from 0 to 20) (default hann)

Default('hann')
overlap Float

set window overlap (from 0 to 1) (default 0.5)

Default('0.5')
measure Flags | Literal['none', 'all', 'mean', 'variance', 'centroid', 'spread', 'skewness', 'kurtosis', 'entropy', 'flatness', 'crest', 'flux', 'slope', 'decrease', 'rolloff'] | Default

select the parameters which are measured (default all+mean+variance+centroid+spread+skewness+kurtosis+entropy+flatness+crest+flux+slope+decrease+rolloff)

Default('all+mean+variance+centroid+spread+skewness+kurtosis+entropy+flatness+crest+flux+slope+decrease+rolloff')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

asplit

asplit(
    *,
    outputs: Int = Default("2"),
    extra_options: dict[str, Any] | None = None
) -> FilterNode

Pass on the audio input to N audio outputs.

Parameters:

Name Type Description Default
outputs Int

set number of outputs (from 1 to INT_MAX) (default 2)

Default('2')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
filter_node FilterNode

the filter node

References

FFmpeg Documentation

asr

asr(
    *,
    rate: Int = Default("16000"),
    hmm: String = Default(None),
    dict: String = Default(None),
    lm: String = Default(None),
    lmctl: String = Default(None),
    lmname: String = Default(None),
    logfn: String = Default("/dev/null"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Automatic Speech Recognition.

Parameters:

Name Type Description Default
rate Int

set sampling rate (from 0 to INT_MAX) (default 16000)

Default('16000')
hmm String

set directory containing acoustic model files

Default(None)
dict String

set pronunciation dictionary

Default(None)
lm String

set language model file

Default(None)
lmctl String

set language model set

Default(None)
lmname String

set which language model to use

Default(None)
logfn String

set output for log messages (default "/dev/null")

Default('/dev/null')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

astats

astats(
    *,
    length: Double = Default("0.05"),
    metadata: Boolean = Default("false"),
    reset: Int = Default("0"),
    measure_perchannel: (
        Flags
        | Literal[
            "none",
            "all",
            "Bit_depth",
            "Crest_factor",
            "DC_offset",
            "Dynamic_range",
            "Entropy",
            "Flat_factor",
            "Max_difference",
            "Max_level",
            "Mean_difference",
            "Min_difference",
            "Min_level",
            "Noise_floor",
            "Noise_floor_count",
            "Number_of_Infs",
            "Number_of_NaNs",
            "Number_of_denormals",
            "Number_of_samples",
            "Peak_count",
            "Peak_level",
            "RMS_difference",
            "RMS_level",
            "RMS_peak",
            "RMS_trough",
            "Zero_crossings",
            "Zero_crossings_rate",
            "Abs_Peak_count",
        ]
        | Default
    ) = Default(
        "all+Bit_depth+Crest_factor+DC_offset+Dynamic_range+Entropy+Flat_factor+Max_difference+Max_level+Mean_difference+Min_difference+Min_level+Noise_floor+Noise_floor_count+Number_of_Infs+Number_of_NaNs+Number_of_denormals+Number_of_samples+Peak_count+Peak_level+RMS_difference+RMS_level+RMS_peak+RMS_trough+Zero_crossings+Zero_crossings_rate+Abs_Peak_count"
    ),
    measure_overall: (
        Flags
        | Literal[
            "none",
            "all",
            "Bit_depth",
            "Crest_factor",
            "DC_offset",
            "Dynamic_range",
            "Entropy",
            "Flat_factor",
            "Max_difference",
            "Max_level",
            "Mean_difference",
            "Min_difference",
            "Min_level",
            "Noise_floor",
            "Noise_floor_count",
            "Number_of_Infs",
            "Number_of_NaNs",
            "Number_of_denormals",
            "Number_of_samples",
            "Peak_count",
            "Peak_level",
            "RMS_difference",
            "RMS_level",
            "RMS_peak",
            "RMS_trough",
            "Zero_crossings",
            "Zero_crossings_rate",
            "Abs_Peak_count",
        ]
        | Default
    ) = Default(
        "all+Bit_depth+Crest_factor+DC_offset+Dynamic_range+Entropy+Flat_factor+Max_difference+Max_level+Mean_difference+Min_difference+Min_level+Noise_floor+Noise_floor_count+Number_of_Infs+Number_of_NaNs+Number_of_denormals+Number_of_samples+Peak_count+Peak_level+RMS_difference+RMS_level+RMS_peak+RMS_trough+Zero_crossings+Zero_crossings_rate+Abs_Peak_count"
    ),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Show time domain statistics about audio frames.

Parameters:

Name Type Description Default
length Double

set the window length (from 0 to 10) (default 0.05)

Default('0.05')
metadata Boolean

inject metadata in the filtergraph (default false)

Default('false')
reset Int

Set the number of frames over which cumulative stats are calculated before being reset (from 0 to INT_MAX) (default 0)

Default('0')
measure_perchannel Flags | Literal['none', 'all', 'Bit_depth', 'Crest_factor', 'DC_offset', 'Dynamic_range', 'Entropy', 'Flat_factor', 'Max_difference', 'Max_level', 'Mean_difference', 'Min_difference', 'Min_level', 'Noise_floor', 'Noise_floor_count', 'Number_of_Infs', 'Number_of_NaNs', 'Number_of_denormals', 'Number_of_samples', 'Peak_count', 'Peak_level', 'RMS_difference', 'RMS_level', 'RMS_peak', 'RMS_trough', 'Zero_crossings', 'Zero_crossings_rate', 'Abs_Peak_count'] | Default

Select the parameters which are measured per channel (default all+Bit_depth+Crest_factor+DC_offset+Dynamic_range+Entropy+Flat_factor+Max_difference+Max_level+Mean_difference+Min_difference+Min_level+Noise_floor+Noise_floor_count+Number_of_Infs+Number_of_NaNs+Number_of_denormals+Number_of_samples+Peak_count+Peak_level+RMS_difference+RMS_level+RMS_peak+RMS_trough+Zero_crossings+Zero_crossings_rate+Abs_Peak_count)

Default('all+Bit_depth+Crest_factor+DC_offset+Dynamic_range+Entropy+Flat_factor+Max_difference+Max_level+Mean_difference+Min_difference+Min_level+Noise_floor+Noise_floor_count+Number_of_Infs+Number_of_NaNs+Number_of_denormals+Number_of_samples+Peak_count+Peak_level+RMS_difference+RMS_level+RMS_peak+RMS_trough+Zero_crossings+Zero_crossings_rate+Abs_Peak_count')
measure_overall Flags | Literal['none', 'all', 'Bit_depth', 'Crest_factor', 'DC_offset', 'Dynamic_range', 'Entropy', 'Flat_factor', 'Max_difference', 'Max_level', 'Mean_difference', 'Min_difference', 'Min_level', 'Noise_floor', 'Noise_floor_count', 'Number_of_Infs', 'Number_of_NaNs', 'Number_of_denormals', 'Number_of_samples', 'Peak_count', 'Peak_level', 'RMS_difference', 'RMS_level', 'RMS_peak', 'RMS_trough', 'Zero_crossings', 'Zero_crossings_rate', 'Abs_Peak_count'] | Default

Select the parameters which are measured overall (default all+Bit_depth+Crest_factor+DC_offset+Dynamic_range+Entropy+Flat_factor+Max_difference+Max_level+Mean_difference+Min_difference+Min_level+Noise_floor+Noise_floor_count+Number_of_Infs+Number_of_NaNs+Number_of_denormals+Number_of_samples+Peak_count+Peak_level+RMS_difference+RMS_level+RMS_peak+RMS_trough+Zero_crossings+Zero_crossings_rate+Abs_Peak_count)

Default('all+Bit_depth+Crest_factor+DC_offset+Dynamic_range+Entropy+Flat_factor+Max_difference+Max_level+Mean_difference+Min_difference+Min_level+Noise_floor+Noise_floor_count+Number_of_Infs+Number_of_NaNs+Number_of_denormals+Number_of_samples+Peak_count+Peak_level+RMS_difference+RMS_level+RMS_peak+RMS_trough+Zero_crossings+Zero_crossings_rate+Abs_Peak_count')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

asubboost

asubboost(
    *,
    dry: Double = Default("1"),
    wet: Double = Default("1"),
    boost: Double = Default("2"),
    decay: Double = Default("0"),
    feedback: Double = Default("0.9"),
    cutoff: Double = Default("100"),
    slope: Double = Default("0.5"),
    delay: Double = Default("20"),
    channels: String = Default("all"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Boost subwoofer frequencies.

Parameters:

Name Type Description Default
dry Double

set dry gain (from 0 to 1) (default 1)

Default('1')
wet Double

set wet gain (from 0 to 1) (default 1)

Default('1')
boost Double

set max boost (from 1 to 12) (default 2)

Default('2')
decay Double

set decay (from 0 to 1) (default 0)

Default('0')
feedback Double

set feedback (from 0 to 1) (default 0.9)

Default('0.9')
cutoff Double

set cutoff (from 50 to 900) (default 100)

Default('100')
slope Double

set slope (from 0.0001 to 1) (default 0.5)

Default('0.5')
delay Double

set delay (from 1 to 100) (default 20)

Default('20')
channels String

set channels to filter (default "all")

Default('all')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

asubcut

asubcut(
    *,
    cutoff: Double = Default("20"),
    order: Int = Default("10"),
    level: Double = Default("1"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Cut subwoofer frequencies.

Parameters:

Name Type Description Default
cutoff Double

set cutoff frequency (from 2 to 200) (default 20)

Default('20')
order Int

set filter order (from 3 to 20) (default 10)

Default('10')
level Double

set input level (from 0 to 1) (default 1)

Default('1')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

asupercut

asupercut(
    *,
    cutoff: Double = Default("20000"),
    order: Int = Default("10"),
    level: Double = Default("1"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Cut super frequencies.

Parameters:

Name Type Description Default
cutoff Double

set cutoff frequency (from 20000 to 192000) (default 20000)

Default('20000')
order Int

set filter order (from 3 to 20) (default 10)

Default('10')
level Double

set input level (from 0 to 1) (default 1)

Default('1')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

asuperpass

asuperpass(
    *,
    centerf: Double = Default("1000"),
    order: Int = Default("4"),
    qfactor: Double = Default("1"),
    level: Double = Default("1"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply high order Butterworth band-pass filter.

Parameters:

Name Type Description Default
centerf Double

set center frequency (from 2 to 999999) (default 1000)

Default('1000')
order Int

set filter order (from 4 to 20) (default 4)

Default('4')
qfactor Double

set Q-factor (from 0.01 to 100) (default 1)

Default('1')
level Double

set input level (from 0 to 2) (default 1)

Default('1')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

asuperstop

asuperstop(
    *,
    centerf: Double = Default("1000"),
    order: Int = Default("4"),
    qfactor: Double = Default("1"),
    level: Double = Default("1"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply high order Butterworth band-stop filter.

Parameters:

Name Type Description Default
centerf Double

set center frequency (from 2 to 999999) (default 1000)

Default('1000')
order Int

set filter order (from 4 to 20) (default 4)

Default('4')
qfactor Double

set Q-factor (from 0.01 to 100) (default 1)

Default('1')
level Double

set input level (from 0 to 2) (default 1)

Default('1')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

atempo

atempo(
    *,
    tempo: Double = Default("1"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Adjust audio tempo.

Parameters:

Name Type Description Default
tempo Double

set tempo scale factor (from 0.5 to 100) (default 1)

Default('1')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

atilt

atilt(
    *,
    freq: Double = Default("10000"),
    slope: Double = Default("0"),
    width: Double = Default("1000"),
    order: Int = Default("5"),
    level: Double = Default("1"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply spectral tilt to audio.

Parameters:

Name Type Description Default
freq Double

set central frequency (from 20 to 192000) (default 10000)

Default('10000')
slope Double

set filter slope (from -1 to 1) (default 0)

Default('0')
width Double

set filter width (from 100 to 10000) (default 1000)

Default('1000')
order Int

set filter order (from 2 to 30) (default 5)

Default('5')
level Double

set input level (from 0 to 4) (default 1)

Default('1')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

atrim

atrim(
    *,
    start: Duration = Default("INT64_MAX"),
    end: Duration = Default("INT64_MAX"),
    start_pts: Int64 = Default("I64_MIN"),
    end_pts: Int64 = Default("I64_MIN"),
    duration: Duration = Default("0"),
    start_sample: Int64 = Default("-1"),
    end_sample: Int64 = Default("I64_MAX"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Pick one continuous section from the input, drop the rest.

Parameters:

Name Type Description Default
start Duration

Timestamp of the first frame that should be passed (default INT64_MAX)

Default('INT64_MAX')
end Duration

Timestamp of the first frame that should be dropped again (default INT64_MAX)

Default('INT64_MAX')
start_pts Int64

Timestamp of the first frame that should be passed (from I64_MIN to I64_MAX) (default I64_MIN)

Default('I64_MIN')
end_pts Int64

Timestamp of the first frame that should be dropped again (from I64_MIN to I64_MAX) (default I64_MIN)

Default('I64_MIN')
duration Duration

Maximum duration of the output (default 0)

Default('0')
start_sample Int64

Number of the first audio sample that should be passed to the output (from -1 to I64_MAX) (default -1)

Default('-1')
end_sample Int64

Number of the first audio sample that should be dropped again (from 0 to I64_MAX) (default I64_MAX)

Default('I64_MAX')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

avectorscope

avectorscope(
    *,
    mode: (
        Int
        | Literal["lissajous", "lissajous_xy", "polar"]
        | Default
    ) = Default("lissajous"),
    rate: Video_rate = Default("25"),
    size: Image_size = Default("400x400"),
    rc: Int = Default("40"),
    gc: Int = Default("160"),
    bc: Int = Default("80"),
    ac: Int = Default("255"),
    rf: Int = Default("15"),
    gf: Int = Default("10"),
    bf: Int = Default("5"),
    af: Int = Default("5"),
    zoom: Double = Default("1"),
    draw: (
        Int | Literal["dot", "line", "aaline"] | Default
    ) = Default("dot"),
    scale: (
        Int
        | Literal["lin", "sqrt", "cbrt", "log"]
        | Default
    ) = Default("lin"),
    swap: Boolean = Default("true"),
    mirror: (
        Int | Literal["none", "x", "y", "xy"] | Default
    ) = Default("none"),
    extra_options: dict[str, Any] | None = None
) -> VideoStream

Convert input audio to vectorscope video output.

Parameters:

Name Type Description Default
mode Int | Literal['lissajous', 'lissajous_xy', 'polar'] | Default

set mode (from 0 to 2) (default lissajous)

Default('lissajous')
rate Video_rate

set video rate (default "25")

Default('25')
size Image_size

set video size (default "400x400")

Default('400x400')
rc Int

set red contrast (from 0 to 255) (default 40)

Default('40')
gc Int

set green contrast (from 0 to 255) (default 160)

Default('160')
bc Int

set blue contrast (from 0 to 255) (default 80)

Default('80')
ac Int

set alpha contrast (from 0 to 255) (default 255)

Default('255')
rf Int

set red fade (from 0 to 255) (default 15)

Default('15')
gf Int

set green fade (from 0 to 255) (default 10)

Default('10')
bf Int

set blue fade (from 0 to 255) (default 5)

Default('5')
af Int

set alpha fade (from 0 to 255) (default 5)

Default('5')
zoom Double

set zoom factor (from 0 to 10) (default 1)

Default('1')
draw Int | Literal['dot', 'line', 'aaline'] | Default

set draw mode (from 0 to 2) (default dot)

Default('dot')
scale Int | Literal['lin', 'sqrt', 'cbrt', 'log'] | Default

set amplitude scale mode (from 0 to 3) (default lin)

Default('lin')
swap Boolean

swap x axis with y axis (default true)

Default('true')
mirror Int | Literal['none', 'x', 'y', 'xy'] | Default

mirror axis (from 0 to 3) (default none)

Default('none')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default VideoStream

the video stream

References

FFmpeg Documentation

axcorrelate

axcorrelate(
    _axcorrelate1: AudioStream,
    *,
    size: Int = Default("256"),
    algo: (
        Int | Literal["slow", "fast", "best"] | Default
    ) = Default("best"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Cross-correlate two audio streams.

Parameters:

Name Type Description Default
size Int

set the segment size (from 2 to 131072) (default 256)

Default('256')
algo Int | Literal['slow', 'fast', 'best'] | Default

set the algorithm (from 0 to 2) (default best)

Default('best')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

azmq

azmq(
    *,
    bind_address: String = Default("tcp://*:5555"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Receive commands through ZMQ and broker them to filters.

Parameters:

Name Type Description Default
bind_address String

set bind address (default "tcp://*:5555")

Default('tcp://*:5555')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

bandpass

bandpass(
    *,
    frequency: Double = Default("3000"),
    width_type: (
        Int | Literal["h", "q", "o", "s", "k"] | Default
    ) = Default("q"),
    width: Double = Default("0.5"),
    csg: Boolean = Default("false"),
    mix: Double = Default("1"),
    channels: String = Default("all"),
    normalize: Boolean = Default("false"),
    transform: (
        Int
        | Literal[
            "di", "dii", "tdi", "tdii", "latt", "svf", "zdf"
        ]
        | Default
    ) = Default("di"),
    precision: (
        Int
        | Literal["auto", "s16", "s32", "f32", "f64"]
        | Default
    ) = Default("auto"),
    blocksize: Int = Default("0"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply a two-pole Butterworth band-pass filter.

Parameters:

Name Type Description Default
frequency Double

set central frequency (from 0 to 999999) (default 3000)

Default('3000')
width_type Int | Literal['h', 'q', 'o', 's', 'k'] | Default

set filter-width type (from 1 to 5) (default q)

Default('q')
width Double

set width (from 0 to 99999) (default 0.5)

Default('0.5')
csg Boolean

use constant skirt gain (default false)

Default('false')
mix Double

set mix (from 0 to 1) (default 1)

Default('1')
channels String

set channels to filter (default "all")

Default('all')
normalize Boolean

normalize coefficients (default false)

Default('false')
transform Int | Literal['di', 'dii', 'tdi', 'tdii', 'latt', 'svf', 'zdf'] | Default

set transform type (from 0 to 6) (default di)

Default('di')
precision Int | Literal['auto', 's16', 's32', 'f32', 'f64'] | Default

set filtering precision (from -1 to 3) (default auto)

Default('auto')
blocksize Int

set the block size (from 0 to 32768) (default 0)

Default('0')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

bandreject

bandreject(
    *,
    frequency: Double = Default("3000"),
    width_type: (
        Int | Literal["h", "q", "o", "s", "k"] | Default
    ) = Default("q"),
    width: Double = Default("0.5"),
    mix: Double = Default("1"),
    channels: String = Default("all"),
    normalize: Boolean = Default("false"),
    transform: (
        Int
        | Literal[
            "di", "dii", "tdi", "tdii", "latt", "svf", "zdf"
        ]
        | Default
    ) = Default("di"),
    precision: (
        Int
        | Literal["auto", "s16", "s32", "f32", "f64"]
        | Default
    ) = Default("auto"),
    blocksize: Int = Default("0"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply a two-pole Butterworth band-reject filter.

Parameters:

Name Type Description Default
frequency Double

set central frequency (from 0 to 999999) (default 3000)

Default('3000')
width_type Int | Literal['h', 'q', 'o', 's', 'k'] | Default

set filter-width type (from 1 to 5) (default q)

Default('q')
width Double

set width (from 0 to 99999) (default 0.5)

Default('0.5')
mix Double

set mix (from 0 to 1) (default 1)

Default('1')
channels String

set channels to filter (default "all")

Default('all')
normalize Boolean

normalize coefficients (default false)

Default('false')
transform Int | Literal['di', 'dii', 'tdi', 'tdii', 'latt', 'svf', 'zdf'] | Default

set transform type (from 0 to 6) (default di)

Default('di')
precision Int | Literal['auto', 's16', 's32', 'f32', 'f64'] | Default

set filtering precision (from -1 to 3) (default auto)

Default('auto')
blocksize Int

set the block size (from 0 to 32768) (default 0)

Default('0')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

bass

bass(
    *,
    frequency: Double = Default("100"),
    width_type: (
        Int | Literal["h", "q", "o", "s", "k"] | Default
    ) = Default("q"),
    width: Double = Default("0.5"),
    gain: Double = Default("0"),
    poles: Int = Default("2"),
    mix: Double = Default("1"),
    channels: String = Default("all"),
    normalize: Boolean = Default("false"),
    transform: (
        Int
        | Literal[
            "di", "dii", "tdi", "tdii", "latt", "svf", "zdf"
        ]
        | Default
    ) = Default("di"),
    precision: (
        Int
        | Literal["auto", "s16", "s32", "f32", "f64"]
        | Default
    ) = Default("auto"),
    blocksize: Int = Default("0"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Boost or cut lower frequencies.

Parameters:

Name Type Description Default
frequency Double

set central frequency (from 0 to 999999) (default 100)

Default('100')
width_type Int | Literal['h', 'q', 'o', 's', 'k'] | Default

set filter-width type (from 1 to 5) (default q)

Default('q')
width Double

set width (from 0 to 99999) (default 0.5)

Default('0.5')
gain Double

set gain (from -900 to 900) (default 0)

Default('0')
poles Int

set number of poles (from 1 to 2) (default 2)

Default('2')
mix Double

set mix (from 0 to 1) (default 1)

Default('1')
channels String

set channels to filter (default "all")

Default('all')
normalize Boolean

normalize coefficients (default false)

Default('false')
transform Int | Literal['di', 'dii', 'tdi', 'tdii', 'latt', 'svf', 'zdf'] | Default

set transform type (from 0 to 6) (default di)

Default('di')
precision Int | Literal['auto', 's16', 's32', 'f32', 'f64'] | Default

set filtering precision (from -1 to 3) (default auto)

Default('auto')
blocksize Int

set the block size (from 0 to 32768) (default 0)

Default('0')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

biquad

biquad(
    *,
    a0: Double = Default("1"),
    a1: Double = Default("0"),
    mix: Double = Default("1"),
    channels: String = Default("all"),
    normalize: Boolean = Default("false"),
    transform: (
        Int
        | Literal[
            "di", "dii", "tdi", "tdii", "latt", "svf", "zdf"
        ]
        | Default
    ) = Default("di"),
    precision: (
        Int
        | Literal["auto", "s16", "s32", "f32", "f64"]
        | Default
    ) = Default("auto"),
    blocksize: Int = Default("0"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply a biquad IIR filter with the given coefficients.

Parameters:

Name Type Description Default
a0 Double

(from INT_MIN to INT_MAX) (default 1)

Default('1')
a1 Double

(from INT_MIN to INT_MAX) (default 0)

Default('0')
mix Double

set mix (from 0 to 1) (default 1)

Default('1')
channels String

set channels to filter (default "all")

Default('all')
normalize Boolean

normalize coefficients (default false)

Default('false')
transform Int | Literal['di', 'dii', 'tdi', 'tdii', 'latt', 'svf', 'zdf'] | Default

set transform type (from 0 to 6) (default di)

Default('di')
precision Int | Literal['auto', 's16', 's32', 'f32', 'f64'] | Default

set filtering precision (from -1 to 3) (default auto)

Default('auto')
blocksize Int

set the block size (from 0 to 32768) (default 0)

Default('0')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

bs2b

bs2b(
    *,
    profile: (
        Int | Literal["default", "cmoy", "jmeier"] | Default
    ) = Default("default"),
    fcut: Int = Default("0"),
    feed: Int = Default("0"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Bauer stereo-to-binaural filter.

Parameters:

Name Type Description Default
profile Int | Literal['default', 'cmoy', 'jmeier'] | Default

Apply a pre-defined crossfeed level (from 0 to INT_MAX) (default default)

Default('default')
fcut Int

Set cut frequency (in Hz) (from 0 to 2000) (default 0)

Default('0')
feed Int

Set feed level (in Hz) (from 0 to 150) (default 0)

Default('0')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

channelmap

channelmap(
    *,
    map: String = Default(None),
    channel_layout: String = Default(None),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Remap audio channels.

Parameters:

Name Type Description Default
map String

A comma-separated list of input channel numbers in output order.

Default(None)
channel_layout String

Output channel layout.

Default(None)
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

channelsplit

channelsplit(
    *,
    channel_layout: String = Default("stereo"),
    channels: String = Default("all"),
    extra_options: dict[str, Any] | None = None
) -> FilterNode

Split audio into per-channel streams.

Parameters:

Name Type Description Default
channel_layout String

Input channel layout. (default "stereo")

Default('stereo')
channels String

Channels to extract. (default "all")

Default('all')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
filter_node FilterNode

the filter node

References

FFmpeg Documentation

chorus

chorus(
    *,
    in_gain: Float = Default("0.4"),
    out_gain: Float = Default("0.4"),
    delays: String = Default(None),
    decays: String = Default(None),
    speeds: String = Default(None),
    depths: String = Default(None),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Add a chorus effect to the audio.

Parameters:

Name Type Description Default
in_gain Float

set input gain (from 0 to 1) (default 0.4)

Default('0.4')
out_gain Float

set output gain (from 0 to 1) (default 0.4)

Default('0.4')
delays String

set delays

Default(None)
decays String

set decays

Default(None)
speeds String

set speeds

Default(None)
depths String

set depths

Default(None)
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

compand

compand(
    *,
    attacks: String = Default("0"),
    decays: String = Default("0.8"),
    points: String = Default("-70/-70|-60/-20|1/0"),
    soft_knee: Double = Default("0.01"),
    gain: Double = Default("0"),
    volume: Double = Default("0"),
    delay: Double = Default("0"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Compress or expand audio dynamic range.

Parameters:

Name Type Description Default
attacks String

set time over which increase of volume is determined (default "0")

Default('0')
decays String

set time over which decrease of volume is determined (default "0.8")

Default('0.8')
points String

set points of transfer function (default "-70/-70|-60/-20|1/0")

Default('-70/-70|-60/-20|1/0')
soft_knee Double

set soft-knee (from 0.01 to 900) (default 0.01)

Default('0.01')
gain Double

set output gain (from -900 to 900) (default 0)

Default('0')
volume Double

set initial volume (from -900 to 0) (default 0)

Default('0')
delay Double

set delay for samples before sending them to volume adjuster (from 0 to 20) (default 0)

Default('0')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

compensationdelay

compensationdelay(
    *,
    mm: Int = Default("0"),
    cm: Int = Default("0"),
    m: Int = Default("0"),
    dry: Double = Default("0"),
    wet: Double = Default("1"),
    temp: Int = Default("20"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Audio Compensation Delay Line.

Parameters:

Name Type Description Default
mm Int

set mm distance (from 0 to 10) (default 0)

Default('0')
cm Int

set cm distance (from 0 to 100) (default 0)

Default('0')
m Int

set meter distance (from 0 to 100) (default 0)

Default('0')
dry Double

set dry amount (from 0 to 1) (default 0)

Default('0')
wet Double

set wet amount (from 0 to 1) (default 1)

Default('1')
temp Int

set temperature °C (from -50 to 50) (default 20)

Default('20')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

crossfeed

crossfeed(
    *,
    strength: Double = Default("0.2"),
    range: Double = Default("0.5"),
    slope: Double = Default("0.5"),
    level_in: Double = Default("0.9"),
    level_out: Double = Default("1"),
    block_size: Int = Default("0"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply headphone crossfeed filter.

Parameters:

Name Type Description Default
strength Double

set crossfeed strength (from 0 to 1) (default 0.2)

Default('0.2')
range Double

set soundstage wideness (from 0 to 1) (default 0.5)

Default('0.5')
slope Double

set curve slope (from 0.01 to 1) (default 0.5)

Default('0.5')
level_in Double

set level in (from 0 to 1) (default 0.9)

Default('0.9')
level_out Double

set level out (from 0 to 1) (default 1)

Default('1')
block_size Int

set the block size (from 0 to 32768) (default 0)

Default('0')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

crystalizer

crystalizer(
    *,
    i: Float = Default("2"),
    c: Boolean = Default("true"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Simple audio noise sharpening filter.

Parameters:

Name Type Description Default
i Float

set intensity (from -10 to 10) (default 2)

Default('2')
c Boolean

enable clipping (default true)

Default('true')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

dcshift

dcshift(
    *,
    shift: Double = Default("0"),
    limitergain: Double = Default("0"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply a DC shift to the audio.

Parameters:

Name Type Description Default
shift Double

set DC shift (from -1 to 1) (default 0)

Default('0')
limitergain Double

set limiter gain (from 0 to 1) (default 0)

Default('0')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

deesser

deesser(
    *,
    i: Double = Default("0"),
    m: Double = Default("0.5"),
    f: Double = Default("0.5"),
    s: Int | Literal["i", "o", "e"] | Default = Default(
        "o"
    ),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply de-essing to the audio.

Parameters:

Name Type Description Default
i Double

set intensity (from 0 to 1) (default 0)

Default('0')
m Double

set max deessing (from 0 to 1) (default 0.5)

Default('0.5')
f Double

set frequency (from 0 to 1) (default 0.5)

Default('0.5')
s Int | Literal['i', 'o', 'e'] | Default

set output mode (from 0 to 2) (default o)

Default('o')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

dialoguenhance

dialoguenhance(
    *,
    original: Double = Default("1"),
    enhance: Double = Default("1"),
    voice: Double = Default("2"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Audio Dialogue Enhancement.

Parameters:

Name Type Description Default
original Double

set original center factor (from 0 to 1) (default 1)

Default('1')
enhance Double

set dialogue enhance factor (from 0 to 3) (default 1)

Default('1')
voice Double

set voice detection factor (from 2 to 32) (default 2)

Default('2')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

drmeter

drmeter(
    *,
    length: Double = Default("3"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Measure audio dynamic range.

Parameters:

Name Type Description Default
length Double

set the window length (from 0.01 to 10) (default 3)

Default('3')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

dynaudnorm

dynaudnorm(
    *,
    framelen: Int = Default("500"),
    gausssize: Int = Default("31"),
    peak: Double = Default("0.95"),
    maxgain: Double = Default("10"),
    targetrms: Double = Default("0"),
    coupling: Boolean = Default("true"),
    correctdc: Boolean = Default("false"),
    altboundary: Boolean = Default("false"),
    compress: Double = Default("0"),
    threshold: Double = Default("0"),
    channels: String = Default("all"),
    overlap: Double = Default("0"),
    curve: String = Default(None),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Dynamic Audio Normalizer.

Parameters:

Name Type Description Default
framelen Int

set the frame length in msec (from 10 to 8000) (default 500)

Default('500')
gausssize Int

set the filter size (from 3 to 301) (default 31)

Default('31')
peak Double

set the peak value (from 0 to 1) (default 0.95)

Default('0.95')
maxgain Double

set the max amplification (from 1 to 100) (default 10)

Default('10')
targetrms Double

set the target RMS (from 0 to 1) (default 0)

Default('0')
coupling Boolean

set channel coupling (default true)

Default('true')
correctdc Boolean

set DC correction (default false)

Default('false')
altboundary Boolean

set alternative boundary mode (default false)

Default('false')
compress Double

set the compress factor (from 0 to 30) (default 0)

Default('0')
threshold Double

set the threshold value (from 0 to 1) (default 0)

Default('0')
channels String

set channels to filter (default "all")

Default('all')
overlap Double

set the frame overlap (from 0 to 1) (default 0)

Default('0')
curve String

set the custom peak mapping curve

Default(None)
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

earwax

earwax(
    extra_options: dict[str, Any] | None = None,
) -> AudioStream

Widen the stereo image.

Parameters:

Name Type Description Default
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

ebur128

ebur128(
    *,
    video: Boolean = Default("false"),
    size: Image_size = Default("640x480"),
    meter: Int = Default("9"),
    framelog: (
        Int | Literal["quiet", "info", "verbose"] | Default
    ) = Default("-1"),
    metadata: Boolean = Default("false"),
    peak: (
        Flags | Literal["none", "sample", "true"] | Default
    ) = Default("0"),
    dualmono: Boolean = Default("false"),
    panlaw: Double = Default("-3.0103"),
    target: Int = Default("-23"),
    gauge: (
        Int
        | Literal["momentary", "m", "shortterm", "s"]
        | Default
    ) = Default("momentary"),
    scale: (
        Int
        | Literal["absolute", "LUFS", "relative", "LU"]
        | Default
    ) = Default("absolute"),
    integrated: Double = Default("0"),
    range: Double = Default("0"),
    lra_low: Double = Default("0"),
    lra_high: Double = Default("0"),
    sample_peak: Double = Default("0"),
    true_peak: Double = Default("0"),
    extra_options: dict[str, Any] | None = None
) -> FilterNode

EBU R128 scanner.

Parameters:

Name Type Description Default
video Boolean

set video output (default false)

Default('false')
size Image_size

set video size (default "640x480")

Default('640x480')
meter Int

set scale meter (+9 to +18) (from 9 to 18) (default 9)

Default('9')
framelog Int | Literal['quiet', 'info', 'verbose'] | Default

force frame logging level (from INT_MIN to INT_MAX) (default -1)

Default('-1')
metadata Boolean

inject metadata in the filtergraph (default false)

Default('false')
peak Flags | Literal['none', 'sample', 'true'] | Default

set peak mode (default 0)

Default('0')
dualmono Boolean

treat mono input files as dual-mono (default false)

Default('false')
panlaw Double

set a specific pan law for dual-mono files (from -10 to 0) (default -3.0103)

Default('-3.0103')
target Int

set a specific target level in LUFS (-23 to 0) (from -23 to 0) (default -23)

Default('-23')
gauge Int | Literal['momentary', 'm', 'shortterm', 's'] | Default

set gauge display type (from 0 to 1) (default momentary)

Default('momentary')
scale Int | Literal['absolute', 'LUFS', 'relative', 'LU'] | Default

sets display method for the stats (from 0 to 1) (default absolute)

Default('absolute')
integrated Double

integrated loudness (LUFS) (from -DBL_MAX to DBL_MAX) (default 0)

Default('0')
range Double

loudness range (LU) (from -DBL_MAX to DBL_MAX) (default 0)

Default('0')
lra_low Double

LRA low (LUFS) (from -DBL_MAX to DBL_MAX) (default 0)

Default('0')
lra_high Double

LRA high (LUFS) (from -DBL_MAX to DBL_MAX) (default 0)

Default('0')
sample_peak Double

sample peak (dBFS) (from -DBL_MAX to DBL_MAX) (default 0)

Default('0')
true_peak Double

true peak (dBFS) (from -DBL_MAX to DBL_MAX) (default 0)

Default('0')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
filter_node FilterNode

the filter node

References

FFmpeg Documentation

equalizer

equalizer(
    *,
    frequency: Double = Default("0"),
    width_type: (
        Int | Literal["h", "q", "o", "s", "k"] | Default
    ) = Default("q"),
    width: Double = Default("1"),
    gain: Double = Default("0"),
    mix: Double = Default("1"),
    channels: String = Default("all"),
    normalize: Boolean = Default("false"),
    transform: (
        Int
        | Literal[
            "di", "dii", "tdi", "tdii", "latt", "svf", "zdf"
        ]
        | Default
    ) = Default("di"),
    precision: (
        Int
        | Literal["auto", "s16", "s32", "f32", "f64"]
        | Default
    ) = Default("auto"),
    blocksize: Int = Default("0"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply two-pole peaking equalization (EQ) filter.

Parameters:

Name Type Description Default
frequency Double

set central frequency (from 0 to 999999) (default 0)

Default('0')
width_type Int | Literal['h', 'q', 'o', 's', 'k'] | Default

set filter-width type (from 1 to 5) (default q)

Default('q')
width Double

set width (from 0 to 99999) (default 1)

Default('1')
gain Double

set gain (from -900 to 900) (default 0)

Default('0')
mix Double

set mix (from 0 to 1) (default 1)

Default('1')
channels String

set channels to filter (default "all")

Default('all')
normalize Boolean

normalize coefficients (default false)

Default('false')
transform Int | Literal['di', 'dii', 'tdi', 'tdii', 'latt', 'svf', 'zdf'] | Default

set transform type (from 0 to 6) (default di)

Default('di')
precision Int | Literal['auto', 's16', 's32', 'f32', 'f64'] | Default

set filtering precision (from -1 to 3) (default auto)

Default('auto')
blocksize Int

set the block size (from 0 to 32768) (default 0)

Default('0')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

extrastereo

extrastereo(
    *,
    m: Float = Default("2.5"),
    c: Boolean = Default("true"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Increase difference between stereo audio channels.

Parameters:

Name Type Description Default
m Float

set the difference coefficient (from -10 to 10) (default 2.5)

Default('2.5')
c Boolean

enable clipping (default true)

Default('true')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

filter_multi_output

filter_multi_output(
    *streams: FilterableStream,
    name: str,
    input_typings: tuple[StreamType, ...] = (),
    output_typings: tuple[StreamType, ...] = (),
    **kwargs: Any
) -> FilterNode

Apply a custom filter with multiple outputs to this stream.

This method creates a FilterNode that applies a custom FFmpeg filter to this stream (and optionally additional streams). Unlike vfilter and afilter which return a single stream, this method returns the FilterNode itself, allowing access to multiple output streams.

Parameters:

Name Type Description Default
*streams FilterableStream

Additional input streams for the filter

()
name str

The name of the FFmpeg filter to apply

required
input_typings tuple[StreamType, ...]

The expected types of the input streams

()
output_typings tuple[StreamType, ...]

The types of output streams this filter produces

()
**kwargs Any

Filter-specific parameters as keyword arguments

{}

Returns:

Type Description
FilterNode

A FilterNode that can be used to access the filter's outputs

Example
# Split a video into two identical streams
split_node = stream.filter_multi_output(
    name="split", output_typings=(StreamType.video, StreamType.video)
)
stream1 = split_node.video(0)
stream2 = split_node.video(1)

firequalizer

firequalizer(
    *,
    gain: String = Default("gain_interpolate(f)"),
    gain_entry: String = Default(None),
    delay: Double = Default("0.01"),
    accuracy: Double = Default("5"),
    wfunc: (
        Int
        | Literal[
            "rectangular",
            "hann",
            "hamming",
            "blackman",
            "nuttall3",
            "mnuttall3",
            "nuttall",
            "bnuttall",
            "bharris",
            "tukey",
        ]
        | Default
    ) = Default("hann"),
    fixed: Boolean = Default("false"),
    multi: Boolean = Default("false"),
    zero_phase: Boolean = Default("false"),
    scale: (
        Int
        | Literal["linlin", "linlog", "loglin", "loglog"]
        | Default
    ) = Default("linlog"),
    dumpfile: String = Default(None),
    dumpscale: (
        Int
        | Literal["linlin", "linlog", "loglin", "loglog"]
        | Default
    ) = Default("linlog"),
    fft2: Boolean = Default("false"),
    min_phase: Boolean = Default("false"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Finite Impulse Response Equalizer.

Parameters:

Name Type Description Default
gain String

set gain curve (default "gain_interpolate(f)")

Default('gain_interpolate(f)')
gain_entry String

set gain entry

Default(None)
delay Double

set delay (from 0 to 1e+10) (default 0.01)

Default('0.01')
accuracy Double

set accuracy (from 0 to 1e+10) (default 5)

Default('5')
wfunc Int | Literal['rectangular', 'hann', 'hamming', 'blackman', 'nuttall3', 'mnuttall3', 'nuttall', 'bnuttall', 'bharris', 'tukey'] | Default

set window function (from 0 to 9) (default hann)

Default('hann')
fixed Boolean

set fixed frame samples (default false)

Default('false')
multi Boolean

set multi channels mode (default false)

Default('false')
zero_phase Boolean

set zero phase mode (default false)

Default('false')
scale Int | Literal['linlin', 'linlog', 'loglin', 'loglog'] | Default

set gain scale (from 0 to 3) (default linlog)

Default('linlog')
dumpfile String

set dump file

Default(None)
dumpscale Int | Literal['linlin', 'linlog', 'loglin', 'loglog'] | Default

set dump scale (from 0 to 3) (default linlog)

Default('linlog')
fft2 Boolean

set 2-channels fft (default false)

Default('false')
min_phase Boolean

set minimum phase mode (default false)

Default('false')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

flanger

flanger(
    *,
    delay: Double = Default("0"),
    depth: Double = Default("2"),
    regen: Double = Default("0"),
    width: Double = Default("71"),
    speed: Double = Default("0.5"),
    shape: (
        Int
        | Literal["triangular", "t", "sinusoidal", "s"]
        | Default
    ) = Default("sinusoidal"),
    phase: Double = Default("25"),
    interp: (
        Int | Literal["linear", "quadratic"] | Default
    ) = Default("linear"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply a flanging effect to the audio.

Parameters:

Name Type Description Default
delay Double

base delay in milliseconds (from 0 to 30) (default 0)

Default('0')
depth Double

added swept delay in milliseconds (from 0 to 10) (default 2)

Default('2')
regen Double

percentage regeneration (delayed signal feedback) (from -95 to 95) (default 0)

Default('0')
width Double

percentage of delayed signal mixed with original (from 0 to 100) (default 71)

Default('71')
speed Double

sweeps per second (Hz) (from 0.1 to 10) (default 0.5)

Default('0.5')
shape Int | Literal['triangular', 't', 'sinusoidal', 's'] | Default

swept wave shape (from 0 to 1) (default sinusoidal)

Default('sinusoidal')
phase Double

swept wave percentage phase-shift for multi-channel (from 0 to 100) (default 25)

Default('25')
interp Int | Literal['linear', 'quadratic'] | Default

delay-line interpolation (from 0 to 1) (default linear)

Default('linear')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

haas

haas(
    *,
    level_in: Double = Default("1"),
    level_out: Double = Default("1"),
    side_gain: Double = Default("1"),
    middle_source: (
        Int
        | Literal["left", "right", "mid", "side"]
        | Default
    ) = Default("mid"),
    middle_phase: Boolean = Default("false"),
    left_delay: Double = Default("2.05"),
    left_balance: Double = Default("-1"),
    left_gain: Double = Default("1"),
    left_phase: Boolean = Default("false"),
    right_delay: Double = Default("2.12"),
    right_balance: Double = Default("1"),
    right_gain: Double = Default("1"),
    right_phase: Boolean = Default("true"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply Haas Stereo Enhancer.

Parameters:

Name Type Description Default
level_in Double

set level in (from 0.015625 to 64) (default 1)

Default('1')
level_out Double

set level out (from 0.015625 to 64) (default 1)

Default('1')
side_gain Double

set side gain (from 0.015625 to 64) (default 1)

Default('1')
middle_source Int | Literal['left', 'right', 'mid', 'side'] | Default

set middle source (from 0 to 3) (default mid)

Default('mid')
middle_phase Boolean

set middle phase (default false)

Default('false')
left_delay Double

set left delay (from 0 to 40) (default 2.05)

Default('2.05')
left_balance Double

set left balance (from -1 to 1) (default -1)

Default('-1')
left_gain Double

set left gain (from 0.015625 to 64) (default 1)

Default('1')
left_phase Boolean

set left phase (default false)

Default('false')
right_delay Double

set right delay (from 0 to 40) (default 2.12)

Default('2.12')
right_balance Double

set right balance (from -1 to 1) (default 1)

Default('1')
right_gain Double

set right gain (from 0.015625 to 64) (default 1)

Default('1')
right_phase Boolean

set right phase (default true)

Default('true')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

hdcd

hdcd(
    *,
    disable_autoconvert: Boolean = Default("true"),
    process_stereo: Boolean = Default("true"),
    cdt_ms: Int = Default("2000"),
    force_pe: Boolean = Default("false"),
    analyze_mode: (
        Int
        | Literal["off", "lle", "pe", "cdt", "tgm"]
        | Default
    ) = Default("off"),
    bits_per_sample: (
        Int | Literal["16", "20", "24"] | Default
    ) = Default("16"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply High Definition Compatible Digital (HDCD) decoding.

Parameters:

Name Type Description Default
disable_autoconvert Boolean

Disable any format conversion or resampling in the filter graph. (default true)

Default('true')
process_stereo Boolean

Process stereo channels together. Only apply target_gain when both channels match. (default true)

Default('true')
cdt_ms Int

Code detect timer period in ms. (from 100 to 60000) (default 2000)

Default('2000')
force_pe Boolean

Always extend peaks above -3dBFS even when PE is not signaled. (default false)

Default('false')
analyze_mode Int | Literal['off', 'lle', 'pe', 'cdt', 'tgm'] | Default

Replace audio with solid tone and signal some processing aspect in the amplitude. (from 0 to 4) (default off)

Default('off')
bits_per_sample Int | Literal['16', '20', '24'] | Default

Valid bits per sample (location of the true LSB). (from 16 to 24) (default 16)

Default('16')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

highpass

highpass(
    *,
    frequency: Double = Default("3000"),
    width_type: (
        Int | Literal["h", "q", "o", "s", "k"] | Default
    ) = Default("q"),
    width: Double = Default("0.707"),
    poles: Int = Default("2"),
    mix: Double = Default("1"),
    channels: String = Default("all"),
    normalize: Boolean = Default("false"),
    transform: (
        Int
        | Literal[
            "di", "dii", "tdi", "tdii", "latt", "svf", "zdf"
        ]
        | Default
    ) = Default("di"),
    precision: (
        Int
        | Literal["auto", "s16", "s32", "f32", "f64"]
        | Default
    ) = Default("auto"),
    blocksize: Int = Default("0"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply a high-pass filter with 3dB point frequency.

Parameters:

Name Type Description Default
frequency Double

set frequency (from 0 to 999999) (default 3000)

Default('3000')
width_type Int | Literal['h', 'q', 'o', 's', 'k'] | Default

set filter-width type (from 1 to 5) (default q)

Default('q')
width Double

set width (from 0 to 99999) (default 0.707)

Default('0.707')
poles Int

set number of poles (from 1 to 2) (default 2)

Default('2')
mix Double

set mix (from 0 to 1) (default 1)

Default('1')
channels String

set channels to filter (default "all")

Default('all')
normalize Boolean

normalize coefficients (default false)

Default('false')
transform Int | Literal['di', 'dii', 'tdi', 'tdii', 'latt', 'svf', 'zdf'] | Default

set transform type (from 0 to 6) (default di)

Default('di')
precision Int | Literal['auto', 's16', 's32', 'f32', 'f64'] | Default

set filtering precision (from -1 to 3) (default auto)

Default('auto')
blocksize Int

set the block size (from 0 to 32768) (default 0)

Default('0')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

highshelf

highshelf(
    *,
    frequency: Double = Default("3000"),
    width_type: (
        Int | Literal["h", "q", "o", "s", "k"] | Default
    ) = Default("q"),
    width: Double = Default("0.5"),
    gain: Double = Default("0"),
    poles: Int = Default("2"),
    mix: Double = Default("1"),
    channels: String = Default("all"),
    normalize: Boolean = Default("false"),
    transform: (
        Int
        | Literal[
            "di", "dii", "tdi", "tdii", "latt", "svf", "zdf"
        ]
        | Default
    ) = Default("di"),
    precision: (
        Int
        | Literal["auto", "s16", "s32", "f32", "f64"]
        | Default
    ) = Default("auto"),
    blocksize: Int = Default("0"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply a high shelf filter.

Parameters:

Name Type Description Default
frequency Double

set central frequency (from 0 to 999999) (default 3000)

Default('3000')
width_type Int | Literal['h', 'q', 'o', 's', 'k'] | Default

set filter-width type (from 1 to 5) (default q)

Default('q')
width Double

set width (from 0 to 99999) (default 0.5)

Default('0.5')
gain Double

set gain (from -900 to 900) (default 0)

Default('0')
poles Int

set number of poles (from 1 to 2) (default 2)

Default('2')
mix Double

set mix (from 0 to 1) (default 1)

Default('1')
channels String

set channels to filter (default "all")

Default('all')
normalize Boolean

normalize coefficients (default false)

Default('false')
transform Int | Literal['di', 'dii', 'tdi', 'tdii', 'latt', 'svf', 'zdf'] | Default

set transform type (from 0 to 6) (default di)

Default('di')
precision Int | Literal['auto', 's16', 's32', 'f32', 'f64'] | Default

set filtering precision (from -1 to 3) (default auto)

Default('auto')
blocksize Int

set the block size (from 0 to 32768) (default 0)

Default('0')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

loudnorm

loudnorm(
    *,
    I: Double = Default("-24"),
    LRA: Double = Default("7"),
    TP: Double = Default("-2"),
    measured_I: Double = Default("0"),
    measured_LRA: Double = Default("0"),
    measured_TP: Double = Default("99"),
    measured_thresh: Double = Default("-70"),
    offset: Double = Default("0"),
    linear: Boolean = Default("true"),
    dual_mono: Boolean = Default("false"),
    print_format: (
        Int | Literal["none", "json", "summary"] | Default
    ) = Default("none"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

EBU R128 loudness normalization.

Parameters:

Name Type Description Default
I Double

set integrated loudness target (from -70 to -5) (default -24)

Default('-24')
LRA Double

set loudness range target (from 1 to 50) (default 7)

Default('7')
TP Double

set maximum true peak (from -9 to 0) (default -2)

Default('-2')
measured_I Double

measured IL of input file (from -99 to 0) (default 0)

Default('0')
measured_LRA Double

measured LRA of input file (from 0 to 99) (default 0)

Default('0')
measured_TP Double

measured true peak of input file (from -99 to 99) (default 99)

Default('99')
measured_thresh Double

measured threshold of input file (from -99 to 0) (default -70)

Default('-70')
offset Double

set offset gain (from -99 to 99) (default 0)

Default('0')
linear Boolean

normalize linearly if possible (default true)

Default('true')
dual_mono Boolean

treat mono input as dual-mono (default false)

Default('false')
print_format Int | Literal['none', 'json', 'summary'] | Default

set print format for stats (from 0 to 2) (default none)

Default('none')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

lowpass

lowpass(
    *,
    frequency: Double = Default("500"),
    width_type: (
        Int | Literal["h", "q", "o", "s", "k"] | Default
    ) = Default("q"),
    width: Double = Default("0.707"),
    poles: Int = Default("2"),
    mix: Double = Default("1"),
    channels: String = Default("all"),
    normalize: Boolean = Default("false"),
    transform: (
        Int
        | Literal[
            "di", "dii", "tdi", "tdii", "latt", "svf", "zdf"
        ]
        | Default
    ) = Default("di"),
    precision: (
        Int
        | Literal["auto", "s16", "s32", "f32", "f64"]
        | Default
    ) = Default("auto"),
    blocksize: Int = Default("0"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply a low-pass filter with 3dB point frequency.

Parameters:

Name Type Description Default
frequency Double

set frequency (from 0 to 999999) (default 500)

Default('500')
width_type Int | Literal['h', 'q', 'o', 's', 'k'] | Default

set filter-width type (from 1 to 5) (default q)

Default('q')
width Double

set width (from 0 to 99999) (default 0.707)

Default('0.707')
poles Int

set number of poles (from 1 to 2) (default 2)

Default('2')
mix Double

set mix (from 0 to 1) (default 1)

Default('1')
channels String

set channels to filter (default "all")

Default('all')
normalize Boolean

normalize coefficients (default false)

Default('false')
transform Int | Literal['di', 'dii', 'tdi', 'tdii', 'latt', 'svf', 'zdf'] | Default

set transform type (from 0 to 6) (default di)

Default('di')
precision Int | Literal['auto', 's16', 's32', 'f32', 'f64'] | Default

set filtering precision (from -1 to 3) (default auto)

Default('auto')
blocksize Int

set the block size (from 0 to 32768) (default 0)

Default('0')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

lowshelf

lowshelf(
    *,
    frequency: Double = Default("100"),
    width_type: (
        Int | Literal["h", "q", "o", "s", "k"] | Default
    ) = Default("q"),
    width: Double = Default("0.5"),
    gain: Double = Default("0"),
    poles: Int = Default("2"),
    mix: Double = Default("1"),
    channels: String = Default("all"),
    normalize: Boolean = Default("false"),
    transform: (
        Int
        | Literal[
            "di", "dii", "tdi", "tdii", "latt", "svf", "zdf"
        ]
        | Default
    ) = Default("di"),
    precision: (
        Int
        | Literal["auto", "s16", "s32", "f32", "f64"]
        | Default
    ) = Default("auto"),
    blocksize: Int = Default("0"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply a low shelf filter.

Parameters:

Name Type Description Default
frequency Double

set central frequency (from 0 to 999999) (default 100)

Default('100')
width_type Int | Literal['h', 'q', 'o', 's', 'k'] | Default

set filter-width type (from 1 to 5) (default q)

Default('q')
width Double

set width (from 0 to 99999) (default 0.5)

Default('0.5')
gain Double

set gain (from -900 to 900) (default 0)

Default('0')
poles Int

set number of poles (from 1 to 2) (default 2)

Default('2')
mix Double

set mix (from 0 to 1) (default 1)

Default('1')
channels String

set channels to filter (default "all")

Default('all')
normalize Boolean

normalize coefficients (default false)

Default('false')
transform Int | Literal['di', 'dii', 'tdi', 'tdii', 'latt', 'svf', 'zdf'] | Default

set transform type (from 0 to 6) (default di)

Default('di')
precision Int | Literal['auto', 's16', 's32', 'f32', 'f64'] | Default

set filtering precision (from -1 to 3) (default auto)

Default('auto')
blocksize Int

set the block size (from 0 to 32768) (default 0)

Default('0')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

mcompand

mcompand(
    *,
    args: String = Default(
        "0.005,0.1 6 -47/-40,-34/-34,-17/-33 100 | 0.003,0.05 6 -47/-40,-34/-34,-17/-33 400 | 0.000625,0.0125 6 -47/-40,-34/-34,-15/-33 1600 | 0.0001,0.025 6 -47/-40,-34/-34,-31/-31,-0/-30 6400 | 0,0.025 6 -38/-31,-28/-28,-0/-25 22000"
    ),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Multiband Compress or expand audio dynamic range.

Parameters:

Name Type Description Default
args String

set parameters for each band (default "0.005,0.1 6 -47/-40,-34/-34,-17/-33 100 | 0.003,0.05 6 -47/-40,-34/-34,-17/-33 400 | 0.000625,0.0125 6 -47/-40,-34/-34,-15/-33 1600 | 0.0001,0.025 6 -47/-40,-34/-34,-31/-31,-0/-30 6400 | 0,0.025 6 -38/-31,-28/-28,-0/-25 22000")

Default('0.005,0.1 6 -47/-40,-34/-34,-17/-33 100 | 0.003,0.05 6 -47/-40,-34/-34,-17/-33 400 | 0.000625,0.0125 6 -47/-40,-34/-34,-15/-33 1600 | 0.0001,0.025 6 -47/-40,-34/-34,-31/-31,-0/-30 6400 | 0,0.025 6 -38/-31,-28/-28,-0/-25 22000')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

output

output(
    *streams: FilterableStream,
    filename: str | Path,
    f: String = None,
    c: String = None,
    codec: String = None,
    pre: String = None,
    map: Func = None,
    map_metadata: String = None,
    map_chapters: Int = None,
    t: Time = None,
    to: Time = None,
    fs: Int64 = None,
    ss: Time = None,
    timestamp: Func = None,
    metadata: String = None,
    program: String = None,
    stream_group: String = None,
    dframes: Int64 = None,
    target: Func = None,
    shortest: Boolean = None,
    shortest_buf_duration: Float = None,
    bitexact: Boolean = None,
    apad: String = None,
    copyinkf: Boolean = None,
    copypriorss: Int = None,
    frames: Int64 = None,
    tag: String = None,
    q: Func = None,
    qscale: Func = None,
    profile: Func = None,
    filter: String = None,
    filter_script: String = None,
    attach: Func = None,
    disposition: String = None,
    thread_queue_size: Int = None,
    bits_per_raw_sample: Int = None,
    stats_enc_pre: String = None,
    stats_enc_post: String = None,
    stats_mux_pre: String = None,
    stats_enc_pre_fmt: String = None,
    stats_enc_post_fmt: String = None,
    stats_mux_pre_fmt: String = None,
    vframes: Int64 = None,
    r: String = None,
    fpsmax: String = None,
    s: String = None,
    aspect: String = None,
    pix_fmt: String = None,
    vn: Boolean = None,
    rc_override: String = None,
    vcodec: String = None,
    timecode: Func = None,
    _pass: Int = None,
    passlogfile: String = None,
    vf: String = None,
    intra_matrix: String = None,
    inter_matrix: String = None,
    chroma_intra_matrix: String = None,
    vtag: String = None,
    fps_mode: String = None,
    force_fps: Boolean = None,
    streamid: Func = None,
    force_key_frames: String = None,
    b: Func = None,
    autoscale: Boolean = None,
    fix_sub_duration_heartbeat: Boolean = None,
    aframes: Int64 = None,
    aq: Func = None,
    ar: Int = None,
    ac: Int = None,
    an: Boolean = None,
    acodec: String = None,
    ab: Func = None,
    atag: String = None,
    sample_fmt: String = None,
    channel_layout: String = None,
    ch_layout: String = None,
    af: String = None,
    sn: Boolean = None,
    scodec: String = None,
    stag: String = None,
    muxdelay: Float = None,
    muxpreload: Float = None,
    sdp_file: Func = None,
    time_base: String = None,
    enc_time_base: String = None,
    bsf: String = None,
    apre: String = None,
    vpre: String = None,
    spre: String = None,
    fpre: String = None,
    max_muxing_queue_size: Int = None,
    muxing_queue_data_threshold: Int = None,
    dcodec: String = None,
    dn: Boolean = None,
    top: Int = None,
    encoder_options: FFMpegEncoderOption | None = None,
    muxer_options: FFMpegMuxerOption | None = None,
    format_options: (
        FFMpegAVFormatContextEncoderOption | None
    ) = None,
    codec_options: (
        FFMpegAVCodecContextEncoderOption | None
    ) = None,
    extra_options: dict[str, Any] | None = None
) -> OutputStream

Output file URL.

Parameters:

Name Type Description Default
*streams FilterableStream

the streams to output

()
filename str | Path

the filename to output to

required
f String

force container format (auto-detected otherwise)

None
c String

select encoder/decoder ('copy' to copy stream without reencoding)

None
codec String

alias for -c (select encoder/decoder)

None
pre String

preset name

None
map Func

set input stream mapping

None
map_metadata String

set metadata information of outfile from infile

None
map_chapters Int

set chapters mapping

None
t Time

stop transcoding after specified duration

None
to Time

stop transcoding after specified time is reached

None
fs Int64

set the limit file size in bytes

None
ss Time

start transcoding at specified time

None
timestamp Func

set the recording timestamp ('now' to set the current time)

None
metadata String

add metadata

None
program String

add program with specified streams

None
stream_group String

add stream group with specified streams and group type-specific arguments

None
dframes Int64

set the number of data frames to output

None
target Func

specify target file type (\"vcd\", \"svcd\", \"dvd\", \"dv\" or \"dv50\

None

"with optional prefixes \"pal-\", \"ntsc-\" or \"film-\") shortest: finish encoding within shortest input shortest_buf_duration: maximum buffering duration (in seconds) for the -shortest option bitexact: bitexact mode apad: audio pad copyinkf: copy initial non-keyframes copypriorss: copy or discard frames before start time frames: set the number of frames to output tag: force codec tag/fourcc q: use fixed quality scale (VBR) qscale: use fixed quality scale (VBR) profile: set profile filter: apply specified filters to audio/video filter_script: deprecated, use -/filter attach: add an attachment to the output file disposition: disposition thread_queue_size: set the maximum number of queued packets from the demuxer bits_per_raw_sample: set the number of bits per raw sample stats_enc_pre: write encoding stats before encoding stats_enc_post: write encoding stats after encoding stats_mux_pre: write packets stats before muxing stats_enc_pre_fmt: format of the stats written with -stats_enc_pre stats_enc_post_fmt: format of the stats written with -stats_enc_post stats_mux_pre_fmt: format of the stats written with -stats_mux_pre vframes: set the number of video frames to output r: override input framerate/convert to given output framerate (Hz value, fraction or abbreviation) fpsmax: set max frame rate (Hz value, fraction or abbreviation) s: set frame size (WxH or abbreviation) aspect: set aspect ratio (4:3, 16:9 or 1.3333, 1.7777) pix_fmt: set pixel format vn: disable video rc_override: rate control override for specific intervals vcodec: alias for -c:v (select encoder/decoder for video streams) timecode: set initial TimeCode value. _pass: select the pass number (1 to 3) passlogfile: select two pass log file name prefix vf: alias for -filter:v (apply filters to video streams) intra_matrix: specify intra matrix coeffs inter_matrix: specify inter matrix coeffs chroma_intra_matrix: specify intra matrix coeffs vtag: force video tag/fourcc fps_mode: set framerate mode for matching video streams; overrides vsync force_fps: force the selected framerate, disable the best supported framerate selection streamid: set the value of an outfile streamid force_key_frames: force key frames at specified timestamps b: video bitrate (please use -b:v) autoscale: automatically insert a scale filter at the end of the filter graph fix_sub_duration_heartbeat: set this video output stream to be a heartbeat stream for fix_sub_duration, according to which subtitles should be split at random access points aframes: set the number of audio frames to output aq: set audio quality (codec-specific) ar: set audio sampling rate (in Hz) ac: set number of audio channels an: disable audio acodec: alias for -c:a (select encoder/decoder for audio streams) ab: alias for -b:a (select bitrate for audio streams) atag: force audio tag/fourcc sample_fmt: set sample format channel_layout: set channel layout ch_layout: set channel layout af: alias for -filter:a (apply filters to audio streams) sn: disable subtitle scodec: alias for -c:s (select encoder/decoder for subtitle streams) stag: force subtitle tag/fourcc muxdelay: set the maximum demux-decode delay muxpreload: set the initial demux-decode delay sdp_file: specify a file in which to print sdp information time_base: set the desired time base hint for output stream (1:24, 1:48000 or 0.04166, 2.0833e-5) enc_time_base: set the desired time base for the encoder (1:24, 1:48000 or 0.04166, 2.0833e-5). two special values are defined - 0 = use frame rate (video) or sample rate (audio),-1 = match source time base bsf: A comma-separated list of bitstream filters apre: set the audio options to the indicated preset vpre: set the video options to the indicated preset spre: set the subtitle options to the indicated preset fpre: set options from indicated preset file max_muxing_queue_size: maximum number of packets that can be buffered while waiting for all streams to initialize muxing_queue_data_threshold: set the threshold after which max_muxing_queue_size is taken into account dcodec: alias for -c:d (select encoder/decoder for data streams) dn: disable data top: deprecated, use the setfield video filter encoder_options: ffmpeg's encoder options muxer_options: FFMpegMuxerOption format_options: FFMpegAVFormatContextEncoderOption codec_options: FFMpegAVCodecContextEncoderOption extra_options: the arguments for the output

Returns:

Type Description
OutputStream

the output stream

pan

pan(
    *,
    args: String = Default(None),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Remix channels with coefficients (panning).

Parameters:

Name Type Description Default
args String
Default(None)
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

replaygain

replaygain(
    *,
    track_gain: Float = Default("0"),
    track_peak: Float = Default("0"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

ReplayGain scanner.

Parameters:

Name Type Description Default
track_gain Float

track gain (dB) (from -FLT_MAX to FLT_MAX) (default 0)

Default('0')
track_peak Float

track peak (from -FLT_MAX to FLT_MAX) (default 0)

Default('0')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

rubberband

rubberband(
    *,
    tempo: Double = Default("1"),
    pitch: Double = Default("1"),
    transients: (
        Int | Literal["crisp", "mixed", "smooth"] | Default
    ) = Default("crisp"),
    detector: (
        Int
        | Literal["compound", "percussive", "soft"]
        | Default
    ) = Default("compound"),
    phase: (
        Int | Literal["laminar", "independent"] | Default
    ) = Default("laminar"),
    window: (
        Int | Literal["standard", "short", "long"] | Default
    ) = Default("standard"),
    smoothing: (
        Int | Literal["off", "on"] | Default
    ) = Default("off"),
    formant: (
        Int | Literal["shifted", "preserved"] | Default
    ) = Default("shifted"),
    pitchq: (
        Int
        | Literal["quality", "speed", "consistency"]
        | Default
    ) = Default("speed"),
    channels: (
        Int | Literal["apart", "together"] | Default
    ) = Default("apart"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply time-stretching and pitch-shifting.

Parameters:

Name Type Description Default
tempo Double

set tempo scale factor (from 0.01 to 100) (default 1)

Default('1')
pitch Double

set pitch scale factor (from 0.01 to 100) (default 1)

Default('1')
transients Int | Literal['crisp', 'mixed', 'smooth'] | Default

set transients (from 0 to INT_MAX) (default crisp)

Default('crisp')
detector Int | Literal['compound', 'percussive', 'soft'] | Default

set detector (from 0 to INT_MAX) (default compound)

Default('compound')
phase Int | Literal['laminar', 'independent'] | Default

set phase (from 0 to INT_MAX) (default laminar)

Default('laminar')
window Int | Literal['standard', 'short', 'long'] | Default

set window (from 0 to INT_MAX) (default standard)

Default('standard')
smoothing Int | Literal['off', 'on'] | Default

set smoothing (from 0 to INT_MAX) (default off)

Default('off')
formant Int | Literal['shifted', 'preserved'] | Default

set formant (from 0 to INT_MAX) (default shifted)

Default('shifted')
pitchq Int | Literal['quality', 'speed', 'consistency'] | Default

set pitch quality (from 0 to INT_MAX) (default speed)

Default('speed')
channels Int | Literal['apart', 'together'] | Default

set channels (from 0 to INT_MAX) (default apart)

Default('apart')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

showcqt

showcqt(
    *,
    size: Image_size = Default("1920x1080"),
    fps: Video_rate = Default("25"),
    bar_h: Int = Default("-1"),
    axis_h: Int = Default("-1"),
    sono_h: Int = Default("-1"),
    fullhd: Boolean = Default("true"),
    sono_v: String = Default("16"),
    bar_v: String = Default("sono_v"),
    sono_g: Float = Default("3"),
    bar_g: Float = Default("1"),
    bar_t: Float = Default("1"),
    timeclamp: Double = Default("0.17"),
    attack: Double = Default("0"),
    basefreq: Double = Default("20.0152"),
    endfreq: Double = Default("20495.6"),
    coeffclamp: Float = Default("1"),
    tlength: String = Default("384*tc/(384+tc*f)"),
    count: Int = Default("6"),
    fcount: Int = Default("0"),
    fontfile: String = Default(None),
    font: String = Default(None),
    fontcolor: String = Default(
        "st(0, (midi(f)-59.5)/12);st(1, if(between(ld(0),0,1), 0.5-0.5*cos(2*PI*ld(0)), 0));r(1-ld(1)) + b(ld(1))"
    ),
    axisfile: String = Default(None),
    axis: Boolean = Default("true"),
    csp: (
        Int
        | Literal[
            "unspecified",
            "bt709",
            "fcc",
            "bt470bg",
            "smpte170m",
            "smpte240m",
            "bt2020ncl",
        ]
        | Default
    ) = Default("unspecified"),
    cscheme: String = Default("1|0.5|0|0|0.5|1"),
    extra_options: dict[str, Any] | None = None
) -> VideoStream

Convert input audio to a CQT (Constant/Clamped Q Transform) spectrum video output.

Parameters:

Name Type Description Default
size Image_size

set video size (default "1920x1080")

Default('1920x1080')
fps Video_rate

set video rate (default "25")

Default('25')
bar_h Int

set bargraph height (from -1 to INT_MAX) (default -1)

Default('-1')
axis_h Int

set axis height (from -1 to INT_MAX) (default -1)

Default('-1')
sono_h Int

set sonogram height (from -1 to INT_MAX) (default -1)

Default('-1')
fullhd Boolean

set fullhd size (default true)

Default('true')
sono_v String

set sonogram volume (default "16")

Default('16')
bar_v String

set bargraph volume (default "sono_v")

Default('sono_v')
sono_g Float

set sonogram gamma (from 1 to 7) (default 3)

Default('3')
bar_g Float

set bargraph gamma (from 1 to 7) (default 1)

Default('1')
bar_t Float

set bar transparency (from 0 to 1) (default 1)

Default('1')
timeclamp Double

set timeclamp (from 0.002 to 1) (default 0.17)

Default('0.17')
attack Double

set attack time (from 0 to 1) (default 0)

Default('0')
basefreq Double

set base frequency (from 10 to 100000) (default 20.0152)

Default('20.0152')
endfreq Double

set end frequency (from 10 to 100000) (default 20495.6)

Default('20495.6')
coeffclamp Float

set coeffclamp (from 0.1 to 10) (default 1)

Default('1')
tlength String

set tlength (default "384tc/(384+tcf)")

Default('384*tc/(384+tc*f)')
count Int

set transform count (from 1 to 30) (default 6)

Default('6')
fcount Int

set frequency count (from 0 to 10) (default 0)

Default('0')
fontfile String

set axis font file

Default(None)
font String

set axis font

Default(None)
fontcolor String

set font color (default "st(0, (midi(f)-59.5)/12);st(1, if(between(ld(0),0,1), 0.5-0.5cos(2PI*ld(0)), 0));r(1-ld(1)) + b(ld(1))")

Default('st(0, (midi(f)-59.5)/12);st(1, if(between(ld(0),0,1), 0.5-0.5*cos(2*PI*ld(0)), 0));r(1-ld(1)) + b(ld(1))')
axisfile String

set axis image

Default(None)
axis Boolean

draw axis (default true)

Default('true')
csp Int | Literal['unspecified', 'bt709', 'fcc', 'bt470bg', 'smpte170m', 'smpte240m', 'bt2020ncl'] | Default

set color space (from 0 to INT_MAX) (default unspecified)

Default('unspecified')
cscheme String

set color scheme (default "1|0.5|0|0|0.5|1")

Default('1|0.5|0|0|0.5|1')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default VideoStream

the video stream

References

FFmpeg Documentation

showcwt

showcwt(
    *,
    size: Image_size = Default("640x512"),
    rate: String = Default("25"),
    scale: (
        Int
        | Literal[
            "linear",
            "log",
            "bark",
            "mel",
            "erbs",
            "sqrt",
            "cbrt",
            "qdrt",
        ]
        | Default
    ) = Default("linear"),
    iscale: (
        Int
        | Literal["linear", "log", "sqrt", "cbrt", "qdrt"]
        | Default
    ) = Default("log"),
    min: Float = Default("20"),
    max: Float = Default("20000"),
    imin: Float = Default("0"),
    imax: Float = Default("1"),
    logb: Float = Default("0.0001"),
    deviation: Float = Default("1"),
    pps: Int = Default("64"),
    mode: (
        Int
        | Literal[
            "magnitude",
            "phase",
            "magphase",
            "channel",
            "stereo",
        ]
        | Default
    ) = Default("magnitude"),
    slide: (
        Int
        | Literal["replace", "scroll", "frame"]
        | Default
    ) = Default("replace"),
    direction: (
        Int | Literal["lr", "rl", "ud", "du"] | Default
    ) = Default("lr"),
    bar: Float = Default("0"),
    rotation: Float = Default("0"),
    extra_options: dict[str, Any] | None = None
) -> VideoStream

Convert input audio to a CWT (Continuous Wavelet Transform) spectrum video output.

Parameters:

Name Type Description Default
size Image_size

set video size (default "640x512")

Default('640x512')
rate String

set video rate (default "25")

Default('25')
scale Int | Literal['linear', 'log', 'bark', 'mel', 'erbs', 'sqrt', 'cbrt', 'qdrt'] | Default

set frequency scale (from 0 to 7) (default linear)

Default('linear')
iscale Int | Literal['linear', 'log', 'sqrt', 'cbrt', 'qdrt'] | Default

set intensity scale (from 0 to 4) (default log)

Default('log')
min Float

set minimum frequency (from 1 to 192000) (default 20)

Default('20')
max Float

set maximum frequency (from 1 to 192000) (default 20000)

Default('20000')
imin Float

set minimum intensity (from 0 to 1) (default 0)

Default('0')
imax Float

set maximum intensity (from 0 to 1) (default 1)

Default('1')
logb Float

set logarithmic basis (from 0 to 1) (default 0.0001)

Default('0.0001')
deviation Float

set frequency deviation (from 0 to 100) (default 1)

Default('1')
pps Int

set pixels per second (from 1 to 1024) (default 64)

Default('64')
mode Int | Literal['magnitude', 'phase', 'magphase', 'channel', 'stereo'] | Default

set output mode (from 0 to 4) (default magnitude)

Default('magnitude')
slide Int | Literal['replace', 'scroll', 'frame'] | Default

set slide mode (from 0 to 2) (default replace)

Default('replace')
direction Int | Literal['lr', 'rl', 'ud', 'du'] | Default

set direction mode (from 0 to 3) (default lr)

Default('lr')
bar Float

set bar ratio (from 0 to 1) (default 0)

Default('0')
rotation Float

set color rotation (from -1 to 1) (default 0)

Default('0')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default VideoStream

the video stream

References

FFmpeg Documentation

showfreqs

showfreqs(
    *,
    size: Image_size = Default("1024x512"),
    rate: Video_rate = Default("25"),
    mode: (
        Int | Literal["line", "bar", "dot"] | Default
    ) = Default("bar"),
    ascale: (
        Int
        | Literal["lin", "sqrt", "cbrt", "log"]
        | Default
    ) = Default("log"),
    fscale: (
        Int | Literal["lin", "log", "rlog"] | Default
    ) = Default("lin"),
    win_size: Int = Default("2048"),
    win_func: (
        Int
        | Literal[
            "rect",
            "bartlett",
            "hann",
            "hanning",
            "hamming",
            "blackman",
            "welch",
            "flattop",
            "bharris",
            "bnuttall",
            "bhann",
            "sine",
            "nuttall",
            "lanczos",
            "gauss",
            "tukey",
            "dolph",
            "cauchy",
            "parzen",
            "poisson",
            "bohman",
            "kaiser",
        ]
        | Default
    ) = Default("hann"),
    overlap: Float = Default("1"),
    averaging: Int = Default("1"),
    colors: String = Default(
        "red|green|blue|yellow|orange|lime|pink|magenta|brown"
    ),
    cmode: (
        Int | Literal["combined", "separate"] | Default
    ) = Default("combined"),
    minamp: Float = Default("1e-06"),
    data: (
        Int
        | Literal["magnitude", "phase", "delay"]
        | Default
    ) = Default("magnitude"),
    channels: String = Default("all"),
    extra_options: dict[str, Any] | None = None
) -> VideoStream

Convert input audio to a frequencies video output.

Parameters:

Name Type Description Default
size Image_size

set video size (default "1024x512")

Default('1024x512')
rate Video_rate

set video rate (default "25")

Default('25')
mode Int | Literal['line', 'bar', 'dot'] | Default

set display mode (from 0 to 2) (default bar)

Default('bar')
ascale Int | Literal['lin', 'sqrt', 'cbrt', 'log'] | Default

set amplitude scale (from 0 to 3) (default log)

Default('log')
fscale Int | Literal['lin', 'log', 'rlog'] | Default

set frequency scale (from 0 to 2) (default lin)

Default('lin')
win_size Int

set window size (from 16 to 65536) (default 2048)

Default('2048')
win_func Int | Literal['rect', 'bartlett', 'hann', 'hanning', 'hamming', 'blackman', 'welch', 'flattop', 'bharris', 'bnuttall', 'bhann', 'sine', 'nuttall', 'lanczos', 'gauss', 'tukey', 'dolph', 'cauchy', 'parzen', 'poisson', 'bohman', 'kaiser'] | Default

set window function (from 0 to 20) (default hann)

Default('hann')
overlap Float

set window overlap (from 0 to 1) (default 1)

Default('1')
averaging Int

set time averaging (from 0 to INT_MAX) (default 1)

Default('1')
colors String

set channels colors (default "red|green|blue|yellow|orange|lime|pink|magenta|brown")

Default('red|green|blue|yellow|orange|lime|pink|magenta|brown')
cmode Int | Literal['combined', 'separate'] | Default

set channel mode (from 0 to 1) (default combined)

Default('combined')
minamp Float

set minimum amplitude (from FLT_MIN to 1e-06) (default 1e-06)

Default('1e-06')
data Int | Literal['magnitude', 'phase', 'delay'] | Default

set data mode (from 0 to 2) (default magnitude)

Default('magnitude')
channels String

set channels to draw (default "all")

Default('all')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default VideoStream

the video stream

References

FFmpeg Documentation

showspatial

showspatial(
    *,
    size: Image_size = Default("512x512"),
    win_size: Int = Default("4096"),
    win_func: (
        Int
        | Literal[
            "rect",
            "bartlett",
            "hann",
            "hanning",
            "hamming",
            "blackman",
            "welch",
            "flattop",
            "bharris",
            "bnuttall",
            "bhann",
            "sine",
            "nuttall",
            "lanczos",
            "gauss",
            "tukey",
            "dolph",
            "cauchy",
            "parzen",
            "poisson",
            "bohman",
            "kaiser",
        ]
        | Default
    ) = Default("hann"),
    rate: Video_rate = Default("25"),
    extra_options: dict[str, Any] | None = None
) -> VideoStream

Convert input audio to a spatial video output.

Parameters:

Name Type Description Default
size Image_size

set video size (default "512x512")

Default('512x512')
win_size Int

set window size (from 1024 to 65536) (default 4096)

Default('4096')
win_func Int | Literal['rect', 'bartlett', 'hann', 'hanning', 'hamming', 'blackman', 'welch', 'flattop', 'bharris', 'bnuttall', 'bhann', 'sine', 'nuttall', 'lanczos', 'gauss', 'tukey', 'dolph', 'cauchy', 'parzen', 'poisson', 'bohman', 'kaiser'] | Default

set window function (from 0 to 20) (default hann)

Default('hann')
rate Video_rate

set video rate (default "25")

Default('25')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default VideoStream

the video stream

References

FFmpeg Documentation

showspectrum

showspectrum(
    *,
    size: Image_size = Default("640x512"),
    slide: (
        Int
        | Literal[
            "replace",
            "scroll",
            "fullframe",
            "rscroll",
            "lreplace",
        ]
        | Default
    ) = Default("replace"),
    mode: (
        Int | Literal["combined", "separate"] | Default
    ) = Default("combined"),
    color: (
        Int
        | Literal[
            "channel",
            "intensity",
            "rainbow",
            "moreland",
            "nebulae",
            "fire",
            "fiery",
            "fruit",
            "cool",
            "magma",
            "green",
            "viridis",
            "plasma",
            "cividis",
            "terrain",
        ]
        | Default
    ) = Default("channel"),
    scale: (
        Int
        | Literal[
            "lin", "sqrt", "cbrt", "log", "4thrt", "5thrt"
        ]
        | Default
    ) = Default("sqrt"),
    fscale: Int | Literal["lin", "log"] | Default = Default(
        "lin"
    ),
    saturation: Float = Default("1"),
    win_func: (
        Int
        | Literal[
            "rect",
            "bartlett",
            "hann",
            "hanning",
            "hamming",
            "blackman",
            "welch",
            "flattop",
            "bharris",
            "bnuttall",
            "bhann",
            "sine",
            "nuttall",
            "lanczos",
            "gauss",
            "tukey",
            "dolph",
            "cauchy",
            "parzen",
            "poisson",
            "bohman",
            "kaiser",
        ]
        | Default
    ) = Default("hann"),
    orientation: (
        Int | Literal["vertical", "horizontal"] | Default
    ) = Default("vertical"),
    overlap: Float = Default("0"),
    gain: Float = Default("1"),
    data: (
        Int
        | Literal["magnitude", "phase", "uphase"]
        | Default
    ) = Default("magnitude"),
    rotation: Float = Default("0"),
    start: Int = Default("0"),
    stop: Int = Default("0"),
    fps: String = Default("auto"),
    legend: Boolean = Default("false"),
    drange: Float = Default("120"),
    limit: Float = Default("0"),
    opacity: Float = Default("1"),
    extra_options: dict[str, Any] | None = None
) -> VideoStream

Convert input audio to a spectrum video output.

Parameters:

Name Type Description Default
size Image_size

set video size (default "640x512")

Default('640x512')
slide Int | Literal['replace', 'scroll', 'fullframe', 'rscroll', 'lreplace'] | Default

set sliding mode (from 0 to 4) (default replace)

Default('replace')
mode Int | Literal['combined', 'separate'] | Default

set channel display mode (from 0 to 1) (default combined)

Default('combined')
color Int | Literal['channel', 'intensity', 'rainbow', 'moreland', 'nebulae', 'fire', 'fiery', 'fruit', 'cool', 'magma', 'green', 'viridis', 'plasma', 'cividis', 'terrain'] | Default

set channel coloring (from 0 to 14) (default channel)

Default('channel')
scale Int | Literal['lin', 'sqrt', 'cbrt', 'log', '4thrt', '5thrt'] | Default

set display scale (from 0 to 5) (default sqrt)

Default('sqrt')
fscale Int | Literal['lin', 'log'] | Default

set frequency scale (from 0 to 1) (default lin)

Default('lin')
saturation Float

color saturation multiplier (from -10 to 10) (default 1)

Default('1')
win_func Int | Literal['rect', 'bartlett', 'hann', 'hanning', 'hamming', 'blackman', 'welch', 'flattop', 'bharris', 'bnuttall', 'bhann', 'sine', 'nuttall', 'lanczos', 'gauss', 'tukey', 'dolph', 'cauchy', 'parzen', 'poisson', 'bohman', 'kaiser'] | Default

set window function (from 0 to 20) (default hann)

Default('hann')
orientation Int | Literal['vertical', 'horizontal'] | Default

set orientation (from 0 to 1) (default vertical)

Default('vertical')
overlap Float

set window overlap (from 0 to 1) (default 0)

Default('0')
gain Float

set scale gain (from 0 to 128) (default 1)

Default('1')
data Int | Literal['magnitude', 'phase', 'uphase'] | Default

set data mode (from 0 to 2) (default magnitude)

Default('magnitude')
rotation Float

color rotation (from -1 to 1) (default 0)

Default('0')
start Int

start frequency (from 0 to INT_MAX) (default 0)

Default('0')
stop Int

stop frequency (from 0 to INT_MAX) (default 0)

Default('0')
fps String

set video rate (default "auto")

Default('auto')
legend Boolean

draw legend (default false)

Default('false')
drange Float

set dynamic range in dBFS (from 10 to 200) (default 120)

Default('120')
limit Float

set upper limit in dBFS (from -100 to 100) (default 0)

Default('0')
opacity Float

set opacity strength (from 0 to 10) (default 1)

Default('1')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default VideoStream

the video stream

References

FFmpeg Documentation

showspectrumpic

showspectrumpic(
    *,
    size: Image_size = Default("4096x2048"),
    mode: (
        Int | Literal["combined", "separate"] | Default
    ) = Default("combined"),
    color: (
        Int
        | Literal[
            "channel",
            "intensity",
            "rainbow",
            "moreland",
            "nebulae",
            "fire",
            "fiery",
            "fruit",
            "cool",
            "magma",
            "green",
            "viridis",
            "plasma",
            "cividis",
            "terrain",
        ]
        | Default
    ) = Default("intensity"),
    scale: (
        Int
        | Literal[
            "lin", "sqrt", "cbrt", "log", "4thrt", "5thrt"
        ]
        | Default
    ) = Default("log"),
    fscale: Int | Literal["lin", "log"] | Default = Default(
        "lin"
    ),
    saturation: Float = Default("1"),
    win_func: (
        Int
        | Literal[
            "rect",
            "bartlett",
            "hann",
            "hanning",
            "hamming",
            "blackman",
            "welch",
            "flattop",
            "bharris",
            "bnuttall",
            "bhann",
            "sine",
            "nuttall",
            "lanczos",
            "gauss",
            "tukey",
            "dolph",
            "cauchy",
            "parzen",
            "poisson",
            "bohman",
            "kaiser",
        ]
        | Default
    ) = Default("hann"),
    orientation: (
        Int | Literal["vertical", "horizontal"] | Default
    ) = Default("vertical"),
    gain: Float = Default("1"),
    legend: Boolean = Default("true"),
    rotation: Float = Default("0"),
    start: Int = Default("0"),
    stop: Int = Default("0"),
    drange: Float = Default("120"),
    limit: Float = Default("0"),
    opacity: Float = Default("1"),
    extra_options: dict[str, Any] | None = None
) -> VideoStream

Convert input audio to a spectrum video output single picture.

Parameters:

Name Type Description Default
size Image_size

set video size (default "4096x2048")

Default('4096x2048')
mode Int | Literal['combined', 'separate'] | Default

set channel display mode (from 0 to 1) (default combined)

Default('combined')
color Int | Literal['channel', 'intensity', 'rainbow', 'moreland', 'nebulae', 'fire', 'fiery', 'fruit', 'cool', 'magma', 'green', 'viridis', 'plasma', 'cividis', 'terrain'] | Default

set channel coloring (from 0 to 14) (default intensity)

Default('intensity')
scale Int | Literal['lin', 'sqrt', 'cbrt', 'log', '4thrt', '5thrt'] | Default

set display scale (from 0 to 5) (default log)

Default('log')
fscale Int | Literal['lin', 'log'] | Default

set frequency scale (from 0 to 1) (default lin)

Default('lin')
saturation Float

color saturation multiplier (from -10 to 10) (default 1)

Default('1')
win_func Int | Literal['rect', 'bartlett', 'hann', 'hanning', 'hamming', 'blackman', 'welch', 'flattop', 'bharris', 'bnuttall', 'bhann', 'sine', 'nuttall', 'lanczos', 'gauss', 'tukey', 'dolph', 'cauchy', 'parzen', 'poisson', 'bohman', 'kaiser'] | Default

set window function (from 0 to 20) (default hann)

Default('hann')
orientation Int | Literal['vertical', 'horizontal'] | Default

set orientation (from 0 to 1) (default vertical)

Default('vertical')
gain Float

set scale gain (from 0 to 128) (default 1)

Default('1')
legend Boolean

draw legend (default true)

Default('true')
rotation Float

color rotation (from -1 to 1) (default 0)

Default('0')
start Int

start frequency (from 0 to INT_MAX) (default 0)

Default('0')
stop Int

stop frequency (from 0 to INT_MAX) (default 0)

Default('0')
drange Float

set dynamic range in dBFS (from 10 to 200) (default 120)

Default('120')
limit Float

set upper limit in dBFS (from -100 to 100) (default 0)

Default('0')
opacity Float

set opacity strength (from 0 to 10) (default 1)

Default('1')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default VideoStream

the video stream

References

FFmpeg Documentation

showvolume

showvolume(
    *,
    rate: Video_rate = Default("25"),
    b: Int = Default("1"),
    w: Int = Default("400"),
    h: Int = Default("20"),
    f: Double = Default("0.95"),
    c: String = Default(
        "PEAK*255+floor((1-PEAK)*255)*256+0xff000000"
    ),
    t: Boolean = Default("true"),
    v: Boolean = Default("true"),
    dm: Double = Default("0"),
    dmc: Color = Default("orange"),
    o: Int | Literal["h", "v"] | Default = Default("h"),
    s: Int = Default("0"),
    p: Float = Default("0"),
    m: Int | Literal["p", "r"] | Default = Default("p"),
    ds: Int | Literal["lin", "log"] | Default = Default(
        "lin"
    ),
    extra_options: dict[str, Any] | None = None
) -> VideoStream

Convert input audio volume to video output.

Parameters:

Name Type Description Default
rate Video_rate

set video rate (default "25")

Default('25')
b Int

set border width (from 0 to 5) (default 1)

Default('1')
w Int

set channel width (from 80 to 8192) (default 400)

Default('400')
h Int

set channel height (from 1 to 900) (default 20)

Default('20')
f Double

set fade (from 0 to 1) (default 0.95)

Default('0.95')
c String

set volume color expression (default "PEAK255+floor((1-PEAK)255)*256+0xff000000")

Default('PEAK*255+floor((1-PEAK)*255)*256+0xff000000')
t Boolean

display channel names (default true)

Default('true')
v Boolean

display volume value (default true)

Default('true')
dm Double

duration for max value display (from 0 to 9000) (default 0)

Default('0')
dmc Color

set color of the max value line (default "orange")

Default('orange')
o Int | Literal['h', 'v'] | Default

set orientation (from 0 to 1) (default h)

Default('h')
s Int

set step size (from 0 to 5) (default 0)

Default('0')
p Float

set background opacity (from 0 to 1) (default 0)

Default('0')
m Int | Literal['p', 'r'] | Default

set mode (from 0 to 1) (default p)

Default('p')
ds Int | Literal['lin', 'log'] | Default

set display scale (from 0 to 1) (default lin)

Default('lin')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default VideoStream

the video stream

References

FFmpeg Documentation

showwaves

showwaves(
    *,
    size: Image_size = Default("600x240"),
    mode: (
        Int
        | Literal["point", "line", "p2p", "cline"]
        | Default
    ) = Default("point"),
    n: Rational = Default("0/1"),
    rate: Video_rate = Default("25"),
    split_channels: Boolean = Default("false"),
    colors: String = Default(
        "red|green|blue|yellow|orange|lime|pink|magenta|brown"
    ),
    scale: (
        Int
        | Literal["lin", "log", "sqrt", "cbrt"]
        | Default
    ) = Default("lin"),
    draw: (
        Int | Literal["scale", "full"] | Default
    ) = Default("scale"),
    extra_options: dict[str, Any] | None = None
) -> VideoStream

Convert input audio to a video output.

Parameters:

Name Type Description Default
size Image_size

set video size (default "600x240")

Default('600x240')
mode Int | Literal['point', 'line', 'p2p', 'cline'] | Default

select display mode (from 0 to 3) (default point)

Default('point')
n Rational

set how many samples to show in the same point (from 0 to INT_MAX) (default 0/1)

Default('0/1')
rate Video_rate

set video rate (default "25")

Default('25')
split_channels Boolean

draw channels separately (default false)

Default('false')
colors String

set channels colors (default "red|green|blue|yellow|orange|lime|pink|magenta|brown")

Default('red|green|blue|yellow|orange|lime|pink|magenta|brown')
scale Int | Literal['lin', 'log', 'sqrt', 'cbrt'] | Default

set amplitude scale (from 0 to 3) (default lin)

Default('lin')
draw Int | Literal['scale', 'full'] | Default

set draw mode (from 0 to 1) (default scale)

Default('scale')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default VideoStream

the video stream

References

FFmpeg Documentation

showwavespic

showwavespic(
    *,
    size: Image_size = Default("600x240"),
    split_channels: Boolean = Default("false"),
    colors: String = Default(
        "red|green|blue|yellow|orange|lime|pink|magenta|brown"
    ),
    scale: (
        Int
        | Literal["lin", "log", "sqrt", "cbrt"]
        | Default
    ) = Default("lin"),
    draw: (
        Int | Literal["scale", "full"] | Default
    ) = Default("scale"),
    filter: (
        Int | Literal["average", "peak"] | Default
    ) = Default("average"),
    extra_options: dict[str, Any] | None = None
) -> VideoStream

Convert input audio to a video output single picture.

Parameters:

Name Type Description Default
size Image_size

set video size (default "600x240")

Default('600x240')
split_channels Boolean

draw channels separately (default false)

Default('false')
colors String

set channels colors (default "red|green|blue|yellow|orange|lime|pink|magenta|brown")

Default('red|green|blue|yellow|orange|lime|pink|magenta|brown')
scale Int | Literal['lin', 'log', 'sqrt', 'cbrt'] | Default

set amplitude scale (from 0 to 3) (default lin)

Default('lin')
draw Int | Literal['scale', 'full'] | Default

set draw mode (from 0 to 1) (default scale)

Default('scale')
filter Int | Literal['average', 'peak'] | Default

set filter mode (from 0 to 1) (default average)

Default('average')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default VideoStream

the video stream

References

FFmpeg Documentation

sidechaincompress

sidechaincompress(
    _sidechain: AudioStream,
    *,
    level_in: Double = Default("1"),
    mode: (
        Int | Literal["downward", "upward"] | Default
    ) = Default("downward"),
    threshold: Double = Default("0.125"),
    ratio: Double = Default("2"),
    attack: Double = Default("20"),
    release: Double = Default("250"),
    makeup: Double = Default("1"),
    knee: Double = Default("2.82843"),
    link: (
        Int | Literal["average", "maximum"] | Default
    ) = Default("average"),
    detection: (
        Int | Literal["peak", "rms"] | Default
    ) = Default("rms"),
    level_sc: Double = Default("1"),
    mix: Double = Default("1"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Sidechain compressor.

Parameters:

Name Type Description Default
level_in Double

set input gain (from 0.015625 to 64) (default 1)

Default('1')
mode Int | Literal['downward', 'upward'] | Default

set mode (from 0 to 1) (default downward)

Default('downward')
threshold Double

set threshold (from 0.000976563 to 1) (default 0.125)

Default('0.125')
ratio Double

set ratio (from 1 to 20) (default 2)

Default('2')
attack Double

set attack (from 0.01 to 2000) (default 20)

Default('20')
release Double

set release (from 0.01 to 9000) (default 250)

Default('250')
makeup Double

set make up gain (from 1 to 64) (default 1)

Default('1')
knee Double

set knee (from 1 to 8) (default 2.82843)

Default('2.82843')
link Int | Literal['average', 'maximum'] | Default

set link type (from 0 to 1) (default average)

Default('average')
detection Int | Literal['peak', 'rms'] | Default

set detection (from 0 to 1) (default rms)

Default('rms')
level_sc Double

set sidechain gain (from 0.015625 to 64) (default 1)

Default('1')
mix Double

set mix (from 0 to 1) (default 1)

Default('1')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

sidechaingate

sidechaingate(
    _sidechain: AudioStream,
    *,
    level_in: Double = Default("1"),
    mode: (
        Int | Literal["downward", "upward"] | Default
    ) = Default("downward"),
    range: Double = Default("0.06125"),
    threshold: Double = Default("0.125"),
    ratio: Double = Default("2"),
    attack: Double = Default("20"),
    release: Double = Default("250"),
    makeup: Double = Default("1"),
    knee: Double = Default("2.82843"),
    detection: (
        Int | Literal["peak", "rms"] | Default
    ) = Default("rms"),
    link: (
        Int | Literal["average", "maximum"] | Default
    ) = Default("average"),
    level_sc: Double = Default("1"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Audio sidechain gate.

Parameters:

Name Type Description Default
level_in Double

set input level (from 0.015625 to 64) (default 1)

Default('1')
mode Int | Literal['downward', 'upward'] | Default

set mode (from 0 to 1) (default downward)

Default('downward')
range Double

set max gain reduction (from 0 to 1) (default 0.06125)

Default('0.06125')
threshold Double

set threshold (from 0 to 1) (default 0.125)

Default('0.125')
ratio Double

set ratio (from 1 to 9000) (default 2)

Default('2')
attack Double

set attack (from 0.01 to 9000) (default 20)

Default('20')
release Double

set release (from 0.01 to 9000) (default 250)

Default('250')
makeup Double

set makeup gain (from 1 to 64) (default 1)

Default('1')
knee Double

set knee (from 1 to 8) (default 2.82843)

Default('2.82843')
detection Int | Literal['peak', 'rms'] | Default

set detection (from 0 to 1) (default rms)

Default('rms')
link Int | Literal['average', 'maximum'] | Default

set link (from 0 to 1) (default average)

Default('average')
level_sc Double

set sidechain gain (from 0.015625 to 64) (default 1)

Default('1')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

silencedetect

silencedetect(
    *,
    n: Double = Default("0.001"),
    d: Duration = Default("2"),
    mono: Boolean = Default("false"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Detect silence.

Parameters:

Name Type Description Default
n Double

set noise tolerance (from 0 to DBL_MAX) (default 0.001)

Default('0.001')
d Duration

set minimum duration in seconds (default 2)

Default('2')
mono Boolean

check each channel separately (default false)

Default('false')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

silenceremove

silenceremove(
    *,
    start_periods: Int = Default("0"),
    start_duration: Duration = Default("0"),
    start_threshold: Double = Default("0"),
    start_silence: Duration = Default("0"),
    start_mode: (
        Int | Literal["any", "all"] | Default
    ) = Default("any"),
    stop_periods: Int = Default("0"),
    stop_duration: Duration = Default("0"),
    stop_threshold: Double = Default("0"),
    stop_silence: Duration = Default("0"),
    stop_mode: (
        Int | Literal["any", "all"] | Default
    ) = Default("all"),
    detection: (
        Int
        | Literal[
            "avg", "rms", "peak", "median", "ptp", "dev"
        ]
        | Default
    ) = Default("rms"),
    window: Duration = Default("0.02"),
    timestamp: (
        Int | Literal["write", "copy"] | Default
    ) = Default("write"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Remove silence.

Parameters:

Name Type Description Default
start_periods Int

set periods of silence parts to skip from start (from 0 to 9000) (default 0)

Default('0')
start_duration Duration

set start duration of non-silence part (default 0)

Default('0')
start_threshold Double

set threshold for start silence detection (from 0 to DBL_MAX) (default 0)

Default('0')
start_silence Duration

set start duration of silence part to keep (default 0)

Default('0')
start_mode Int | Literal['any', 'all'] | Default

set which channel will trigger trimming from start (from 0 to 1) (default any)

Default('any')
stop_periods Int

set periods of silence parts to skip from end (from -9000 to 9000) (default 0)

Default('0')
stop_duration Duration

set stop duration of silence part (default 0)

Default('0')
stop_threshold Double

set threshold for stop silence detection (from 0 to DBL_MAX) (default 0)

Default('0')
stop_silence Duration

set stop duration of silence part to keep (default 0)

Default('0')
stop_mode Int | Literal['any', 'all'] | Default

set which channel will trigger trimming from end (from 0 to 1) (default all)

Default('all')
detection Int | Literal['avg', 'rms', 'peak', 'median', 'ptp', 'dev'] | Default

set how silence is detected (from 0 to 5) (default rms)

Default('rms')
window Duration

set duration of window for silence detection (default 0.02)

Default('0.02')
timestamp Int | Literal['write', 'copy'] | Default

set how every output frame timestamp is processed (from 0 to 1) (default write)

Default('write')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

sofalizer

sofalizer(
    *,
    sofa: String = Default(None),
    gain: Float = Default("0"),
    rotation: Float = Default("0"),
    elevation: Float = Default("0"),
    radius: Float = Default("1"),
    type: Int | Literal["time", "freq"] | Default = Default(
        "freq"
    ),
    speakers: String = Default(None),
    lfegain: Float = Default("0"),
    framesize: Int = Default("1024"),
    normalize: Boolean = Default("true"),
    interpolate: Boolean = Default("false"),
    minphase: Boolean = Default("false"),
    anglestep: Float = Default("0.5"),
    radstep: Float = Default("0.01"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

SOFAlizer (Spatially Oriented Format for Acoustics).

Parameters:

Name Type Description Default
sofa String

sofa filename

Default(None)
gain Float

set gain in dB (from -20 to 40) (default 0)

Default('0')
rotation Float

set rotation (from -360 to 360) (default 0)

Default('0')
elevation Float

set elevation (from -90 to 90) (default 0)

Default('0')
radius Float

set radius (from 0 to 5) (default 1)

Default('1')
type Int | Literal['time', 'freq'] | Default

set processing (from 0 to 1) (default freq)

Default('freq')
speakers String

set speaker custom positions

Default(None)
lfegain Float

set lfe gain (from -20 to 40) (default 0)

Default('0')
framesize Int

set frame size (from 1024 to 96000) (default 1024)

Default('1024')
normalize Boolean

normalize IRs (default true)

Default('true')
interpolate Boolean

interpolate IRs from neighbors (default false)

Default('false')
minphase Boolean

minphase IRs (default false)

Default('false')
anglestep Float

set neighbor search angle step (from 0.01 to 10) (default 0.5)

Default('0.5')
radstep Float

set neighbor search radius step (from 0.01 to 1) (default 0.01)

Default('0.01')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

speechnorm

speechnorm(
    *,
    peak: Double = Default("0.95"),
    expansion: Double = Default("2"),
    compression: Double = Default("2"),
    threshold: Double = Default("0"),
    _raise: Double = Default("0.001"),
    fall: Double = Default("0.001"),
    channels: String = Default("all"),
    invert: Boolean = Default("false"),
    link: Boolean = Default("false"),
    rms: Double = Default("0"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Speech Normalizer.

Parameters:

Name Type Description Default
peak Double

set the peak value (from 0 to 1) (default 0.95)

Default('0.95')
expansion Double

set the max expansion factor (from 1 to 50) (default 2)

Default('2')
compression Double

set the max compression factor (from 1 to 50) (default 2)

Default('2')
threshold Double

set the threshold value (from 0 to 1) (default 0)

Default('0')
_raise Double

set the expansion raising amount (from 0 to 1) (default 0.001)

Default('0.001')
fall Double

set the compression raising amount (from 0 to 1) (default 0.001)

Default('0.001')
channels String

set channels to filter (default "all")

Default('all')
invert Boolean

set inverted filtering (default false)

Default('false')
link Boolean

set linked channels filtering (default false)

Default('false')
rms Double

set the RMS value (from 0 to 1) (default 0)

Default('0')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

stereotools

stereotools(
    *,
    level_in: Double = Default("1"),
    level_out: Double = Default("1"),
    balance_in: Double = Default("0"),
    balance_out: Double = Default("0"),
    softclip: Boolean = Default("false"),
    mutel: Boolean = Default("false"),
    muter: Boolean = Default("false"),
    phasel: Boolean = Default("false"),
    phaser: Boolean = Default("false"),
    mode: (
        Int
        | Literal[
            "lr>lr",
            "lr>ms",
            "ms>lr",
            "lr>ll",
            "lr>rr",
            "lr>l+r",
            "lr>rl",
            "ms>ll",
            "ms>rr",
            "ms>rl",
            "lr>l-r",
        ]
        | Default
    ) = Default("lr>lr"),
    slev: Double = Default("1"),
    sbal: Double = Default("0"),
    mlev: Double = Default("1"),
    mpan: Double = Default("0"),
    base: Double = Default("0"),
    delay: Double = Default("0"),
    sclevel: Double = Default("1"),
    phase: Double = Default("0"),
    bmode_in: (
        Int
        | Literal["balance", "amplitude", "power"]
        | Default
    ) = Default("balance"),
    bmode_out: (
        Int
        | Literal["balance", "amplitude", "power"]
        | Default
    ) = Default("balance"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply various stereo tools.

Parameters:

Name Type Description Default
level_in Double

set level in (from 0.015625 to 64) (default 1)

Default('1')
level_out Double

set level out (from 0.015625 to 64) (default 1)

Default('1')
balance_in Double

set balance in (from -1 to 1) (default 0)

Default('0')
balance_out Double

set balance out (from -1 to 1) (default 0)

Default('0')
softclip Boolean

enable softclip (default false)

Default('false')
mutel Boolean

mute L (default false)

Default('false')
muter Boolean

mute R (default false)

Default('false')
phasel Boolean

phase L (default false)

Default('false')
phaser Boolean

phase R (default false)

Default('false')
mode Int | Literal['lr>lr', 'lr>ms', 'ms>lr', 'lr>ll', 'lr>rr', 'lr>l+r', 'lr>rl', 'ms>ll', 'ms>rr', 'ms>rl', 'lr>l-r'] | Default

set stereo mode (from 0 to 10) (default lr>lr)

Default('lr>lr')
slev Double

set side level (from 0.015625 to 64) (default 1)

Default('1')
sbal Double

set side balance (from -1 to 1) (default 0)

Default('0')
mlev Double

set middle level (from 0.015625 to 64) (default 1)

Default('1')
mpan Double

set middle pan (from -1 to 1) (default 0)

Default('0')
base Double

set stereo base (from -1 to 1) (default 0)

Default('0')
delay Double

set delay (from -20 to 20) (default 0)

Default('0')
sclevel Double

set S/C level (from 1 to 100) (default 1)

Default('1')
phase Double

set stereo phase (from 0 to 360) (default 0)

Default('0')
bmode_in Int | Literal['balance', 'amplitude', 'power'] | Default

set balance in mode (from 0 to 2) (default balance)

Default('balance')
bmode_out Int | Literal['balance', 'amplitude', 'power'] | Default

set balance out mode (from 0 to 2) (default balance)

Default('balance')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

stereowiden

stereowiden(
    *,
    delay: Float = Default("20"),
    feedback: Float = Default("0.3"),
    crossfeed: Float = Default("0.3"),
    drymix: Float = Default("0.8"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply stereo widening effect.

Parameters:

Name Type Description Default
delay Float

set delay time (from 1 to 100) (default 20)

Default('20')
feedback Float

set feedback gain (from 0 to 0.9) (default 0.3)

Default('0.3')
crossfeed Float

set cross feed (from 0 to 0.8) (default 0.3)

Default('0.3')
drymix Float

set dry-mix (from 0 to 1) (default 0.8)

Default('0.8')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

superequalizer

superequalizer(
    *,
    _1b: Float = Default("1"),
    _2b: Float = Default("1"),
    _3b: Float = Default("1"),
    _4b: Float = Default("1"),
    _5b: Float = Default("1"),
    _6b: Float = Default("1"),
    _7b: Float = Default("1"),
    _8b: Float = Default("1"),
    _9b: Float = Default("1"),
    _10b: Float = Default("1"),
    _11b: Float = Default("1"),
    _12b: Float = Default("1"),
    _13b: Float = Default("1"),
    _14b: Float = Default("1"),
    _15b: Float = Default("1"),
    _16b: Float = Default("1"),
    _17b: Float = Default("1"),
    _18b: Float = Default("1"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply 18 band equalization filter.

Parameters:

Name Type Description Default
_1b Float

set 65Hz band gain (from 0 to 20) (default 1)

Default('1')
_2b Float

set 92Hz band gain (from 0 to 20) (default 1)

Default('1')
_3b Float

set 131Hz band gain (from 0 to 20) (default 1)

Default('1')
_4b Float

set 185Hz band gain (from 0 to 20) (default 1)

Default('1')
_5b Float

set 262Hz band gain (from 0 to 20) (default 1)

Default('1')
_6b Float

set 370Hz band gain (from 0 to 20) (default 1)

Default('1')
_7b Float

set 523Hz band gain (from 0 to 20) (default 1)

Default('1')
_8b Float

set 740Hz band gain (from 0 to 20) (default 1)

Default('1')
_9b Float

set 1047Hz band gain (from 0 to 20) (default 1)

Default('1')
_10b Float

set 1480Hz band gain (from 0 to 20) (default 1)

Default('1')
_11b Float

set 2093Hz band gain (from 0 to 20) (default 1)

Default('1')
_12b Float

set 2960Hz band gain (from 0 to 20) (default 1)

Default('1')
_13b Float

set 4186Hz band gain (from 0 to 20) (default 1)

Default('1')
_14b Float

set 5920Hz band gain (from 0 to 20) (default 1)

Default('1')
_15b Float

set 8372Hz band gain (from 0 to 20) (default 1)

Default('1')
_16b Float

set 11840Hz band gain (from 0 to 20) (default 1)

Default('1')
_17b Float

set 16744Hz band gain (from 0 to 20) (default 1)

Default('1')
_18b Float

set 20000Hz band gain (from 0 to 20) (default 1)

Default('1')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

surround

surround(
    *,
    chl_out: String = Default("5.1"),
    chl_in: String = Default("stereo"),
    level_in: Float = Default("1"),
    level_out: Float = Default("1"),
    lfe: Boolean = Default("true"),
    lfe_low: Int = Default("128"),
    lfe_high: Int = Default("256"),
    lfe_mode: (
        Int | Literal["add", "sub"] | Default
    ) = Default("add"),
    smooth: Float = Default("0"),
    angle: Float = Default("90"),
    focus: Float = Default("0"),
    fc_in: Float = Default("1"),
    fc_out: Float = Default("1"),
    fl_in: Float = Default("1"),
    fl_out: Float = Default("1"),
    fr_in: Float = Default("1"),
    fr_out: Float = Default("1"),
    sl_in: Float = Default("1"),
    sl_out: Float = Default("1"),
    sr_in: Float = Default("1"),
    sr_out: Float = Default("1"),
    bl_in: Float = Default("1"),
    bl_out: Float = Default("1"),
    br_in: Float = Default("1"),
    br_out: Float = Default("1"),
    bc_in: Float = Default("1"),
    bc_out: Float = Default("1"),
    lfe_in: Float = Default("1"),
    lfe_out: Float = Default("1"),
    allx: Float = Default("-1"),
    ally: Float = Default("-1"),
    fcx: Float = Default("0.5"),
    flx: Float = Default("0.5"),
    frx: Float = Default("0.5"),
    blx: Float = Default("0.5"),
    brx: Float = Default("0.5"),
    slx: Float = Default("0.5"),
    srx: Float = Default("0.5"),
    bcx: Float = Default("0.5"),
    fcy: Float = Default("0.5"),
    fly: Float = Default("0.5"),
    fry: Float = Default("0.5"),
    bly: Float = Default("0.5"),
    bry: Float = Default("0.5"),
    sly: Float = Default("0.5"),
    sry: Float = Default("0.5"),
    bcy: Float = Default("0.5"),
    win_size: Int = Default("4096"),
    win_func: (
        Int
        | Literal[
            "rect",
            "bartlett",
            "hann",
            "hanning",
            "hamming",
            "blackman",
            "welch",
            "flattop",
            "bharris",
            "bnuttall",
            "bhann",
            "sine",
            "nuttall",
            "lanczos",
            "gauss",
            "tukey",
            "dolph",
            "cauchy",
            "parzen",
            "poisson",
            "bohman",
            "kaiser",
        ]
        | Default
    ) = Default("hann"),
    overlap: Float = Default("0.5"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply audio surround upmix filter.

Parameters:

Name Type Description Default
chl_out String

set output channel layout (default "5.1")

Default('5.1')
chl_in String

set input channel layout (default "stereo")

Default('stereo')
level_in Float

set input level (from 0 to 10) (default 1)

Default('1')
level_out Float

set output level (from 0 to 10) (default 1)

Default('1')
lfe Boolean

output LFE (default true)

Default('true')
lfe_low Int

LFE low cut off (from 0 to 256) (default 128)

Default('128')
lfe_high Int

LFE high cut off (from 0 to 512) (default 256)

Default('256')
lfe_mode Int | Literal['add', 'sub'] | Default

set LFE channel mode (from 0 to 1) (default add)

Default('add')
smooth Float

set temporal smoothness strength (from 0 to 1) (default 0)

Default('0')
angle Float

set soundfield transform angle (from 0 to 360) (default 90)

Default('90')
focus Float

set soundfield transform focus (from -1 to 1) (default 0)

Default('0')
fc_in Float

set front center channel input level (from 0 to 10) (default 1)

Default('1')
fc_out Float

set front center channel output level (from 0 to 10) (default 1)

Default('1')
fl_in Float

set front left channel input level (from 0 to 10) (default 1)

Default('1')
fl_out Float

set front left channel output level (from 0 to 10) (default 1)

Default('1')
fr_in Float

set front right channel input level (from 0 to 10) (default 1)

Default('1')
fr_out Float

set front right channel output level (from 0 to 10) (default 1)

Default('1')
sl_in Float

set side left channel input level (from 0 to 10) (default 1)

Default('1')
sl_out Float

set side left channel output level (from 0 to 10) (default 1)

Default('1')
sr_in Float

set side right channel input level (from 0 to 10) (default 1)

Default('1')
sr_out Float

set side right channel output level (from 0 to 10) (default 1)

Default('1')
bl_in Float

set back left channel input level (from 0 to 10) (default 1)

Default('1')
bl_out Float

set back left channel output level (from 0 to 10) (default 1)

Default('1')
br_in Float

set back right channel input level (from 0 to 10) (default 1)

Default('1')
br_out Float

set back right channel output level (from 0 to 10) (default 1)

Default('1')
bc_in Float

set back center channel input level (from 0 to 10) (default 1)

Default('1')
bc_out Float

set back center channel output level (from 0 to 10) (default 1)

Default('1')
lfe_in Float

set lfe channel input level (from 0 to 10) (default 1)

Default('1')
lfe_out Float

set lfe channel output level (from 0 to 10) (default 1)

Default('1')
allx Float

set all channel's x spread (from -1 to 15) (default -1)

Default('-1')
ally Float

set all channel's y spread (from -1 to 15) (default -1)

Default('-1')
fcx Float

set front center channel x spread (from 0.06 to 15) (default 0.5)

Default('0.5')
flx Float

set front left channel x spread (from 0.06 to 15) (default 0.5)

Default('0.5')
frx Float

set front right channel x spread (from 0.06 to 15) (default 0.5)

Default('0.5')
blx Float

set back left channel x spread (from 0.06 to 15) (default 0.5)

Default('0.5')
brx Float

set back right channel x spread (from 0.06 to 15) (default 0.5)

Default('0.5')
slx Float

set side left channel x spread (from 0.06 to 15) (default 0.5)

Default('0.5')
srx Float

set side right channel x spread (from 0.06 to 15) (default 0.5)

Default('0.5')
bcx Float

set back center channel x spread (from 0.06 to 15) (default 0.5)

Default('0.5')
fcy Float

set front center channel y spread (from 0.06 to 15) (default 0.5)

Default('0.5')
fly Float

set front left channel y spread (from 0.06 to 15) (default 0.5)

Default('0.5')
fry Float

set front right channel y spread (from 0.06 to 15) (default 0.5)

Default('0.5')
bly Float

set back left channel y spread (from 0.06 to 15) (default 0.5)

Default('0.5')
bry Float

set back right channel y spread (from 0.06 to 15) (default 0.5)

Default('0.5')
sly Float

set side left channel y spread (from 0.06 to 15) (default 0.5)

Default('0.5')
sry Float

set side right channel y spread (from 0.06 to 15) (default 0.5)

Default('0.5')
bcy Float

set back center channel y spread (from 0.06 to 15) (default 0.5)

Default('0.5')
win_size Int

set window size (from 1024 to 65536) (default 4096)

Default('4096')
win_func Int | Literal['rect', 'bartlett', 'hann', 'hanning', 'hamming', 'blackman', 'welch', 'flattop', 'bharris', 'bnuttall', 'bhann', 'sine', 'nuttall', 'lanczos', 'gauss', 'tukey', 'dolph', 'cauchy', 'parzen', 'poisson', 'bohman', 'kaiser'] | Default

set window function (from 0 to 20) (default hann)

Default('hann')
overlap Float

set window overlap (from 0 to 1) (default 0.5)

Default('0.5')
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

tiltshelf

tiltshelf(
    *,
    frequency: Double = Default("3000"),
    width_type: (
        Int | Literal["h", "q", "o", "s", "k"] | Default
    ) = Default("q"),
    width: Double = Default("0.5"),
    gain: Double = Default("0"),
    poles: Int = Default("2"),
    mix: Double = Default("1"),
    channels: String = Default("all"),
    normalize: Boolean = Default("false"),
    transform: (
        Int
        | Literal[
            "di", "dii", "tdi", "tdii", "latt", "svf", "zdf"
        ]
        | Default
    ) = Default("di"),
    precision: (
        Int
        | Literal["auto", "s16", "s32", "f32", "f64"]
        | Default
    ) = Default("auto"),
    blocksize: Int = Default("0"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply a tilt shelf filter.

Parameters:

Name Type Description Default
frequency Double

set central frequency (from 0 to 999999) (default 3000)

Default('3000')
width_type Int | Literal['h', 'q', 'o', 's', 'k'] | Default

set filter-width type (from 1 to 5) (default q)

Default('q')
width Double

set width (from 0 to 99999) (default 0.5)

Default('0.5')
gain Double

set gain (from -900 to 900) (default 0)

Default('0')
poles Int

set number of poles (from 1 to 2) (default 2)

Default('2')
mix Double

set mix (from 0 to 1) (default 1)

Default('1')
channels String

set channels to filter (default "all")

Default('all')
normalize Boolean

normalize coefficients (default false)

Default('false')
transform Int | Literal['di', 'dii', 'tdi', 'tdii', 'latt', 'svf', 'zdf'] | Default

set transform type (from 0 to 6) (default di)

Default('di')
precision Int | Literal['auto', 's16', 's32', 'f32', 'f64'] | Default

set filtering precision (from -1 to 3) (default auto)

Default('auto')
blocksize Int

set the block size (from 0 to 32768) (default 0)

Default('0')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

treble

treble(
    *,
    frequency: Double = Default("3000"),
    width_type: (
        Int | Literal["h", "q", "o", "s", "k"] | Default
    ) = Default("q"),
    width: Double = Default("0.5"),
    gain: Double = Default("0"),
    poles: Int = Default("2"),
    mix: Double = Default("1"),
    channels: String = Default("all"),
    normalize: Boolean = Default("false"),
    transform: (
        Int
        | Literal[
            "di", "dii", "tdi", "tdii", "latt", "svf", "zdf"
        ]
        | Default
    ) = Default("di"),
    precision: (
        Int
        | Literal["auto", "s16", "s32", "f32", "f64"]
        | Default
    ) = Default("auto"),
    blocksize: Int = Default("0"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Boost or cut upper frequencies.

Parameters:

Name Type Description Default
frequency Double

set central frequency (from 0 to 999999) (default 3000)

Default('3000')
width_type Int | Literal['h', 'q', 'o', 's', 'k'] | Default

set filter-width type (from 1 to 5) (default q)

Default('q')
width Double

set width (from 0 to 99999) (default 0.5)

Default('0.5')
gain Double

set gain (from -900 to 900) (default 0)

Default('0')
poles Int

set number of poles (from 1 to 2) (default 2)

Default('2')
mix Double

set mix (from 0 to 1) (default 1)

Default('1')
channels String

set channels to filter (default "all")

Default('all')
normalize Boolean

normalize coefficients (default false)

Default('false')
transform Int | Literal['di', 'dii', 'tdi', 'tdii', 'latt', 'svf', 'zdf'] | Default

set transform type (from 0 to 6) (default di)

Default('di')
precision Int | Literal['auto', 's16', 's32', 'f32', 'f64'] | Default

set filtering precision (from -1 to 3) (default auto)

Default('auto')
blocksize Int

set the block size (from 0 to 32768) (default 0)

Default('0')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

tremolo

tremolo(
    *,
    f: Double = Default("5"),
    d: Double = Default("0.5"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply tremolo effect.

Parameters:

Name Type Description Default
f Double

set frequency in hertz (from 0.1 to 20000) (default 5)

Default('5')
d Double

set depth as percentage (from 0 to 1) (default 0.5)

Default('0.5')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

vfilter

vfilter(
    *streams: FilterableStream,
    name: str,
    input_typings: tuple[StreamType, ...] = (video,),
    **kwargs: Any
) -> VideoStream

Apply a custom video filter to this stream.

This method applies a custom FFmpeg video filter to this stream and returns the resulting video stream. It's a convenience wrapper around filter_multi_output that handles the case of filters with a single video output.

Parameters:

Name Type Description Default
*streams FilterableStream

Additional input streams for the filter

()
name str

The name of the FFmpeg filter to apply

required
input_typings tuple[StreamType, ...]

The expected types of the input streams (defaults to all video)

(video,)
**kwargs Any

Filter-specific parameters as keyword arguments

{}

Returns:

Type Description
VideoStream

A VideoStream representing the filter's output

Example
# Apply a blur filter to a video stream
blurred = stream.vfilter(name="boxblur", luma_radius=2)

vibrato

vibrato(
    *,
    f: Double = Default("5"),
    d: Double = Default("0.5"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply vibrato effect.

Parameters:

Name Type Description Default
f Double

set frequency in hertz (from 0.1 to 20000) (default 5)

Default('5')
d Double

set depth as percentage (from 0 to 1) (default 0.5)

Default('0.5')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

view

view(format: Literal['png', 'svg', 'dot'] = 'png') -> str

Visualize the stream.

Parameters:

Name Type Description Default
format Literal['png', 'svg', 'dot']

The format of the view.

'png'

Returns:

Type Description
str

The file path of the visualization.

virtualbass

virtualbass(
    *,
    cutoff: Double = Default("250"),
    strength: Double = Default("3"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Audio Virtual Bass.

Parameters:

Name Type Description Default
cutoff Double

set virtual bass cutoff (from 100 to 500) (default 250)

Default('250')
strength Double

set virtual bass strength (from 0.5 to 3) (default 3)

Default('3')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

volume

volume(
    *,
    volume: String = Default("1.0"),
    precision: (
        Int | Literal["fixed", "float", "double"] | Default
    ) = Default("float"),
    eval: (
        Int | Literal["once", "frame"] | Default
    ) = Default("once"),
    replaygain: (
        Int
        | Literal["drop", "ignore", "track", "album"]
        | Default
    ) = Default("drop"),
    replaygain_preamp: Double = Default("0"),
    replaygain_noclip: Boolean = Default("true"),
    timeline_options: FFMpegTimelineOption | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Change input volume.

Parameters:

Name Type Description Default
volume String

set volume adjustment expression (default "1.0")

Default('1.0')
precision Int | Literal['fixed', 'float', 'double'] | Default

select mathematical precision (from 0 to 2) (default float)

Default('float')
eval Int | Literal['once', 'frame'] | Default

specify when to evaluate expressions (from 0 to 1) (default once)

Default('once')
replaygain Int | Literal['drop', 'ignore', 'track', 'album'] | Default

Apply replaygain side data when present (from 0 to 3) (default drop)

Default('drop')
replaygain_preamp Double

Apply replaygain pre-amplification (from -15 to 15) (default 0)

Default('0')
replaygain_noclip Boolean

Apply replaygain clipping prevention (default true)

Default('true')
timeline_options FFMpegTimelineOption | None

Timeline options

None
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation

volumedetect

volumedetect(
    extra_options: dict[str, Any] | None = None,
) -> AudioStream

Detect audio volume.

Parameters:

Name Type Description Default
extra_options dict[str, Any] | None

Extra options for the filter

None

Returns:

Name Type Description
default AudioStream

the audio stream

References

FFmpeg Documentation