Skip to content

audio

Audio stream.

Classes:

Name Description
AudioStream

Audio stream.

AudioStream

Bases: FilterableStream

Audio stream.

Methods:

Name Description
abench

Benchmark part of a filtergraph.

abitscope

Convert input audio to a video output, displaying the audio bit scope.

acompressor

A compressor is mainly used to reduce the dynamic range of a signal.

acontrast

Simple audio dynamic range compression/expansion filter.

acopy

Copy the input audio source unchanged to the output. This is mainly useful for

acrossfade

Apply cross fade from one input audio stream to another input audio stream.

acrossover

Split audio stream into several bands.

acrusher

Reduce audio bit resolution.

acue

Delay audio filtering until a given wallclock timestamp. See the cue

adeclick

Remove impulsive noise from input audio.

adeclip

Remove clipped samples from input audio.

adecorrelate

Apply decorrelation to input audio stream.

adelay

Delay one or more audio channels.

adenorm

Remedy denormals in audio by adding extremely low-level noise.

aderivative

Compute derivative/integral of audio stream.

adrawgraph

Draw a graph using input audio metadata.

adynamicequalizer

Apply dynamic equalization to input audio stream.

adynamicsmooth

Apply dynamic smoothing to input audio stream.

aecho

Apply echoing to the input audio.

aemphasis

Audio emphasis filter creates or restores material directly taken from LPs or

aeval

Modify an audio signal according to the specified expressions.

aexciter

An exciter is used to produce high sound that is not present in the

afade

Apply fade-in/out effect to input audio.

afftdn

Denoise audio samples with FFT.

afftfilt

Apply arbitrary expressions to samples in frequency domain.

afifo

Buffer input images and send them when they are requested.

aformat

Set output format constraints for the input audio. The framework will

afreqshift

Apply frequency shift to input audio samples.

afwtdn

Reduce broadband noise from input samples using Wavelets.

agate

A gate is mainly used to reduce lower parts of a signal. This kind of signal

agraphmonitor

See graphmonitor.

ahistogram

Convert input audio to a video output, displaying the volume histogram.

aiir

Apply an arbitrary Infinite Impulse Response filter.

aintegral

Compute derivative/integral of audio stream.

alatency

Measure filtering latency.

alimiter

The limiter prevents an input signal from rising over a desired threshold.

allpass

Apply a two-pole all-pass filter with central frequency (in Hz)

aloop

Loop audio samples.

ametadata

Manipulate frame metadata.

amultiply

Multiply first audio stream with second audio stream and store result

anequalizer

High-order parametric multiband equalizer for each channel.

anlmdn

Reduce broadband noise in audio samples using Non-Local Means algorithm.

anlmf

Apply Normalized Least-Mean-(Squares|Fourth) algorithm to the first audio stream using the second audio stream.

anlms

Apply Normalized Least-Mean-(Squares|Fourth) algorithm to the first audio stream using the second audio stream.

anull

Pass the audio source unchanged to the output.

apad

Pad the end of an audio stream with silence.

aperms

Set read/write permissions for the output frames.

aphasemeter

Measures phase of input audio, which is exported as metadata lavfi.aphasemeter.phase,

aphaser

Add a phasing effect to the input audio.

aphaseshift

Apply phase shift to input audio samples.

apsyclip

Apply Psychoacoustic clipper to input audio stream.

apulsator

Audio pulsator is something between an autopanner and a tremolo.

arealtime

Slow down filtering to match real time approximately.

aresample

Resample the input audio to the specified parameters, using the

areverse

Reverse an audio clip.

arnndn

Reduce noise from speech using Recurrent Neural Networks.

asdr

Measure Audio Signal-to-Distortion Ratio.

asegment

Split single input stream into multiple streams.

aselect

Select frames to pass in output.

asendcmd

Send commands to filters in the filtergraph.

asetnsamples

Set the number of samples per each output audio frame.

asetpts

Change the PTS (presentation timestamp) of the input frames.

asetrate

Set the sample rate without altering the PCM data.

asettb

Set the timebase to use for the output frames timestamps.

ashowinfo

Show a line containing various information for each input audio frame.

asidedata

Delete frame side data, or select frames based on it.

asoftclip

Apply audio soft clipping.

aspectralstats

Display frequency domain statistical information about the audio channels.

asplit

Split input into several identical outputs.

astats

Display time domain statistical information about the audio channels.

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 filter to audio stream.

atrim

Trim the input so that the output contains one continuous subpart of the input.

avectorscope

Convert input audio to a video output, representing the audio vector

axcorrelate

Calculate normalized windowed cross-correlation between two input audio streams.

azmq

Receive commands sent through a libzmq client, and forward them to

bandpass

Apply a two-pole Butterworth band-pass filter with central

bandreject

Apply a two-pole Butterworth band-reject filter with central

bass

Boost or cut the bass (lower) frequencies of the audio using a two-pole

biquad

Apply a biquad IIR filter with the given coefficients.

channelmap

Remap input channels to new locations.

channelsplit

Split each channel from an input audio stream into a separate output stream.

chorus

Add a chorus effect to the audio.

compand

Compress or expand the audio's dynamic range.

compensationdelay

Compensation Delay Line is a metric based delay to compensate differing

crossfeed

Apply headphone crossfeed filter.

crystalizer

Simple algorithm for audio noise sharpening.

dcshift

Apply a DC shift to the audio.

deesser

Apply de-essing to the audio samples.

dialoguenhance

Enhance dialogue in stereo audio.

drmeter

Measure audio dynamic range.

dynaudnorm

Dynamic Audio Normalizer.

earwax

Make audio easier to listen to on headphones.

ebur128

EBU R128 scanner filter. This filter takes an audio stream and analyzes its loudness

equalizer

Apply a two-pole peaking equalisation (EQ) filter. With this

extrastereo

Linearly increases the difference between left and right channels which

firequalizer

Apply FIR Equalization using arbitrary frequency response.

flanger

Apply a flanging effect to the audio.

haas

Apply Haas effect to audio.

hdcd

Decodes High Definition Compatible Digital (HDCD) data. A 16-bit PCM stream with

highpass

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

highshelf

Boost or cut treble (upper) frequencies of the audio using a two-pole

loudnorm

EBU R128 loudness normalization. Includes both dynamic and linear normalization modes.

lowpass

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

lowshelf

Boost or cut the bass (lower) frequencies of the audio using a two-pole

mcompand

Multiband Compress or expand the audio's dynamic range.

pan

Mix channels with specific gain levels. The filter accepts the output

replaygain

ReplayGain scanner filter. This filter takes an audio stream as an input and

showcqt

Convert input audio to a video output representing frequency spectrum

showfreqs

Convert input audio to video output representing the audio power spectrum.

showspatial

Convert stereo input audio to a video output, representing the spatial relationship

showspectrum

Convert input audio to a video output, representing the audio frequency

showspectrumpic

Convert input audio to a single video frame, representing the audio frequency

showvolume

Convert input audio volume to a video output.

showwaves

Convert input audio to a video output, representing the samples waves.

showwavespic

Convert input audio to a single video frame, representing the samples waves.

sidechaincompress

This filter acts like normal compressor but has the ability to compress

sidechaingate

A sidechain gate acts like a normal (wideband) gate but has the ability to

silencedetect

Detect silence in an audio stream.

silenceremove

Remove silence from the beginning, middle or end of the audio.

speechnorm

Speech Normalizer.

stereotools

This filter has some handy utilities to manage stereo signals, for converting

stereowiden

This filter enhance the stereo effect by suppressing signal common to both

superequalizer

Apply 18 band equalizer.

surround

Apply audio surround upmix filter.

tiltshelf

Boost or cut the lower frequencies and cut or boost higher frequencies

treble

Boost or cut treble (upper) frequencies of the audio using a two-pole

tremolo

Sinusoidal amplitude modulation.

vibrato

Sinusoidal phase modulation.

virtualbass

Apply audio Virtual Bass filter.

volume

Adjust the input audio volume.

volumedetect

Detect the volume of the input video.

abench

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

Benchmark part of a filtergraph.

The filter accepts the following options:

Parameters:

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

Start or stop a timer. Available values are: @end table

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 a video output, displaying the audio bit scope.

The filter accepts the following options:

Parameters:

Name Type Description Default
rate Video_rate

Set frame rate, expressed as number of frames per second. Default value is "25".

Default('25')
size Image_size

Specify the video size for the output. For the syntax of this option, check the "Video size" section in the ffmpeg-utils manual. Default value is 1024x256.

Default('1024x256')
colors String

Specify list of colors separated by space or by '|' which will be used to draw channels. Unrecognized or missing colors will be replaced by white color.

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

Set output mode. Can be bars or trace. Default is 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

A compressor is mainly used to reduce the dynamic range of a signal. Especially modern music is mostly compressed at a high ratio to improve the overall loudness. It's done to get the highest attention of a listener, "fatten" the sound and bring more "power" to the track. If a signal is compressed too much it may sound dull or "dead" afterwards or it may start to "pump" (which could be a powerful effect but can also destroy a track completely). The right compression is the key to reach a professional sound and is the high art of mixing and mastering. Because of its complex settings it may take a long time to get the right feeling for this kind of effect.

Compression is done by detecting the volume above a chosen level threshold and dividing it by the factor set with ratio. So if you set the threshold to -12dB and your signal reaches -6dB a ratio of 2:1 will result in a signal at -9dB. Because an exact manipulation of the signal would cause distortion of the waveform the reduction can be levelled over the time. This is done by setting "Attack" and "Release". attack determines how long the signal has to rise above the threshold before any reduction will occur and release sets the time the signal has to fall below the threshold to reduce the reduction again. Shorter signals than the chosen attack time will be left untouched. The overall reduction of the signal can be made up afterwards with the makeup setting. So compressing the peaks of a signal about 6dB and raising the makeup to this level results in a signal twice as loud than the source. To gain a softer entry in the compression the knee flattens the hard edge at the threshold in the range of the chosen decibels.

The filter accepts the following options:

Parameters:

Name Type Description Default
level_in Double

Set input gain. Default is 1. Range is between 0.015625 and 64.

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

Set mode of compressor operation. Can be upward or downward. Default is downward.

Default('downward')
threshold Double

If a signal of stream rises above this level it will affect the gain reduction. By default it is 0.125. Range is between 0.00097563 and 1.

Default('0.125')
ratio Double

Set a ratio by which the signal is reduced. 1:2 means that if the level rose 4dB above the threshold, it will be only 2dB above after the reduction. Default is 2. Range is between 1 and 20.

Default('2')
attack Double

Amount of milliseconds the signal has to rise above the threshold before gain reduction starts. Default is 20. Range is between 0.01 and 2000.

Default('20')
release Double

Amount of milliseconds the signal has to fall below the threshold before reduction is decreased again. Default is 250. Range is between 0.01 and 9000.

Default('250')
makeup Double

Set the amount by how much signal will be amplified after processing. Default is 1. Range is from 1 to 64.

Default('1')
knee Double

Curve the sharp knee around the threshold to enter gain reduction more softly. Default is 2.82843. Range is between 1 and 8.

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

Choose if the average level between all channels of input stream or the louder(maximum) channel of input stream affects the reduction. Default is average.

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

Should the exact signal be taken in case of peak or an RMS one in case of rms. Default is rms which is mostly smoother.

Default('rms')
level_sc Double

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

Default('1')
mix Double

How much to use compressed signal in output. Default is 1. Range is between 0 and 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.

The filter accepts the following options:

Parameters:

Name Type Description Default
contrast Float

Set contrast. Default is 33. Allowed range is between 0 and 100.

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 source unchanged to the output. This is mainly useful for testing purposes.

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",
        ]
        | 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",
        ]
        | Default
    ) = Default("tri"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply cross fade from one input audio stream to another input audio stream. The cross fade is applied for specified duration near the end of first stream.

The filter accepts the following options:

Parameters:

Name Type Description Default
nb_samples Int

Specify the number of samples for which the cross fade effect has to last. At the end of the cross fade effect the first input audio will be completely silent. Default is 44100.

Default('44100')
duration Duration

Specify the duration of the cross fade effect. See the Time duration section in the ffmpeg-utils(1) manual for the accepted syntax. By default the duration is determined by nb_samples. If set this option is used instead of nb_samples.

Default('0')
overlap Boolean

Should first stream end overlap with second stream start. Default is enabled.

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'] | Default

Set curve for cross fade transition for first stream.

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'] | Default

Set curve for cross fade transition for second stream. For description of available curve types see afade filter description.

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 stream into several bands.

This filter splits audio stream into two or more frequency ranges. Summing all streams back will give flat output.

The filter accepts the following options:

Parameters:

Name Type Description Default
split String

Set split frequencies. Those must be positive and increasing.

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

Set filter order for each band split. This controls filter roll-off or steepness of filter transfer function. Available values are: @end table Default is 4th.

Default('4th')
level Float

Set input gain level. Allowed range is from 0 to 1. Default value is 1.

Default('1')
gain String

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

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

Set which precision to use when processing samples. @end table Default value is 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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Reduce audio bit resolution.

This filter is bit crusher with enhanced functionality. A bit crusher is used to audibly reduce number of bits an audio signal is sampled with. This doesn't change the bit depth at all, it just produces the effect. Material reduced in bit depth sounds more harsh and "digital". This filter is able to even round to continuous values instead of discrete bit depths. Additionally it has a D/C offset which results in different crushing of the lower and the upper half of the signal. An Anti-Aliasing setting is able to produce "softer" crushing sounds.

Another feature of this filter is the logarithmic mode. This setting switches from linear distances between bits to logarithmic ones. The result is a much more "natural" sounding crusher which doesn't gate low signals for example. The human ear has a logarithmic perception, so this kind of crushing is much more pleasant. Logarithmic crushing is also able to get anti-aliased.

The filter accepts the following options:

Parameters:

Name Type Description Default
level_in Double

Set level in.

Default('1')
level_out Double

Set level out.

Default('1')
bits Double

Set bit reduction.

Default('8')
mix Double

Set mixing amount.

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

Can be linear: lin or logarithmic: log.

Default('lin')
dc Double

Set DC.

Default('1')
aa Double

Set anti-aliasing.

Default('0.5')
samples Double

Set sample reduction.

Default('1')
lfo Boolean

Enable LFO. By default disabled.

Default('false')
lforange Double

Set LFO range.

Default('20')
lforate Double

Set LFO rate.

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 audio filtering until a given wallclock timestamp. See the cue filter.

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Remove impulsive noise from input audio.

Samples detected as impulsive noise are replaced by interpolated samples using autoregressive modelling.

Parameters:

Name Type Description Default
window Double

Set window size, in milliseconds. Allowed range is from 10 to 100. Default value is 55 milliseconds. This sets size of window which will be processed at once.

Default('55')
overlap Double

Set window overlap, in percentage of window size. Allowed range is from 50 to 95. Default value is 75 percent. Setting this to a very high value increases impulsive noise removal but makes whole process much slower.

Default('75')
arorder Double

Set autoregression order, in percentage of window size. Allowed range is from 0 to 25. Default value is 2 percent. This option also controls quality of interpolated samples using neighbour good samples.

Default('2')
threshold Double

Set threshold value. Allowed range is from 1 to 100. Default value is 2. This controls the strength of impulsive noise which is going to be removed. The lower value, the more samples will be detected as impulsive noise.

Default('2')
burst Double

Set burst fusion, in percentage of window size. Allowed range is 0 to 10. Default value is 2. If any two samples detected as noise are spaced less than this value then any sample between those two samples will be also detected as noise.

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

Set overlap method. It accepts the following values: @end table Default value is a.

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Remove clipped samples from input audio.

Samples detected as clipped are replaced by interpolated samples using autoregressive modelling.

Parameters:

Name Type Description Default
window Double

Set window size, in milliseconds. Allowed range is from 10 to 100. Default value is 55 milliseconds. This sets size of window which will be processed at once.

Default('55')
overlap Double

Set window overlap, in percentage of window size. Allowed range is from 50 to 95. Default value is 75 percent.

Default('75')
arorder Double

Set autoregression order, in percentage of window size. Allowed range is from 0 to 25. Default value is 8 percent. This option also controls quality of interpolated samples using neighbour good samples.

Default('8')
threshold Double

Set threshold value. Allowed range is from 1 to 100. Default value is 10. Higher values make clip detection less aggressive.

Default('10')
hsize Int

Set size of histogram used to detect clips. Allowed range is from 100 to 9999. Default value is 1000. Higher values make clip detection less aggressive.

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

Set overlap method. It accepts the following values: @end table Default value is a.

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply decorrelation to input audio stream.

The filter accepts the following options:

Parameters:

Name Type Description Default
stages Int

Set decorrelation stages of filtering. Allowed range is from 1 to 16. Default value is 6.

Default('6')
seed Int64

Set random seed used for setting delay in samples across channels.

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Delay one or more audio channels.

Samples in delayed channel are filled with silence.

The filter accepts the following option:

Parameters:

Name Type Description Default
delays String

Set list of delays in milliseconds for each channel separated by '|'. Unused delays will be silently ignored. If number of given delays is smaller than number of channels all remaining channels will not be delayed. If you want to delay exact number of samples, append 'S' to number. If you want instead to delay in seconds, append 's' to number.

Default(None)
all Boolean

Use last set delay for all remaining channels. By default is disabled. This option if enabled changes how option delays is interpreted.

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Remedy denormals in audio by adding extremely low-level noise.

This filter shall be placed before any filter that can produce denormals.

A description of the accepted parameters follows.

Parameters:

Name Type Description Default
level Double

Set level of added noise in dB. Default is -351. Allowed range is from -451 to -90.

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

Set type of added noise. @end table Default is 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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None,
) -> AudioStream

Compute derivative/integral of audio stream.

Applying both filters one after another produces original 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.

See drawgraph

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

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"),
    knee: Double = Default("1"),
    ratio: Double = Default("1"),
    makeup: Double = Default("0"),
    range: Double = Default("0"),
    slew: Double = Default("1"),
    mode: (
        Int | Literal["listen", "cut", "boost"] | Default
    ) = Default("cut"),
    tftype: (
        Int
        | Literal["bell", "lowshelf", "highshelf"]
        | Default
    ) = Default("bell"),
    timeline_options: FFMpegTimelineOption | None = None,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply dynamic equalization to input audio stream.

A description of the accepted options follows.

Parameters:

Name Type Description Default
threshold Double

Set the detection threshold used to trigger equalization. Threshold detection is using bandpass filter. Default value is 0. Allowed range is from 0 to 100.

Default('0')
dfrequency Double

Set the detection frequency in Hz used for bandpass filter used to trigger equalization. Default value is 1000 Hz. Allowed range is between 2 and 1000000 Hz.

Default('1000')
dqfactor Double

Set the detection resonance factor for bandpass filter used to trigger equalization. Default value is 1. Allowed range is from 0.001 to 1000.

Default('1')
tfrequency Double

Set the target frequency of equalization filter. Default value is 1000 Hz. Allowed range is between 2 and 1000000 Hz.

Default('1000')
tqfactor Double

Set the target resonance factor for target equalization filter. Default value is 1. Allowed range is from 0.001 to 1000.

Default('1')
attack Double

Set the amount of milliseconds the signal from detection has to rise above the detection threshold before equalization starts. Default is 20. Allowed range is between 1 and 2000.

Default('20')
release Double

Set the amount of milliseconds the signal from detection has to fall below the detection threshold before equalization ends. Default is 200. Allowed range is between 1 and 2000.

Default('200')
knee Double

Curve the sharp knee around the detection threshold to calculate equalization gain more softly. Default is 1. Allowed range is between 0 and 8.

Default('1')
ratio Double

Set the ratio by which the equalization gain is raised. Default is 1. Allowed range is between 1 and 20.

Default('1')
makeup Double

Set the makeup offset in dB by which the equalization gain is raised. Default is 0. Allowed range is between 0 and 30.

Default('0')
range Double

Set the max allowed cut/boost amount in dB. Default is 0. Allowed range is from 0 to 200.

Default('0')
slew Double

Set the slew factor. Default is 1. Allowed range is from 1 to 200.

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

Set the mode of filter operation, can be one of the following: @end table Default mode is cut.

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

Set the type of target filter, can be one of the following: @end table Default type is bell.

Default('bell')
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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply dynamic smoothing to input audio stream.

A description of the accepted options follows.

Parameters:

Name Type Description Default
sensitivity Double

Set an amount of sensitivity to frequency fluctations. Default is 2. Allowed range is from 0 to 1e+06.

Default('2')
basefreq Double

Set a base frequency for smoothing. Default value is 22050. Allowed range is from 2 to 1e+06.

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

Apply echoing to the input audio.

Echoes are reflected sound and can occur naturally amongst mountains (and sometimes large buildings) when talking or shouting; digital echo effects emulate this behaviour and are often used to help fill out the sound of a single instrument or vocal. The time difference between the original signal and the reflection is the delay, and the loudness of the reflected signal is the decay. Multiple echoes can have different delays and decays.

A description of the accepted parameters follows.

Parameters:

Name Type Description Default
in_gain Float

Set input gain of reflected signal. Default is 0.6.

Default('0.6')
out_gain Float

Set output gain of reflected signal. Default is 0.3.

Default('0.3')
delays String

Set list of time intervals in milliseconds between original signal and reflections separated by '|'. Allowed range for each delay is (0 - 90000.0]. Default is 1000.

Default('1000')
decays String

Set list of loudness of reflected signals separated by '|'. Allowed range for each decay is (0 - 1.0]. Default is 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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Audio emphasis filter creates or restores material directly taken from LPs or emphased CDs with different filter curves. E.g. to store music on vinyl the signal has to be altered by a filter first to even out the disadvantages of this recording medium. Once the material is played back the inverse filter has to be applied to restore the distortion of the frequency response.

The filter accepts the following options:

Parameters:

Name Type Description Default
level_in Double

Set input gain.

Default('1')
level_out Double

Set output gain.

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

Set filter mode. For restoring material use reproduction mode, otherwise use production mode. Default is reproduction mode.

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

Set filter type. Selects medium. Can be one of the following: @end table

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Modify an audio signal according to the specified expressions.

This filter accepts one or more expressions (one for each channel), which are evaluated and used to modify a corresponding audio signal.

It accepts the following parameters:

Parameters:

Name Type Description Default
exprs String

Set the '|'-separated expressions list for each separate channel. If the number of input channels is greater than the number of expressions, the last specified expression is used for the remaining output channels.

Default(None)
channel_layout String

Set output channel layout. If not specified, the channel layout is specified by the number of expressions. If set to same, it will use by default the same input 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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

An exciter is used to produce high sound that is not present in the original signal. This is done by creating harmonic distortions of the signal which are restricted in range and added to the original signal. An Exciter raises the upper end of an audio signal without simply raising the higher frequencies like an equalizer would do to create a more "crisp" or "brilliant" sound.

The filter accepts the following options:

Parameters:

Name Type Description Default
level_in Double

Set input level prior processing of signal. Allowed range is from 0 to 64. Default value is 1.

Default('1')
level_out Double

Set output level after processing of signal. Allowed range is from 0 to 64. Default value is 1.

Default('1')
amount Double

Set the amount of harmonics added to original signal. Allowed range is from 0 to 64. Default value is 1.

Default('1')
drive Double

Set the amount of newly created harmonics. Allowed range is from 0.1 to 10. Default value is 8.5.

Default('8.5')
blend Double

Set the octave of newly created harmonics. Allowed range is from -10 to 10. Default value is 0.

Default('0')
freq Double

Set the lower frequency limit of producing harmonics in Hz. Allowed range is from 2000 to 12000 Hz. Default is 7500 Hz.

Default('7500')
ceil Double

Set the upper frequency limit of producing harmonics. Allowed range is from 9999 to 20000 Hz. If value is lower than 10000 Hz no limit is applied.

Default('9999')
listen Boolean

Mute the original signal and output only added harmonics. By default is disabled.

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",
        ]
        | Default
    ) = Default("tri"),
    timeline_options: FFMpegTimelineOption | None = None,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply fade-in/out effect to input audio.

A description of the accepted parameters follows.

Parameters:

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

Specify the effect type, can be either in for fade-in, or out for a fade-out effect. Default is in.

Default('in')
start_sample Int64

Specify the number of the start sample for starting to apply the fade effect. Default is 0.

Default('0')
nb_samples Int64

Specify the number of samples for which the fade effect has to last. At the end of the fade-in effect the output audio will have the same volume as the input audio, at the end of the fade-out transition the output audio will be silence. Default is 44100.

Default('44100')
start_time Duration

Specify the start time of the fade effect. Default is 0. The value must be specified as a time duration; see the Time duration section in the ffmpeg-utils(1) manual for the accepted syntax. If set this option is used instead of start_sample.

Default('0')
duration Duration

Specify the duration of the fade effect. See the Time duration section in the ffmpeg-utils(1) manual for the accepted syntax. At the end of the fade-in effect the output audio will have the same volume as the input audio, at the end of the fade-out transition the output audio will be silence. By default the duration is determined by nb_samples. If set this option is used instead of nb_samples.

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'] | Default

Set curve for fade transition. It accepts the following values: @end table

Default('tri')
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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Denoise audio samples with FFT.

A description of the accepted parameters follows.

Parameters:

Name Type Description Default
noise_reduction Float

Set the noise reduction in dB, allowed range is 0.01 to 97. Default value is 12 dB.

Default('12')
noise_floor Float

Set the noise floor in dB, allowed range is -80 to -20. Default value is -50 dB.

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

Set the noise type. It accepts the following values: @end table

Default('white')
band_noise String

Set custom band noise profile for every one of 15 bands. Bands are separated by ' ' or '|'.

Default(None)
residual_floor Float

Set the residual floor in dB, allowed range is -80 to -20. Default value is -38 dB.

Default('-38')
track_noise Boolean

Enable noise floor tracking. By default is disabled. With this enabled, noise floor is automatically adjusted.

Default('false')
track_residual Boolean

Enable residual tracking. By default is disabled.

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

Set the output mode. It accepts the following values: @end table

Default('output')
adaptivity Float

Set the adaptivity factor, used how fast to adapt gains adjustments per each frequency bin. Value 0 enables instant adaptation, while higher values react much slower. Allowed range is from 0 to 1. Default value is 0.5.

Default('0.5')
floor_offset Float

Set the noise floor offset factor. This option is used to adjust offset applied to measured noise floor. It is only effective when noise floor tracking is enabled. Allowed range is from -2.0 to 2.0. Default value is 1.0.

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

Set the noise link used for multichannel audio. It accepts the following values: @end table

Default('min')
band_multiplier Float

Set the band multiplier factor, used how much to spread bands across frequency bins. Allowed range is from 0.2 to 5. Default value is 1.25.

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

Toggle capturing and measurement of noise profile from input audio. It accepts the following values: @end table

Default('none')
gain_smooth Int

Set gain smooth spatial radius, used to smooth gains applied to each frequency bin. Useful to reduce random music noise artefacts. Higher values increases smoothing of gains. Allowed range is from 0 to 50. Default value is 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",
        ]
        | Default
    ) = Default("hann"),
    overlap: Float = Default("0.75"),
    timeline_options: FFMpegTimelineOption | None = None,
    enable: str | 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 frequency domain real expression for each separate channel separated by '|'. Default is "re". If the number of input channels is greater than the number of expressions, the last specified expression is used for the remaining output channels.

Default('re')
imag String

Set frequency domain imaginary expression for each separate channel separated by '|'. Default is "im". Each expression in real and imag can contain the following constants and functions: @end table

Default('im')
win_size Int

Set window size. Allowed range is from 16 to 131072. Default is 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'] | Default

Set window function. It accepts the following values: @end table Default is hann.

Default('hann')
overlap Float

Set window overlap. If set to 1, the recommended overlap for selected window function will be picked. Default is 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

afifo

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

Buffer input images and send them when they are requested.

It is mainly useful when auto-inserted by the libavfilter framework.

It does not take parameters.

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

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

Set output format constraints for the input audio. The framework will negotiate the most appropriate format to minimize conversions.

It accepts the following parameters:

Parameters:

Name Type Description Default
sample_fmts String

A '|'-separated list of requested sample formats.

Default(None)
sample_rates String

A '|'-separated list of requested sample rates.

Default(None)
channel_layouts String

A '|'-separated list of requested channel layouts. See the Channel Layout section in the ffmpeg-utils(1) manual for the required syntax.

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply frequency shift to input audio samples.

The filter accepts the following options:

Parameters:

Name Type Description Default
shift Double

Specify frequency shift. Allowed range is -INT_MAX to INT_MAX. Default value is 0.0.

Default('0')
level Double

Set output gain applied to final output. Allowed range is from 0.0 to 1.0. Default value is 1.0.

Default('1')
order Int

Set filter order used for filtering. Allowed range is from 1 to 16. Default value is 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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Reduce broadband noise from input samples using Wavelets.

A description of the accepted options follows.

Parameters:

Name Type Description Default
sigma Double

Set the noise sigma, allowed range is from 0 to 1. Default value is 0. This option controls strength of denoising applied to input samples. Most useful way to set this option is via decibels, eg. -45dB.

Default('0')
levels Int

Set the number of wavelet levels of decomposition. Allowed range is from 1 to 12. Default value is 10. Setting this too low make denoising performance very poor.

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

Set wavelet type for decomposition of input frame. They are sorted by number of coefficients, from lowest to highest. More coefficients means worse filtering speed, but overall better quality. Available wavelets are: @end table

Default('sym10')
percent Double

Set percent of full denoising. Allowed range is from 0 to 100 percent. Default value is 85 percent or partial denoising.

Default('85')
profile Boolean

If enabled, first input frame will be used as noise profile. If first frame samples contain non-noise performance will be very poor.

Default('false')
adaptive Boolean

If enabled, input frames are analyzed for presence of noise. If noise is detected with high possibility then input frame profile will be used for processing following frames, until new noise frame is detected.

Default('false')
samples Int

Set size of single frame in number of samples. Allowed range is from 512 to 65536. Default frame size is 8192 samples.

Default('8192')
softness Double

Set softness applied inside thresholding function. Allowed range is from 0 to 10. Default softness is 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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

A gate is mainly used to reduce lower parts of a signal. This kind of signal processing reduces disturbing noise between useful signals.

Gating is done by detecting the volume below a chosen level threshold and dividing it by the factor set with ratio. The bottom of the noise floor is set via range. Because an exact manipulation of the signal would cause distortion of the waveform the reduction can be levelled over time. This is done by setting attack and release.

attack determines how long the signal has to fall below the threshold before any reduction will occur and release sets the time the signal has to rise above the threshold to reduce the reduction again. Shorter signals than the chosen attack time will be left untouched.

Parameters:

Name Type Description Default
level_in Double

Set input level before filtering. Default is 1. Allowed range is from 0.015625 to 64.

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

Set the mode of operation. Can be upward or downward. Default is downward. If set to upward mode, higher parts of signal will be amplified, expanding dynamic range in upward direction. Otherwise, in case of downward lower parts of signal will be reduced.

Default('downward')
range Double

Set the level of gain reduction when the signal is below the threshold. Default is 0.06125. Allowed range is from 0 to 1. Setting this to 0 disables reduction and then filter behaves like expander.

Default('0.06125')
threshold Double

If a signal rises above this level the gain reduction is released. Default is 0.125. Allowed range is from 0 to 1.

Default('0.125')
ratio Double

Set a ratio by which the signal is reduced. Default is 2. Allowed range is from 1 to 9000.

Default('2')
attack Double

Amount of milliseconds the signal has to rise above the threshold before gain reduction stops. Default is 20 milliseconds. Allowed range is from 0.01 to 9000.

Default('20')
release Double

Amount of milliseconds the signal has to fall below the threshold before the reduction is increased again. Default is 250 milliseconds. Allowed range is from 0.01 to 9000.

Default('250')
makeup Double

Set amount of amplification of signal after processing. Default is 1. Allowed range is from 1 to 64.

Default('1')
knee Double

Curve the sharp knee around the threshold to enter gain reduction more softly. Default is 2.828427125. Allowed range is from 1 to 8.

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

Choose if exact signal should be taken for detection or an RMS like one. Default is rms. Can be peak or rms.

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

Choose if the average level between all channels or the louder channel affects the reduction. Default is average. Can be average or maximum.

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: (
        Int | Literal["full", "compact"] | Default
    ) = Default("full"),
    flags: (
        Flags
        | Literal[
            "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",
        ]
        | Default
    ) = Default("queue"),
    rate: Video_rate = Default("25"),
    extra_options: dict[str, Any] | None = None
) -> VideoStream

See graphmonitor.

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 Int | Literal['full', 'compact'] | Default

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

Default('full')
flags Flags | Literal['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'] | Default

set flags (default queue)

Default('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 a video output, displaying the volume histogram.

The filter accepts the following options:

Parameters:

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

Specify how histogram is calculated. It accepts the following values: @end table Default is single.

Default('single')
rate Video_rate

Set frame rate, expressed as number of frames per second. Default value is "25".

Default('25')
size Image_size

Specify the video size for the output. For the syntax of this option, check the "Video size" section in the ffmpeg-utils manual. Default value is hd720.

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

Set display scale. It accepts the following values: @end table Default is log.

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

Set amplitude scale. It accepts the following values: @end table Default is log.

Default('log')
acount Int

Set how much frames to accumulate in histogram. Default is 1. Setting this to -1 accumulates all frames.

Default('1')
rheight Float

Set histogram ratio of window height.

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

Set sonogram sliding. It accepts the following values: @end table Default is replace.

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

Set histogram mode. It accepts the following values: @end table Default is 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 an arbitrary Infinite Impulse Response filter.

It accepts the following parameters:

Parameters:

Name Type Description Default
zeros String

Set B/numerator/zeros/reflection coefficients.

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

Set A/denominator/poles/ladder coefficients.

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

Set channels gains.

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. @end table

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

Set type of processing. @end table

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

Set filtering precision. @end table

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

Set filtering precision. @end table

Default('dbl')
normalize Boolean

Normalize filter coefficients, by default is enabled. Enabling it will normalize magnitude response at DC to 0dB.

Default('true')
mix Double

How much to use filtered signal in output. Default is 1. Range is between 0 and 1.

Default('1')
response Boolean

Show IR frequency response, magnitude(magenta), phase(green) and group delay(yellow) in additional video stream. By default it is disabled.

Default('false')
channel Int

Set for which IR channel to display frequency response. By default is first channel displayed. This option is used only when response is enabled.

Default('0')
size Image_size

Set video stream size. This option is used only when response is enabled.

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None,
) -> AudioStream

Compute derivative/integral of audio stream.

Applying both filters one after another produces original 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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None,
) -> AudioStream

Measure filtering latency.

Report previous filter filtering latency, delay in number of audio samples for audio filters or number of video frames for video filters.

On end of input stream, filter will report min and max measured latency for previous running filter in filtergraph.

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

The limiter prevents an input signal from rising over a desired threshold. This limiter uses lookahead technology to prevent your signal from distorting. It means that there is a small delay after the signal is processed. Keep in mind that the delay it produces is the attack time you set.

The filter accepts the following options:

Parameters:

Name Type Description Default
level_in Double

Set input gain. Default is 1.

Default('1')
level_out Double

Set output gain. Default is 1.

Default('1')
limit Double

Don't let signals above this level pass the limiter. Default is 1.

Default('1')
attack Double

The limiter will reach its attenuation level in this amount of time in milliseconds. Default is 5 milliseconds.

Default('5')
release Double

Come back from limiting to attenuation 1.0 in this amount of milliseconds. Default is 50 milliseconds.

Default('50')
asc Boolean

When gain reduction is always needed ASC takes care of releasing to an average reduction level rather than reaching a reduction of 0 in the release time.

Default('false')
asc_level Double

Select how much the release time is affected by ASC, 0 means nearly no changes in release time while 1 produces higher release times.

Default('0.5')
level Boolean

Auto level output signal. Default is enabled. This normalizes audio back to 0dB if enabled.

Default('true')
latency Boolean

Compensate the delay introduced by using the lookahead buffer set with attack parameter. Also flush the valid audio data in the lookahead buffer when the stream hits EOF.

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply a two-pole all-pass filter with central frequency (in Hz) frequency, and filter-width width. An all-pass filter changes the audio's frequency to phase relationship without changing its frequency to amplitude relationship.

The filter accepts the following options:

Parameters:

Name Type Description Default
frequency Double

Change allpass frequency. Syntax for the command is : "frequency"

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

Change allpass width_type. Syntax for the command is : "width_type"

Default('q')
width Double

Change allpass width. Syntax for the command is : "width"

Default('0.707')
mix Double

Change allpass mix. Syntax for the command is : "mix"

Default('1')
channels String

Specify which channels to filter, by default all available are filtered.

Default('all')
normalize Boolean

Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB.

Default('false')
order Int

Set the filter order, can be 1 or 2. Default is 2.

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

Set transform type of IIR filter. @end table

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

Set precison of filtering. @end table

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"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Loop audio samples.

The filter accepts the following options:

Parameters:

Name Type Description Default
loop Int

Set the number of loops. Setting this value to -1 will result in infinite loops. Default is 0.

Default('0')
size Int64

Set maximal number of samples. Default is 0.

Default('0')
start Int64

Set first sample of loop. Default is 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

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Manipulate frame metadata.

This filter accepts the following options:

Parameters:

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

Set mode of operation of the filter. Can be one of the following: @end table

Default('select')
key String

Set key used with all modes. Must be set for all modes except print and delete.

Default(None)
value String

Set metadata value which will be used. This option is mandatory for modify and add mode.

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

Which function to use when comparing metadata value and value. Can be one of following: @end table

Default('same_str')
expr String

Set expression which is used when function is set to expr. The expression is evaluated through the eval API and can contain the following constants: @end table

Default(None)
file String

If specified in print mode, output is written to the named file. Instead of plain filename any writable url can be specified. Filename ``-'' is a shorthand for standard output. If file option is not set, output is written to the log with AV_LOG_INFO loglevel.

Default(None)
direct Boolean

Reduces buffering in print mode when output is written to a URL set using file.

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 first audio stream with second audio stream and store result in output audio stream. Multiplication is done by multiplying each sample from first stream with sample at same position from second stream.

With this element-wise multiplication one can create amplitude fades and amplitude modulations.

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> FilterNode

High-order parametric multiband equalizer for each channel.

It accepts the following parameters:

Parameters:

Name Type Description Default
params String

This option string is in format: "cchn f=cf w=w g=g t=f | ..." Each equalizer band is separated by '|'. @end table

Default('')
curves Boolean

With this option activated frequency response of anequalizer is displayed in video stream.

Default('false')
size Image_size

Set video stream size. Only useful if curves option is activated.

Default('hd720')
mgain Double

Set max gain that will be displayed. Only useful if curves option is activated. Setting this to a reasonable value makes it possible to display gain which is derived from neighbour bands which are too close to each other and thus produce higher gain when both are activated.

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

Set frequency scale used to draw frequency response in video output. Can be linear or logarithmic. Default is logarithmic.

Default('log')
colors String

Set color for each channel curve which is going to be displayed in video stream. This is list of color names separated by space or by '|'. Unrecognised or missing colors will be replaced by white color.

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Reduce broadband noise in audio samples using Non-Local Means algorithm.

Each sample is adjusted by looking for other samples with similar contexts. This context similarity is defined by comparing their surrounding patches of size p. Patches are searched in an area of r around the sample.

The filter accepts the following options:

Parameters:

Name Type Description Default
strength Float

Set denoising strength. Allowed range is from 0.00001 to 10000. Default value is 0.00001.

Default('1e-05')
patch Duration

Set patch radius duration. Allowed range is from 1 to 100 milliseconds. Default value is 2 milliseconds.

Default('0.002')
research Duration

Set research radius duration. Allowed range is from 2 to 300 milliseconds. Default value is 6 milliseconds.

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

Set the output mode. It accepts the following values: @end table

Default('o')
smooth Float

Set smooth factor. Default value is 11. Allowed range is from 1 to 1000.

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"] | Default
    ) = Default("o"),
    timeline_options: FFMpegTimelineOption | None = None,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply Normalized Least-Mean-(Squares|Fourth) algorithm to the first audio stream using the second audio stream.

This adaptive filter is used to mimic a desired filter by finding the filter coefficients that relate to producing the least mean square of the error signal (difference between the desired, 2nd input audio stream and the actual signal, the 1st input audio stream).

A description of the accepted options follows.

Parameters:

Name Type Description Default
order Int

Set filter order.

Default('256')
mu Float

Set filter mu.

Default('0.75')
eps Float

Set the filter eps.

Default('1')
leakage Float

Set the filter leakage.

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

It accepts the following values: @end table

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"] | Default
    ) = Default("o"),
    timeline_options: FFMpegTimelineOption | None = None,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply Normalized Least-Mean-(Squares|Fourth) algorithm to the first audio stream using the second audio stream.

This adaptive filter is used to mimic a desired filter by finding the filter coefficients that relate to producing the least mean square of the error signal (difference between the desired, 2nd input audio stream and the actual signal, the 1st input audio stream).

A description of the accepted options follows.

Parameters:

Name Type Description Default
order Int

Set filter order.

Default('256')
mu Float

Set filter mu.

Default('0.75')
eps Float

Set the filter eps.

Default('1')
leakage Float

Set the filter leakage.

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

It accepts the following values: @end table

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 audio 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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Pad the end of an audio stream with silence.

This can be used together with ffmpeg -shortest to extend audio streams to the same length as the video stream.

A description of the accepted options follows.

Parameters:

Name Type Description Default
packet_size Int

Set silence packet size. Default value is 4096.

Default('4096')
pad_len Int64

Set the number of samples of silence to add to the end. After the value is reached, the stream is terminated. This option is mutually exclusive with whole_len.

Default('-1')
whole_len Int64

Set the minimum total number of samples in the output audio stream. If the value is longer than the input audio length, silence is added to the end, until the value is reached. This option is mutually exclusive with pad_len.

Default('-1')
pad_dur Duration

Specify the duration of samples of silence to add. See the Time duration section in the ffmpeg-utils(1) manual for the accepted syntax. Used only if set to non-negative value.

Default('-0.000001')
whole_dur Duration

Specify the minimum total duration in the output audio stream. See the Time duration section in the ffmpeg-utils(1) manual for the accepted syntax. Used only if set to non-negative value. If the value is longer than the input audio length, silence is added to the end, until the value is reached. This option is mutually exclusive with pad_dur

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Set read/write permissions for the output frames.

These filters are mainly aimed at developers to test direct path in the following filter in the filtergraph.

The filters accept the following options:

Parameters:

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

Select the permissions mode. It accepts the following values: @end table

Default('none')
seed Int64

Set the seed for the random mode, must be an integer included between 0 and UINT32_MAX. If not specified, or if explicitly set to -1, the filter will try to use a good random seed on a best effort basis.

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

Measures phase of input audio, which is exported as metadata lavfi.aphasemeter.phase, representing mean phase of current audio frame. A video output can also be produced and is enabled by default. The audio is passed through as first output.

Audio will be rematrixed to stereo if it has a different channel layout. Phase value is in range [-1, 1] where -1 means left and right channels are completely out of phase and 1 means channels are in phase.

The filter accepts the following options, all related to its video output:

Parameters:

Name Type Description Default
rate Video_rate

Set the output frame rate. Default value is 25.

Default('25')
size Image_size

Set the video size for the output. For the syntax of this option, check the "Video size" section in the ffmpeg-utils manual. Default value is 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

Specify the red, green, blue contrast. Default values are 2, 7 and 1. Allowed range is [0, 255].

Default('1')
mpc String

Set color which will be used for drawing median phase. If color is none which is default, no median phase value will be drawn.

Default('none')
video Boolean

Enable video output. Default is enabled.

Default('true')
phasing Boolean

Enable mono and out of phase detection. Default is disabled.

Default('false')
tolerance Float

Set phase tolerance for mono detection, in amplitude ratio. Default is 0. Allowed range is [0, 1].

Default('0')
angle Float

Set angle threshold for out of phase detection, in degree. Default is 170. Allowed range is [90, 180].

Default('170')
duration Duration

Set mono or out of phase duration until notification, expressed in seconds. Default is 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 input audio.

A phaser filter creates series of peaks and troughs in the frequency spectrum. The position of the peaks and troughs are modulated so that they vary over time, creating a sweeping effect.

A description of the accepted parameters follows.

Parameters:

Name Type Description Default
in_gain Double

Set input gain. Default is 0.4.

Default('0.4')
out_gain Double

Set output gain. Default is 0.74

Default('0.74')
delay Double

Set delay in milliseconds. Default is 3.0.

Default('3')
decay Double

Set decay. Default is 0.4.

Default('0.4')
speed Double

Set modulation speed in Hz. Default is 0.5.

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

Set modulation type. Default is triangular. It accepts the following values: @end table

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply phase shift to input audio samples.

The filter accepts the following options:

Parameters:

Name Type Description Default
shift Double

Specify phase shift. Allowed range is from -1.0 to 1.0. Default value is 0.0.

Default('0')
level Double

Set output gain applied to final output. Allowed range is from 0.0 to 1.0. Default value is 1.0.

Default('1')
order Int

Set filter order used for filtering. Allowed range is from 1 to 16. Default value is 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

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply Psychoacoustic clipper to input audio stream.

The filter accepts the following options:

Parameters:

Name Type Description Default
level_in Double

Set input gain. By default it is 1. Range is [0.015625 - 64].

Default('1')
level_out Double

Set output gain. By default it is 1. Range is [0.015625 - 64].

Default('1')
clip Double

Set the clipping start value. Default value is 0dBFS or 1.

Default('1')
diff Boolean

Output only difference samples, useful to hear introduced distortions. By default is disabled.

Default('false')
adaptive Double

Set strength of adaptive distortion applied. Default value is 0.5. Allowed range is from 0 to 1.

Default('0.5')
iterations Int

Set number of iterations of psychoacoustic clipper. Allowed range is from 1 to 20. Default value is 10.

Default('10')
level Boolean

Auto level output signal. Default is disabled. This normalizes audio back to 0dBFS if enabled.

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 is something between an autopanner and a tremolo. But it can produce funny stereo effects as well. Pulsator changes the volume of the left and right channel based on a LFO (low frequency oscillator) with different waveforms and shifted phases. This filter have the ability to define an offset between left and right channel. An offset of 0 means that both LFO shapes match each other. The left and right channel are altered equally - a conventional tremolo. An offset of 50% means that the shape of the right channel is exactly shifted in phase (or moved backwards about half of the frequency) - pulsator acts as an autopanner. At 1 both curves match again. Every setting in between moves the phase shift gapless between all stages and produces some "bypassing" sounds with sine and triangle waveforms. The more you set the offset near 1 (starting from the 0.5) the faster the signal passes from the left to the right speaker.

The filter accepts the following options:

Parameters:

Name Type Description Default
level_in Double

Set input gain. By default it is 1. Range is [0.015625 - 64].

Default('1')
level_out Double

Set output gain. By default it is 1. Range is [0.015625 - 64].

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

Set waveform shape the LFO will use. Can be one of: sine, triangle, square, sawup or sawdown. Default is sine.

Default('sine')
amount Double

Set modulation. Define how much of original signal is affected by the LFO.

Default('1')
offset_l Double

Set left channel offset. Default is 0. Allowed range is [0 - 1].

Default('0')
offset_r Double

Set right channel offset. Default is 0.5. Allowed range is [0 - 1].

Default('0.5')
width Double

Set pulse width. Default is 1. Allowed range is [0 - 2].

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

Set possible timing mode. Can be one of: bpm, ms or hz. Default is hz.

Default('hz')
bpm Double

Set bpm. Default is 120. Allowed range is [30 - 300]. Only used if timing is set to bpm.

Default('120')
ms Int

Set ms. Default is 500. Allowed range is [10 - 2000]. Only used if timing is set to ms.

Default('500')
hz Double

Set frequency in Hz. Default is 2. Allowed range is [0.01 - 100]. Only used if timing is set to hz.

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 real time approximately.

These filters will pause the filtering for a variable amount of time to match the output rate with the input timestamps. They are similar to the re option to ffmpeg.

They accept the following options:

Parameters:

Name Type Description Default
limit Duration

Time limit for the pauses. Any pause longer than that will be considered a timestamp discontinuity and reset the timer. Default is 2 seconds.

Default('2')
speed Double

Speed factor for processing. The value must be a float larger than zero. Values larger than 1.0 will result in faster than realtime processing, smaller will slow processing down. The limit is automatically adapted accordingly. Default is 1.0. A processing speed faster than what is possible without these filters cannot be achieved.

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 the input audio to the specified parameters, using the libswresample library. If none are specified then the filter will automatically convert between its input and output.

This filter is also able to stretch/squeeze the audio data to make it match the timestamps or to inject silence / cut out audio to make it match the timestamps, do a combination of both or do neither.

The filter accepts the syntax [sample_rate:]resampler_options, where sample_rate expresses a sample rate and resampler_options is a list of key=value pairs, separated by ":". See the "Resampler Options" section in the ffmpeg-resampler(1) manual for the complete list of supported options.

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.

Warning: This filter requires memory to buffer the entire clip, so trimming is suggested.

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

arnndn

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

Reduce noise from speech using Recurrent Neural Networks.

This filter accepts the following options:

Parameters:

Name Type Description Default
model String

Set train model file to load. This option is always required.

Default(None)
mix Float

Set how much to mix filtered samples into final output. Allowed range is from -1 to 1. Default value is 1. Negative values are special, they set how much to keep filtered noise in the final filter output. Set this option to -1 to hear actual noise removed from input signal.

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,
    extra_options: dict[str, Any] | None = None,
) -> AudioStream

Measure Audio Signal-to-Distortion Ratio.

This filter takes two audio streams for input, and outputs first audio stream. Results are in dB per channel at end of either input.

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

asegment

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

Split single input stream into multiple streams.

This filter does opposite of concat filters.

segment works on video frames, asegment on audio samples.

This filter accepts the following options:

Parameters:

Name Type Description Default
timestamps String

Timestamps of output segments separated by '|'. The first segment will run from the beginning of the input stream. The last segment will run until the end of the input stream

Default(None)
samples String

Exact frame/sample count to split the segments.

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 frames to pass in output.

This filter accepts the following options:

Parameters:

Name Type Description Default
expr String

Set expression, which is evaluated for each input frame. If the expression is evaluated to zero, the frame is discarded. If the evaluation result is negative or NaN, the frame is sent to the first output; otherwise it is sent to the output with index ceil(val)-1, assuming that the input index starts from 0. For example a value of 1.2 corresponds to the output with index ceil(1.2)-1 = 2-1 = 1, that is the second output.

Default('1')
outputs Int

Set the number of outputs. The output to which to send the selected frame is based on the result of the evaluation. Default value is 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 in the filtergraph.

These filters read commands to be sent to other filters in the filtergraph.

sendcmd must be inserted between two video filters, asendcmd must be inserted between two audio filters, but apart from that they act the same way.

The specification of commands can be provided in the filter arguments with the commands option, or in a file specified by the filename option.

These filters accept the following options:

Parameters:

Name Type Description Default
commands String

Set the commands to be read and sent to the other filters.

Default(None)
filename String

Set the filename of the commands to be read and sent to the other filters.

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"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Set the number of samples per each output audio frame.

The last output packet may contain a different number of samples, as the filter will flush all the remaining samples when the input audio signals its end.

The filter accepts the following options:

Parameters:

Name Type Description Default
nb_out_samples Int

Set the number of frames per each output audio frame. The number is intended as the number of samples per each channel. Default value is 1024.

Default('1024')
pad Boolean

If set to 1, the filter will pad the last audio frame with zeroes, so that the last frame will contain the same number of samples as the previous ones. Default value is 1.

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

asetpts

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

Change the PTS (presentation timestamp) of the input frames.

setpts works on video frames, asetpts on audio frames.

This filter accepts the following options:

Parameters:

Name Type Description Default
expr String

The expression which is evaluated for each frame to construct its timestamp.

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

Set the sample rate without altering the PCM data. This will result in a change of speed and pitch.

The filter accepts the following options:

Parameters:

Name Type Description Default
sample_rate Int

Set the output sample rate. Default is 44100 Hz.

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 the timebase to use for the output frames timestamps. It is mainly useful for testing timebase configuration.

It accepts the following parameters:

Parameters:

Name Type Description Default
expr String

The expression which is evaluated into the output timebase.

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 a line containing various information for each input audio frame. The input audio is not modified.

The shown line contains a sequence of key/value pairs of the form key:value.

The following values are shown in 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

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Delete frame side data, or select frames based on it.

This filter accepts the following options:

Parameters:

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

Set mode of operation of the filter. Can be one of the following: @end table

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 used with all modes. Must be set for select mode. For the list of frame side data types, refer to the AVFrameSideDataType enum in libavutil/frame.h. For example, to choose AV_FRAME_DATA_PANSCAN side data, you must specify PANSCAN.

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

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply audio soft clipping.

Soft clipping is a type of distortion effect where the amplitude of a signal is saturated along a smooth curve, rather than the abrupt shape of hard-clipping.

This filter accepts the following options:

Parameters:

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

Set type of soft-clipping. It accepts the following values: @end table

Default('tanh')
threshold Double

Set threshold from where to start clipping. Default value is 0dB or 1.

Default('1')
output Double

Set gain applied to output. Default value is 0dB or 1.

Default('1')
param Double

Set additional parameter which controls sigmoid function.

Default('1')
oversample Int

Set oversampling factor.

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",
        ]
        | Default
    ) = Default("hann"),
    overlap: Float = Default("0.5"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Display frequency domain statistical information about the audio channels. Statistics are calculated and stored as metadata for each audio channel and for each audio frame.

It accepts the following option:

Parameters:

Name Type Description Default
win_size Int

Set the window length in samples. Default value is 2048. Allowed range is from 32 to 65536.

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'] | Default

Set window function. It accepts the following values: @end table Default is hann.

Default('hann')
overlap Float

Set window overlap. Allowed range is from 0 to 1. Default value is 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

asplit

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

Split input into several identical outputs.

asplit works with audio input, split with video.

The filter accepts a single parameter which specifies the number of outputs. If unspecified, it defaults to 2.

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

astats

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

Display time domain statistical information about the audio channels. Statistics are calculated and displayed for each audio channel and, where applicable, an overall figure is also given.

It accepts the following option:

Parameters:

Name Type Description Default
length Double

Short window length in seconds, used for peak and trough RMS measurement. Default is 0.05 (50 milliseconds). Allowed range is [0 - 10].

Default('0.05')
metadata Boolean

Set metadata injection. All the metadata keys are prefixed with lavfi.astats.X, where X is channel number starting from 1 or string Overall. Default is disabled. Available keys for each channel are: DC_offset Min_level Max_level Min_difference Max_difference Mean_difference RMS_difference Peak_level RMS_peak RMS_trough Crest_factor Flat_factor Peak_count Noise_floor Noise_floor_count Entropy Bit_depth Dynamic_range Zero_crossings Zero_crossings_rate Number_of_NaNs Number_of_Infs Number_of_denormals and for Overall: DC_offset Min_level Max_level Min_difference Max_difference Mean_difference RMS_difference Peak_level RMS_level RMS_peak RMS_trough Flat_factor Peak_count Noise_floor Noise_floor_count Entropy Bit_depth Number_of_samples Number_of_NaNs Number_of_Infs Number_of_denormals For example full key look like this lavfi.astats.1.DC_offset or this lavfi.astats.Overall.Peak_count. For description what each key means read below.

Default('false')
reset Int

Set the number of frames over which cumulative stats are calculated before being reset Default is disabled.

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

Select the parameters which are measured per channel. The metadata keys can be used as flags, default is all which measures everything. none disables all per channel measurement.

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

Select the parameters which are measured overall. The metadata keys can be used as flags, default is all which measures everything. none disables all overall measurement.

Default('all+DC_offset+Min_level+Max_level+Min_difference+Max_difference+Mean_difference+RMS_difference+Peak_level+RMS_level+RMS_peak+RMS_trough+Crest_factor+Flat_factor+Peak_count+Bit_depth+Dynamic_range+Zero_crossings+Zero_crossings_rate+Noise_floor+Noise_floor_count+Entropy+Number_of_samples+Number_of_NaNs+Number_of_Infs+Number_of_denormals')
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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Boost subwoofer frequencies.

The filter accepts the following options:

Parameters:

Name Type Description Default
dry Double

Set dry gain, how much of original signal is kept. Allowed range is from 0 to 1. Default value is 1.0.

Default('1')
wet Double

Set wet gain, how much of filtered signal is kept. Allowed range is from 0 to 1. Default value is 1.0.

Default('1')
boost Double

Set max boost factor. Allowed range is from 1 to 12. Default value is 2.

Default('2')
decay Double

Set delay line decay gain value. Allowed range is from 0 to 1. Default value is 0.0.

Default('0')
feedback Double

Set delay line feedback gain value. Allowed range is from 0 to 1. Default value is 0.9.

Default('0.9')
cutoff Double

Set cutoff frequency in Hertz. Allowed range is 50 to 900. Default value is 100.

Default('100')
slope Double

Set slope amount for cutoff frequency. Allowed range is 0.0001 to 1. Default value is 0.5.

Default('0.5')
delay Double

Set delay. Allowed range is from 1 to 100. Default value is 20.

Default('20')
channels String

Set the channels to process. Default value is all available.

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Cut subwoofer frequencies.

This filter allows to set custom, steeper roll off than highpass filter, and thus is able to more attenuate frequency content in stop-band.

The filter accepts the following options:

Parameters:

Name Type Description Default
cutoff Double

Set cutoff frequency in Hertz. Allowed range is 2 to 200. Default value is 20.

Default('20')
order Int

Set filter order. Available values are from 3 to 20. Default value is 10.

Default('10')
level Double

Set input gain level. Allowed range is from 0 to 1. Default value is 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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Cut super frequencies.

The filter accepts the following options:

Parameters:

Name Type Description Default
cutoff Double

Set cutoff frequency in Hertz. Allowed range is 20000 to 192000. Default value is 20000.

Default('20000')
order Int

Set filter order. Available values are from 3 to 20. Default value is 10.

Default('10')
level Double

Set input gain level. Allowed range is from 0 to 1. Default value is 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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply high order Butterworth band-pass filter.

The filter accepts the following options:

Parameters:

Name Type Description Default
centerf Double

Set center frequency in Hertz. Allowed range is 2 to 999999. Default value is 1000.

Default('1000')
order Int

Set filter order. Available values are from 4 to 20. Default value is 4.

Default('4')
qfactor Double

Set Q-factor. Allowed range is from 0.01 to 100. Default value is 1.

Default('1')
level Double

Set input gain level. Allowed range is from 0 to 2. Default value is 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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply high order Butterworth band-stop filter.

The filter accepts the following options:

Parameters:

Name Type Description Default
centerf Double

Set center frequency in Hertz. Allowed range is 2 to 999999. Default value is 1000.

Default('1000')
order Int

Set filter order. Available values are from 4 to 20. Default value is 4.

Default('4')
qfactor Double

Set Q-factor. Allowed range is from 0.01 to 100. Default value is 1.

Default('1')
level Double

Set input gain level. Allowed range is from 0 to 2. Default value is 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.

The filter accepts exactly one parameter, the audio tempo. If not specified then the filter will assume nominal 1.0 tempo. Tempo must be in the [0.5, 100.0] range.

Note that tempo greater than 2 will skip some samples rather than blend them in. If for any reason this is a concern it is always possible to daisy-chain several instances of atempo to achieve the desired product tempo.

Parameters:

Name Type Description Default
tempo Double

Change filter tempo scale factor. Syntax for the command is : "tempo"

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply spectral tilt filter to audio stream.

This filter apply any spectral roll-off slope over any specified frequency band.

The filter accepts the following options:

Parameters:

Name Type Description Default
freq Double

Set central frequency of tilt in Hz. Default is 10000 Hz.

Default('10000')
slope Double

Set slope direction of tilt. Default is 0. Allowed range is from -1 to 1.

Default('0')
width Double

Set width of tilt. Default is 1000. Allowed range is from 100 to 10000.

Default('1000')
order Int

Set order of tilt filter.

Default('5')
level Double

Set input volume level. Allowed range is from 0 to 4. Defalt is 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

Trim the input so that the output contains one continuous subpart of the input.

It accepts the following parameters:

Parameters:

Name Type Description Default
start Duration

Timestamp (in seconds) of the start of the section to keep. I.e. the audio sample with the timestamp start will be the first sample in the output.

Default('INT64_MAX')
end Duration

Specify time of the first audio sample that will be dropped, i.e. the audio sample immediately preceding the one with the timestamp end will be the last sample in the output.

Default('INT64_MAX')
start_pts Int64

Same as start, except this option sets the start timestamp in samples instead of seconds.

Default('I64_MIN')
end_pts Int64

Same as end, except this option sets the end timestamp in samples instead of seconds.

Default('I64_MIN')
duration Duration

The maximum duration of the output in seconds.

Default('0')
start_sample Int64

The number of the first sample that should be output.

Default('-1')
end_sample Int64

The number of the first sample that should be dropped.

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"] | 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 a video output, representing the audio vector scope.

The filter is used to measure the difference between channels of stereo audio stream. A monaural signal, consisting of identical left and right signal, results in straight vertical line. Any stereo separation is visible as a deviation from this line, creating a Lissajous figure. If the straight (or deviation from it) but horizontal line appears this indicates that the left and right channels are out of phase.

The filter accepts the following options:

Parameters:

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

Set the vectorscope mode. Available values are: @end table Default value is lissajous.

Default('lissajous')
rate Video_rate

Set the output frame rate. Default value is 25.

Default('25')
size Image_size

Set the video size for the output. For the syntax of this option, check the "Video size" section in the ffmpeg-utils manual. Default value is 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

Specify the red, green, blue and alpha contrast. Default values are 40, 160, 80 and 255. Allowed range is [0, 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

Specify the red, green, blue and alpha fade. Default values are 15, 10, 5 and 5. Allowed range is [0, 255].

Default('5')
zoom Double

Set the zoom factor. Default value is 1. Allowed range is [0, 10]. Values lower than 1 will auto adjust zoom factor to maximal possible value.

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

Set the vectorscope drawing mode. Available values are: @end table Default value is dot.

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

Specify amplitude scale of audio samples. Available values are: @end table

Default('lin')
swap Boolean

Swap left channel axis with right channel axis.

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

Mirror axis. @end table

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"] | Default = Default(
        "slow"
    ),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Calculate normalized windowed cross-correlation between two input audio streams.

Resulted samples are always between -1 and 1 inclusive. If result is 1 it means two input samples are highly correlated in that selected segment. Result 0 means they are not correlated at all. If result is -1 it means two input samples are out of phase, which means they cancel each other.

The filter accepts the following options:

Parameters:

Name Type Description Default
size Int

Set size of segment over which cross-correlation is calculated. Default is 256. Allowed range is from 2 to 131072.

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

Set algorithm for cross-correlation. Can be slow or fast. Default is slow. Fast algorithm assumes mean values over any given segment are always zero and thus need much less calculations to make. This is generally not true, but is valid for typical audio streams.

Default('slow')
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 sent through a libzmq client, and forward them to filters in the filtergraph.

zmq and azmq work as a pass-through filters. zmq must be inserted between two video filters, azmq between two audio filters. Both are capable to send messages to any filter type.

To enable these filters you need to install the libzmq library and headers and configure FFmpeg with --enable-libzmq.

For more information about libzmq see: http://www.zeromq.org/

The zmq and azmq filters work as a libzmq server, which receives messages sent through a network interface defined by the bind_address (or the abbreviation "b") option. Default value of this option is tcp://localhost:5555. You may want to alter this value to your needs, but do not forget to escape any ':' signs (see filtergraph escaping).

The received message must be in the form: @example TARGET COMMAND [ARG] @end example

TARGET specifies the target of the command, usually the name of the filter class or a specific filter instance name. The default filter instance name uses the pattern Parsed__, but you can override this by using the filter_name@id syntax (see Filtergraph syntax).

COMMAND specifies the name of the command for the target filter.

ARG is optional and specifies the optional argument list for the given COMMAND.

Upon reception, the message is processed and the corresponding command is injected into the filtergraph. Depending on the result, the filter will send a reply to the client, adopting the format: @example ERROR_CODE ERROR_REASON MESSAGE @end example

MESSAGE is optional.

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply a two-pole Butterworth band-pass filter with central frequency frequency, and (3dB-point) band-width width. The csg option selects a constant skirt gain (peak gain = Q) instead of the default: constant 0dB peak gain. The filter roll off at 6dB per octave (20dB per decade).

The filter accepts the following options:

Parameters:

Name Type Description Default
frequency Double

Change bandpass frequency. Syntax for the command is : "frequency"

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

Change bandpass width_type. Syntax for the command is : "width_type"

Default('q')
width Double

Change bandpass width. Syntax for the command is : "width"

Default('0.5')
csg Boolean

Constant skirt gain if set to 1. Defaults to 0.

Default('false')
mix Double

Change bandpass mix. Syntax for the command is : "mix"

Default('1')
channels String

Specify which channels to filter, by default all available are filtered.

Default('all')
normalize Boolean

Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB.

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

Set transform type of IIR filter. @end table

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

Set precison of filtering. @end table

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply a two-pole Butterworth band-reject filter with central frequency frequency, and (3dB-point) band-width width. The filter roll off at 6dB per octave (20dB per decade).

The filter accepts the following options:

Parameters:

Name Type Description Default
frequency Double

Change bandreject frequency. Syntax for the command is : "frequency"

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

Change bandreject width_type. Syntax for the command is : "width_type"

Default('q')
width Double

Change bandreject width. Syntax for the command is : "width"

Default('0.5')
mix Double

Change bandreject mix. Syntax for the command is : "mix"

Default('1')
channels String

Specify which channels to filter, by default all available are filtered.

Default('all')
normalize Boolean

Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB.

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

Set transform type of IIR filter. @end table

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

Set precison of filtering. @end table

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Boost or cut the bass (lower) frequencies of the audio using a two-pole shelving filter with a response similar to that of a standard hi-fi's tone-controls. This is also known as shelving equalisation (EQ).

The filter accepts the following options:

Parameters:

Name Type Description Default
frequency Double

Change bass frequency. Syntax for the command is : "frequency"

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

Change bass width_type. Syntax for the command is : "width_type"

Default('q')
width Double

Change bass width. Syntax for the command is : "width"

Default('0.5')
gain Double

Change bass gain. Syntax for the command is : "gain"

Default('0')
poles Int

Set number of poles. Default is 2.

Default('2')
mix Double

Change bass mix. Syntax for the command is : "mix"

Default('1')
channels String

Specify which channels to filter, by default all available are filtered.

Default('all')
normalize Boolean

Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB.

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

Set transform type of IIR filter. @end table

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

Set precison of filtering. @end table

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply a biquad IIR filter with the given coefficients. Where b0, b1, b2 and a0, a1, a2 are the numerator and denominator coefficients respectively. and channels, c specify which channels to filter, by default all available are filtered.

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

How much to use filtered signal in output. Default is 1. Range is between 0 and 1.

Default('1')
channels String

Specify which channels to filter, by default all available are filtered.

Default('all')
normalize Boolean

Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB.

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

Set transform type of IIR filter. @end table

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

Set precison of filtering. @end table

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

channelmap

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

Remap input channels to new locations.

It accepts the following parameters:

Parameters:

Name Type Description Default
map String

Map channels from input to output. The argument is a '|'-separated list of mappings, each in the in_channel-out_channel or in_channel form. in_channel can be either the name of the input channel (e.g. FL for front left) or its index in the input channel layout. out_channel is the name of the output channel or its index in the output channel layout. If out_channel is not given then it is implicitly an index, starting with zero and increasing by one for each mapping.

Default(None)
channel_layout String

The channel layout of the output stream.

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 each channel from an input audio stream into a separate output stream.

It accepts the following parameters:

Parameters:

Name Type Description Default
channel_layout String

The channel layout of the input stream. The default is "stereo".

Default('stereo')
channels String

A channel layout describing the channels to be extracted as separate output streams or "all" to extract each input channel as a separate stream. The default is "all". Choosing channels not present in channel layout in the input will result in an error.

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.

Can make a single vocal sound like a chorus, but can also be applied to instrumentation.

Chorus resembles an echo effect with a short delay, but whereas with echo the delay is constant, with chorus, it is varied using using sinusoidal or triangular modulation. The modulation depth defines the range the modulated delay is played before or after the delay. Hence the delayed sound will sound slower or faster, that is the delayed sound tuned around the original one, like in a chorus where some vocals are slightly off key.

It accepts the following parameters:

Parameters:

Name Type Description Default
in_gain Float

Set input gain. Default is 0.4.

Default('0.4')
out_gain Float

Set output gain. Default is 0.4.

Default('0.4')
delays String

Set delays. A typical delay is around 40ms to 60ms.

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 the audio's dynamic range.

It accepts the following parameters:

Parameters:

Name Type Description Default
attacks String

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

Default('0')
decays String

A list of times in seconds for each channel over which the instantaneous level of the input signal is averaged to determine its volume. attacks refers to increase of volume and decays refers to decrease of volume. For most situations, the attack time (response to the audio getting louder) should be shorter than the decay time, because the human ear is more sensitive to sudden loud audio than sudden soft audio. A typical value for attack is 0.3 seconds and a typical value for decay is 0.8 seconds. If specified number of attacks & decays is lower than number of channels, the last set attack/decay will be used for all remaining channels.

Default('0.8')
points String

A list of points for the transfer function, specified in dB relative to the maximum possible signal amplitude. Each key points list must be defined using the following syntax: x0/y0|x1/y1|x2/y2|.... or x0/y0 x1/y1 x2/y2 .... The input values must be in strictly increasing order but the transfer function does not have to be monotonically rising. The point 0/0 is assumed but may be overridden (by 0/out-dBn). Typical values for the transfer function are -70/-70|-60/-20|1/0.

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

Set the curve radius in dB for all joints. It defaults to 0.01.

Default('0.01')
gain Double

Set the additional gain in dB to be applied at all points on the transfer function. This allows for easy adjustment of the overall gain. It defaults to 0.

Default('0')
volume Double

Set an initial volume, in dB, to be assumed for each channel when filtering starts. This permits the user to supply a nominal level initially, so that, for example, a very large gain is not applied to initial signal levels before the companding has begun to operate. A typical value for audio which is initially quiet is -90 dB. It defaults to 0.

Default('0')
delay Double

Set a delay, in seconds. The input audio is analyzed immediately, but audio is delayed before being fed to the volume adjuster. Specifying a delay approximately equal to the attack/decay times allows the filter to effectively operate in predictive rather than reactive mode. It defaults to 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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Compensation Delay Line is a metric based delay to compensate differing positions of microphones or speakers.

For example, you have recorded guitar with two microphones placed in different locations. Because the front of sound wave has fixed speed in normal conditions, the phasing of microphones can vary and depends on their location and interposition. The best sound mix can be achieved when these microphones are in phase (synchronized). Note that a distance of ~30 cm between microphones makes one microphone capture the signal in antiphase to the other microphone. That makes the final mix sound moody. This filter helps to solve phasing problems by adding different delays to each microphone track and make them synchronized.

The best result can be reached when you take one track as base and synchronize other tracks one by one with it. Remember that synchronization/delay tolerance depends on sample rate, too. Higher sample rates will give more tolerance.

The filter accepts the following parameters:

Parameters:

Name Type Description Default
mm Int

Set millimeters distance. This is compensation distance for fine tuning. Default is 0.

Default('0')
cm Int

Set cm distance. This is compensation distance for tightening distance setup. Default is 0.

Default('0')
m Int

Set meters distance. This is compensation distance for hard distance setup. Default is 0.

Default('0')
dry Double

Set dry amount. Amount of unprocessed (dry) signal. Default is 0.

Default('0')
wet Double

Set wet amount. Amount of processed (wet) signal. Default is 1.

Default('1')
temp Int

Set temperature in degrees Celsius. This is the temperature of the environment. Default is 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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply headphone crossfeed filter.

Crossfeed is the process of blending the left and right channels of stereo audio recording. It is mainly used to reduce extreme stereo separation of low frequencies.

The intent is to produce more speaker like sound to the listener.

The filter accepts the following options:

Parameters:

Name Type Description Default
strength Double

Set strength of crossfeed. Default is 0.2. Allowed range is from 0 to 1. This sets gain of low shelf filter for side part of stereo image. Default is -6dB. Max allowed is -30db when strength is set to 1.

Default('0.2')
range Double

Set soundstage wideness. Default is 0.5. Allowed range is from 0 to 1. This sets cut off frequency of low shelf filter. Default is cut off near 1550 Hz. With range set to 1 cut off frequency is set to 2100 Hz.

Default('0.5')
slope Double

Set curve slope of low shelf filter. Default is 0.5. Allowed range is from 0.01 to 1.

Default('0.5')
level_in Double

Set input gain. Default is 0.9.

Default('0.9')
level_out Double

Set output gain. Default is 1.

Default('1')
block_size Int

Set block size used for reverse IIR processing. If this value is set to high enough value (higher than impulse response length truncated when reaches near zero values) filtering will become linear phase otherwise if not big enough it will just produce nasty artifacts. Note that filter delay will be exactly this many samples when set to non-zero value.

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Simple algorithm for audio noise sharpening.

This filter linearly increases differences betweeen each audio sample.

The filter accepts the following options:

Parameters:

Name Type Description Default
i Float

Sets the intensity of effect (default: 2.0). Must be in range between -10.0 to 0 (unchanged sound) to 10.0 (maximum effect). To inverse filtering use negative value.

Default('2')
c Boolean

Enable clipping. By default is enabled.

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply a DC shift to the audio.

This can be useful to remove a DC offset (caused perhaps by a hardware problem in the recording chain) from the audio. The effect of a DC offset is reduced headroom and hence volume. The astats filter can be used to determine if a signal has a DC offset.

Parameters:

Name Type Description Default
shift Double

Set the DC shift, allowed range is [-1, 1]. It indicates the amount to shift the audio.

Default('0')
limitergain Double

Optional. It should have a value much less than 1 (e.g. 0.05 or 0.02) and is used to prevent clipping.

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply de-essing to the audio samples.

Parameters:

Name Type Description Default
i Double

Set intensity for triggering de-essing. Allowed range is from 0 to 1. Default is 0.

Default('0')
m Double

Set amount of ducking on treble part of sound. Allowed range is from 0 to 1. Default is 0.5.

Default('0.5')
f Double

How much of original frequency content to keep when de-essing. Allowed range is from 0 to 1. Default is 0.5.

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

Set the output mode. It accepts the following values: @end table

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Enhance dialogue in stereo audio.

This filter accepts stereo input and produce surround (3.0) channels output. The newly produced front center channel have enhanced speech dialogue originally available in both stereo channels. This filter outputs front left and front right channels same as available in stereo input.

The filter accepts the following options:

Parameters:

Name Type Description Default
original Double

Set the original center factor to keep in front center channel output. Allowed range is from 0 to 1. Default value is 1.

Default('1')
enhance Double

Set the dialogue enhance factor to put in front center channel output. Allowed range is from 0 to 3. Default value is 1.

Default('1')
voice Double

Set the voice detection factor. Allowed range is from 2 to 32. Default value is 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.

DR values of 14 and higher is found in very dynamic material. DR of 8 to 13 is found in transition material. And anything less that 8 have very poor dynamics and is very compressed.

The filter accepts the following options:

Parameters:

Name Type Description Default
length Double

Set window length in seconds used to split audio into segments of equal length. Default is 3 seconds.

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"),
    timeline_options: FFMpegTimelineOption | None = None,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Dynamic Audio Normalizer.

This filter applies a certain amount of gain to the input audio in order to bring its peak magnitude to a target level (e.g. 0 dBFS). However, in contrast to more "simple" normalization algorithms, the Dynamic Audio Normalizer dynamically re-adjusts the gain factor to the input audio. This allows for applying extra gain to the "quiet" sections of the audio while avoiding distortions or clipping the "loud" sections. In other words: The Dynamic Audio Normalizer will "even out" the volume of quiet and loud sections, in the sense that the volume of each section is brought to the same target level. Note, however, that the Dynamic Audio Normalizer achieves this goal without applying "dynamic range compressing". It will retain 100% of the dynamic range within each section of the audio file.

Parameters:

Name Type Description Default
framelen Int

Set the frame length in milliseconds. In range from 10 to 8000 milliseconds. Default is 500 milliseconds. The Dynamic Audio Normalizer processes the input audio in small chunks, referred to as frames. This is required, because a peak magnitude has no meaning for just a single sample value. Instead, we need to determine the peak magnitude for a contiguous sequence of sample values. While a "standard" normalizer would simply use the peak magnitude of the complete file, the Dynamic Audio Normalizer determines the peak magnitude individually for each frame. The length of a frame is specified in milliseconds. By default, the Dynamic Audio Normalizer uses a frame length of 500 milliseconds, which has been found to give good results with most files. Note that the exact frame length, in number of samples, will be determined automatically, based on the sampling rate of the individual input audio file.

Default('500')
gausssize Int

Set the Gaussian filter window size. In range from 3 to 301, must be odd number. Default is 31. Probably the most important parameter of the Dynamic Audio Normalizer is the window size of the Gaussian smoothing filter. The filter's window size is specified in frames, centered around the current frame. For the sake of simplicity, this must be an odd number. Consequently, the default value of 31 takes into account the current frame, as well as the 15 preceding frames and the 15 subsequent frames. Using a larger window results in a stronger smoothing effect and thus in less gain variation, i.e. slower gain adaptation. Conversely, using a smaller window results in a weaker smoothing effect and thus in more gain variation, i.e. faster gain adaptation. In other words, the more you increase this value, the more the Dynamic Audio Normalizer will behave like a "traditional" normalization filter. On the contrary, the more you decrease this value, the more the Dynamic Audio Normalizer will behave like a dynamic range compressor.

Default('31')
peak Double

Set the target peak value. This specifies the highest permissible magnitude level for the normalized audio input. This filter will try to approach the target peak magnitude as closely as possible, but at the same time it also makes sure that the normalized signal will never exceed the peak magnitude. A frame's maximum local gain factor is imposed directly by the target peak magnitude. The default value is 0.95 and thus leaves a headroom of 5%*. It is not recommended to go above this value.

Default('0.95')
maxgain Double

Set the maximum gain factor. In range from 1.0 to 100.0. Default is 10.0. The Dynamic Audio Normalizer determines the maximum possible (local) gain factor for each input frame, i.e. the maximum gain factor that does not result in clipping or distortion. The maximum gain factor is determined by the frame's highest magnitude sample. However, the Dynamic Audio Normalizer additionally bounds the frame's maximum gain factor by a predetermined (global) maximum gain factor. This is done in order to avoid excessive gain factors in "silent" or almost silent frames. By default, the maximum gain factor is 10.0, For most inputs the default value should be sufficient and it usually is not recommended to increase this value. Though, for input with an extremely low overall volume level, it may be necessary to allow even higher gain factors. Note, however, that the Dynamic Audio Normalizer does not simply apply a "hard" threshold (i.e. cut off values above the threshold). Instead, a "sigmoid" threshold function will be applied. This way, the gain factors will smoothly approach the threshold value, but never exceed that value.

Default('10')
targetrms Double

Set the target RMS. In range from 0.0 to 1.0. Default is 0.0 - disabled. By default, the Dynamic Audio Normalizer performs "peak" normalization. This means that the maximum local gain factor for each frame is defined (only) by the frame's highest magnitude sample. This way, the samples can be amplified as much as possible without exceeding the maximum signal level, i.e. without clipping. Optionally, however, the Dynamic Audio Normalizer can also take into account the frame's root mean square, abbreviated RMS. In electrical engineering, the RMS is commonly used to determine the power of a time-varying signal. It is therefore considered that the RMS is a better approximation of the "perceived loudness" than just looking at the signal's peak magnitude. Consequently, by adjusting all frames to a constant RMS value, a uniform "perceived loudness" can be established. If a target RMS value has been specified, a frame's local gain factor is defined as the factor that would result in exactly that RMS value. Note, however, that the maximum local gain factor is still restricted by the frame's highest magnitude sample, in order to prevent clipping.

Default('0')
coupling Boolean

Enable channels coupling. By default is enabled. By default, the Dynamic Audio Normalizer will amplify all channels by the same amount. This means the same gain factor will be applied to all channels, i.e. the maximum possible gain factor is determined by the "loudest" channel. However, in some recordings, it may happen that the volume of the different channels is uneven, e.g. one channel may be "quieter" than the other one(s). In this case, this option can be used to disable the channel coupling. This way, the gain factor will be determined independently for each channel, depending only on the individual channel's highest magnitude sample. This allows for harmonizing the volume of the different channels.

Default('true')
correctdc Boolean

Enable DC bias correction. By default is disabled. An audio signal (in the time domain) is a sequence of sample values. In the Dynamic Audio Normalizer these sample values are represented in the -1.0 to 1.0 range, regardless of the original input format. Normally, the audio signal, or "waveform", should be centered around the zero point. That means if we calculate the mean value of all samples in a file, or in a single frame, then the result should be 0.0 or at least very close to that value. If, however, there is a significant deviation of the mean value from 0.0, in either positive or negative direction, this is referred to as a DC bias or DC offset. Since a DC bias is clearly undesirable, the Dynamic Audio Normalizer provides optional DC bias correction. With DC bias correction enabled, the Dynamic Audio Normalizer will determine the mean value, or "DC correction" offset, of each input frame and subtract that value from all of the frame's sample values which ensures those samples are centered around 0.0 again. Also, in order to avoid "gaps" at the frame boundaries, the DC correction offset values will be interpolated smoothly between neighbouring frames.

Default('false')
altboundary Boolean

Enable alternative boundary mode. By default is disabled. The Dynamic Audio Normalizer takes into account a certain neighbourhood around each frame. This includes the preceding frames as well as the subsequent frames. However, for the "boundary" frames, located at the very beginning and at the very end of the audio file, not all neighbouring frames are available. In particular, for the first few frames in the audio file, the preceding frames are not known. And, similarly, for the last few frames in the audio file, the subsequent frames are not known. Thus, the question arises which gain factors should be assumed for the missing frames in the "boundary" region. The Dynamic Audio Normalizer implements two modes to deal with this situation. The default boundary mode assumes a gain factor of exactly 1.0 for the missing frames, resulting in a smooth "fade in" and "fade out" at the beginning and at the end of the input, respectively.

Default('false')
compress Double

Set the compress factor. In range from 0.0 to 30.0. Default is 0.0. By default, the Dynamic Audio Normalizer does not apply "traditional" compression. This means that signal peaks will not be pruned and thus the full dynamic range will be retained within each local neighbourhood. However, in some cases it may be desirable to combine the Dynamic Audio Normalizer's normalization algorithm with a more "traditional" compression. For this purpose, the Dynamic Audio Normalizer provides an optional compression (thresholding) function. If (and only if) the compression feature is enabled, all input frames will be processed by a soft knee thresholding function prior to the actual normalization process. Put simply, the thresholding function is going to prune all samples whose magnitude exceeds a certain threshold value. However, the Dynamic Audio Normalizer does not simply apply a fixed threshold value. Instead, the threshold value will be adjusted for each individual frame. In general, smaller parameters result in stronger compression, and vice versa. Values below 3.0 are not recommended, because audible distortion may appear.

Default('0')
threshold Double

Set the target threshold value. This specifies the lowest permissible magnitude level for the audio input which will be normalized. If input frame volume is above this value frame will be normalized. Otherwise frame may not be normalized at all. The default value is set to 0, which means all input frames will be normalized. This option is mostly useful if digital noise is not wanted to be amplified.

Default('0')
channels String

Specify which channels to filter, by default all available channels are filtered.

Default('all')
overlap Double

Specify overlap for frames. If set to 0 (default) no frame overlapping is done. Using >0 and <1 values will make less conservative gain adjustments, like when framelen option is set to smaller value, if framelen option value is compensated for non-zero overlap then gain adjustments will be smoother across time compared to zero overlap case.

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

earwax

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

Make audio easier to listen to on headphones.

This filter adds `cues' to 44.1kHz stereo (i.e. audio CD format) audio so that when listened to on headphones the stereo image is moved from inside your head (standard for headphones) to outside and in front of the listener (standard for speakers).

Ported from SoX.

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["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"),
    extra_options: dict[str, Any] | None = None
) -> FilterNode

EBU R128 scanner filter. This filter takes an audio stream and analyzes its loudness level. By default, it logs a message at a frequency of 10Hz with the Momentary loudness (identified by M), Short-term loudness (S), Integrated loudness (I) and Loudness Range (LRA).

The filter can only analyze streams which have sample format is double-precision floating point. The input stream will be converted to this specification, if needed. Users may need to insert aformat and/or aresample filters after this filter to obtain the original parameters.

The filter also has a video output (see the video option) with a real time graph to observe the loudness evolution. The graphic contains the logged message mentioned above, so it is not printed anymore when this option is set, unless the verbose logging is set. The main graphing area contains the short-term loudness (3 seconds of analysis), and the gauge on the right is for the momentary loudness (400 milliseconds), but can optionally be configured to instead display short-term loudness (see gauge).

The green area marks a +/- 1LU target range around the target loudness (-23LUFS by default, unless modified through target).

More information about the Loudness Recommendation EBU R128 on http://tech.ebu.ch/loudness.

The filter accepts the following options:

Parameters:

Name Type Description Default
video Boolean

Activate the video output. The audio stream is passed unchanged whether this option is set or no. The video stream will be the first output stream if activated. Default is 0.

Default('false')
size Image_size

Set the video size. This option is for video only. For the syntax of this option, check the "Video size" section in the ffmpeg-utils manual. Default and minimum resolution is 640x480.

Default('640x480')
meter Int

Set the EBU scale meter. Default is 9. Common values are 9 and 18, respectively for EBU scale meter +9 and EBU scale meter +18. Any other integer value between this range is allowed.

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

Force the frame logging level. Available values are: @end table By default, the logging level is set to info. If the video or the metadata options are set, it switches to verbose.

Default('-1')
metadata Boolean

Set metadata injection. If set to 1, the audio input will be segmented into 100ms output frames, each of them containing various loudness information in metadata. All the metadata keys are prefixed with lavfi.r128.. Default is 0.

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

Set peak mode(s). Available modes can be cumulated (the option is a flag type). Possible values are: @end table

Default('0')
dualmono Boolean

Treat mono input files as "dual mono". If a mono file is intended for playback on a stereo system, its EBU R128 measurement will be perceptually incorrect. If set to true, this option will compensate for this effect. Multi-channel input files are not affected by this option.

Default('false')
panlaw Double

Set a specific pan law to be used for the measurement of dual mono files. This parameter is optional, and has a default value of -3.01dB.

Default('-3.0103')
target Int

Set a specific target level (in LUFS) used as relative zero in the visualization. This parameter is optional and has a default value of -23LUFS as specified by EBU R128. However, material published online may prefer a level of -16LUFS (e.g. for use with podcasts or video platforms).

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

Set the value displayed by the gauge. Valid values are momentary and s shortterm. By default the momentary value will be used, but in certain scenarios it may be more useful to observe the short term value instead (e.g. live mixing).

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

Sets the display scale for the loudness. Valid parameters are absolute (in LUFS) or relative (LU) relative to the target. This only affects the video output, not the summary or continuous log output.

Default('absolute')
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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply a two-pole peaking equalisation (EQ) filter. With this filter, the signal-level at and around a selected frequency can be increased or decreased, whilst (unlike bandpass and bandreject filters) that at all other frequencies is unchanged.

In order to produce complex equalisation curves, this filter can be given several times, each with a different central frequency.

The filter accepts the following options:

Parameters:

Name Type Description Default
frequency Double

Change equalizer frequency. Syntax for the command is : "frequency"

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

Change equalizer width_type. Syntax for the command is : "width_type"

Default('q')
width Double

Change equalizer width. Syntax for the command is : "width"

Default('1')
gain Double

Change equalizer gain. Syntax for the command is : "gain"

Default('0')
mix Double

Change equalizer mix. Syntax for the command is : "mix"

Default('1')
channels String

Specify which channels to filter, by default all available are filtered.

Default('all')
normalize Boolean

Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB.

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

Set transform type of IIR filter. @end table

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

Set precison of filtering. @end table

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Linearly increases the difference between left and right channels which adds some sort of "live" effect to playback.

The filter accepts the following options:

Parameters:

Name Type Description Default
m Float

Sets the difference coefficient (default: 2.5). 0.0 means mono sound (average of both channels), with 1.0 sound will be unchanged, with -1.0 left and right channels will be swapped.

Default('2.5')
c Boolean

Enable clipping. By default is enabled.

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

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

Apply FIR Equalization using arbitrary frequency response.

The filter accepts the following option:

Parameters:

Name Type Description Default
gain String

Set gain curve equation (in dB). The expression can contain variables: @end table and functions: @end table This option is also available as command. Default is gain_interpolate(f).

Default('gain_interpolate(f)')
gain_entry String

Set gain entry for gain_interpolate function. The expression can contain functions: @end table This option is also available as command.

Default(None)
delay Double

Set filter delay in seconds. Higher value means more accurate. Default is 0.01.

Default('0.01')
accuracy Double

Set filter accuracy in Hz. Lower value means more accurate. Default is 5.

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

Set window function. Acceptable values are: @end table

Default('hann')
fixed Boolean

If enabled, use fixed number of audio samples. This improves speed when filtering with large delay. Default is disabled.

Default('false')
multi Boolean

Enable multichannels evaluation on gain. Default is disabled.

Default('false')
zero_phase Boolean

Enable zero phase mode by subtracting timestamp to compensate delay. Default is disabled.

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

Set scale used by gain. Acceptable values are: @end table

Default('linlog')
dumpfile String

Set file for dumping, suitable for gnuplot.

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

Set scale for dumpfile. Acceptable values are same with scale option. Default is linlog.

Default('linlog')
fft2 Boolean

Enable 2-channel convolution using complex FFT. This improves speed significantly. Default is disabled.

Default('false')
min_phase Boolean

Enable minimum phase impulse response. Default is disabled.

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.

The filter accepts the following options:

Parameters:

Name Type Description Default
delay Double

Set base delay in milliseconds. Range from 0 to 30. Default value is 0.

Default('0')
depth Double

Set added sweep delay in milliseconds. Range from 0 to 10. Default value is 2.

Default('2')
regen Double

Set percentage regeneration (delayed signal feedback). Range from -95 to 95. Default value is 0.

Default('0')
width Double

Set percentage of delayed signal mixed with original. Range from 0 to 100. Default value is 71.

Default('71')
speed Double

Set sweeps per second (Hz). Range from 0.1 to 10. Default value is 0.5.

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

Set swept wave shape, can be triangular or sinusoidal. Default value is sinusoidal.

Default('sinusoidal')
phase Double

Set swept wave percentage-shift for multi channel. Range from 0 to 100. Default value is 25.

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

Set delay-line interpolation, linear or quadratic. Default is 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 effect to audio.

Note that this makes most sense to apply on mono signals. With this filter applied to mono signals it give some directionality and stretches its stereo image.

The filter accepts the following options:

Parameters:

Name Type Description Default
level_in Double

Set input level. By default is 1, or 0dB

Default('1')
level_out Double

Set output level. By default is 1, or 0dB.

Default('1')
side_gain Double

Set gain applied to side part of signal. By default is 1.

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

Set kind of middle source. Can be one of the following: @end table

Default('mid')
middle_phase Boolean

Change middle phase. By default is disabled.

Default('false')
left_delay Double

Set left channel delay. By default is 2.05 milliseconds.

Default('2.05')
left_balance Double

Set left channel balance. By default is -1.

Default('-1')
left_gain Double

Set left channel gain. By default is 1.

Default('1')
left_phase Boolean

Change left phase. By default is disabled.

Default('false')
right_delay Double

Set right channel delay. By defaults is 2.12 milliseconds.

Default('2.12')
right_balance Double

Set right channel balance. By default is 1.

Default('1')
right_gain Double

Set right channel gain. By default is 1.

Default('1')
right_phase Boolean

Change right phase. By default is enabled.

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

Decodes High Definition Compatible Digital (HDCD) data. A 16-bit PCM stream with embedded HDCD codes is expanded into a 20-bit PCM stream.

The filter supports the Peak Extend and Low-level Gain Adjustment features of HDCD, and detects the Transient Filter flag.

@example ffmpeg -i HDCD16.flac -af hdcd OUT24.flac @end example

When using the filter with wav, note the default encoding for wav is 16-bit, so the resulting 20-bit stream will be truncated back to 16-bit. Use something like -acodec pcm_s24le after the filter to get 24-bit PCM output. @example ffmpeg -i HDCD16.wav -af hdcd OUT16.wav ffmpeg -i HDCD16.wav -af hdcd -c:a pcm_s24le OUT24.wav @end example

The filter accepts the following options:

Parameters:

Name Type Description Default
disable_autoconvert Boolean

Disable any automatic format conversion or resampling in the filter graph.

Default('true')
process_stereo Boolean

Process the stereo channels together. If target_gain does not match between channels, consider it invalid and use the last valid target_gain.

Default('true')
cdt_ms Int

Set the code detect timer period in ms.

Default('2000')
force_pe Boolean

Always extend peaks above -3dBFS even if PE isn't signaled.

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

Replace audio with a solid tone and adjust the amplitude to signal some specific aspect of the decoding process. The output file can be loaded in an audio editor alongside the original to aid analysis. analyze_mode=pe:force_pe=true can be used to see all samples above the PE level. Modes are: @end table

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply a high-pass filter with 3dB point frequency. The filter can be either single-pole, or double-pole (the default). The filter roll off at 6dB per pole per octave (20dB per pole per decade).

The filter accepts the following options:

Parameters:

Name Type Description Default
frequency Double

Change highpass frequency. Syntax for the command is : "frequency"

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

Change highpass width_type. Syntax for the command is : "width_type"

Default('q')
width Double

Change highpass width. Syntax for the command is : "width"

Default('0.707')
poles Int

Set number of poles. Default is 2.

Default('2')
mix Double

Change highpass mix. Syntax for the command is : "mix"

Default('1')
channels String

Specify which channels to filter, by default all available are filtered.

Default('all')
normalize Boolean

Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB.

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

Set transform type of IIR filter. @end table

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

Set precison of filtering. @end table

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Boost or cut treble (upper) frequencies of the audio using a two-pole shelving filter with a response similar to that of a standard hi-fi's tone-controls. This is also known as shelving equalisation (EQ).

The filter accepts the following options:

Parameters:

Name Type Description Default
frequency Double

Change treble frequency. Syntax for the command is : "frequency"

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

Change treble width_type. Syntax for the command is : "width_type"

Default('q')
width Double

Change treble width. Syntax for the command is : "width"

Default('0.5')
gain Double

Change treble gain. Syntax for the command is : "gain"

Default('0')
poles Int

Set number of poles. Default is 2.

Default('2')
mix Double

Change treble mix. Syntax for the command is : "mix"

Default('1')
channels String

Specify which channels to filter, by default all available are filtered.

Default('all')
normalize Boolean

Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB.

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

Set transform type of IIR filter. @end table

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

Set precison of filtering. @end table

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. Includes both dynamic and linear normalization modes. Support for both single pass (livestreams, files) and double pass (files) modes. This algorithm can target IL, LRA, and maximum true peak. In dynamic mode, to accurately detect true peaks, the audio stream will be upsampled to 192 kHz. Use the -ar option or aresample filter to explicitly set an output sample rate.

The filter accepts the following options:

Parameters:

Name Type Description Default
I Double

Set integrated loudness target. Range is -70.0 - -5.0. Default value is -24.0.

Default('-24')
LRA Double

Set loudness range target. Range is 1.0 - 50.0. Default value is 7.0.

Default('7')
TP Double

Set maximum true peak. Range is -9.0 - +0.0. Default value is -2.0.

Default('-2')
measured_I Double

Measured IL of input file. Range is -99.0 - +0.0.

Default('0')
measured_LRA Double

Measured LRA of input file. Range is 0.0 - 99.0.

Default('0')
measured_TP Double

Measured true peak of input file. Range is -99.0 - +99.0.

Default('99')
measured_thresh Double

Measured threshold of input file. Range is -99.0 - +0.0.

Default('-70')
offset Double

Set offset gain. Gain is applied before the true-peak limiter. Range is -99.0 - +99.0. Default is +0.0.

Default('0')
linear Boolean

Normalize by linearly scaling the source audio. measured_I, measured_LRA, measured_TP, and measured_thresh must all be specified. Target LRA shouldn't be lower than source LRA and the change in integrated loudness shouldn't result in a true peak which exceeds the target TP. If any of these conditions aren't met, normalization mode will revert to dynamic. Options are true or false. Default is true.

Default('true')
dual_mono Boolean

Treat mono input files as "dual-mono". If a mono file is intended for playback on a stereo system, its EBU R128 measurement will be perceptually incorrect. If set to true, this option will compensate for this effect. Multi-channel input files are not affected by this option. Options are true or false. Default is false.

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

Set print format for stats. Options are summary, json, or none. Default value is 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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply a low-pass filter with 3dB point frequency. The filter can be either single-pole or double-pole (the default). The filter roll off at 6dB per pole per octave (20dB per pole per decade).

The filter accepts the following options:

Parameters:

Name Type Description Default
frequency Double

Change lowpass frequency. Syntax for the command is : "frequency"

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

Change lowpass width_type. Syntax for the command is : "width_type"

Default('q')
width Double

Change lowpass width. Syntax for the command is : "width"

Default('0.707')
poles Int

Set number of poles. Default is 2.

Default('2')
mix Double

Change lowpass mix. Syntax for the command is : "mix"

Default('1')
channels String

Specify which channels to filter, by default all available are filtered.

Default('all')
normalize Boolean

Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB.

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

Set transform type of IIR filter. @end table

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

Set precison of filtering. @end table

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Boost or cut the bass (lower) frequencies of the audio using a two-pole shelving filter with a response similar to that of a standard hi-fi's tone-controls. This is also known as shelving equalisation (EQ).

The filter accepts the following options:

Parameters:

Name Type Description Default
frequency Double

Change bass frequency. Syntax for the command is : "frequency"

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

Change bass width_type. Syntax for the command is : "width_type"

Default('q')
width Double

Change bass width. Syntax for the command is : "width"

Default('0.5')
gain Double

Change bass gain. Syntax for the command is : "gain"

Default('0')
poles Int

Set number of poles. Default is 2.

Default('2')
mix Double

Change bass mix. Syntax for the command is : "mix"

Default('1')
channels String

Specify which channels to filter, by default all available are filtered.

Default('all')
normalize Boolean

Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB.

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

Set transform type of IIR filter. @end table

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

Set precison of filtering. @end table

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 the audio's dynamic range.

The input audio is divided into bands using 4th order Linkwitz-Riley IIRs. This is akin to the crossover of a loudspeaker, and results in flat frequency response when absent compander action.

It accepts the following parameters:

Parameters:

Name Type Description Default
args String

This option syntax is: attack,decay,[attack,decay..] soft-knee points crossover_frequency [delay [initial_volume [gain]]] | attack,decay ... For explanation of each item refer to compand filter documentation.

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

pan

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

Mix channels with specific gain levels. The filter accepts the output channel layout followed by a set of channels definitions.

This filter is also designed to efficiently remap the channels of an audio stream.

The filter accepts parameters of the form: "l|outdef|outdef|..."

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(
    extra_options: dict[str, Any] | None = None,
) -> AudioStream

ReplayGain scanner filter. This filter takes an audio stream as an input and outputs it unchanged. At end of filtering it displays track_gain and track_peak.

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

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 video output representing frequency spectrum logarithmically using Brown-Puckette constant Q transform algorithm with direct frequency domain coefficient calculation (but the transform itself is not really constant Q, instead the Q factor is actually variable/clamped), with musical tone scale, from E0 to D#10.

The filter accepts the following options:

Parameters:

Name Type Description Default
size Image_size

Specify the video size for the output. It must be even. For the syntax of this option, check the "Video size" section in the ffmpeg-utils manual. Default value is 1920x1080.

Default('1920x1080')
fps Video_rate

Set the output frame rate. Default value is 25.

Default('25')
bar_h Int

Set the bargraph height. It must be even. Default value is -1 which computes the bargraph height automatically.

Default('-1')
axis_h Int

Set the axis height. It must be even. Default value is -1 which computes the axis height automatically.

Default('-1')
sono_h Int

Set the sonogram height. It must be even. Default value is -1 which computes the sonogram height automatically.

Default('-1')
fullhd Boolean

Set the fullhd resolution. This option is deprecated, use size, s instead. Default value is 1.

Default('true')
sono_v String

Specify the sonogram volume expression. It can contain variables: @end table and functions: @end table Default value is 16.

Default('16')
bar_v String

Specify the bargraph volume expression. It can contain variables: @end table and functions: @end table Default value is sono_v.

Default('sono_v')
sono_g Float

Specify the sonogram gamma. Lower gamma makes the spectrum more contrast, higher gamma makes the spectrum having more range. Default value is 3. Acceptable range is [1, 7].

Default('3')
bar_g Float

Specify the bargraph gamma. Default value is 1. Acceptable range is [1, 7].

Default('1')
bar_t Float

Specify the bargraph transparency level. Lower value makes the bargraph sharper. Default value is 1. Acceptable range is [0, 1].

Default('1')
timeclamp Double

Specify the transform timeclamp. At low frequency, there is trade-off between accuracy in time domain and frequency domain. If timeclamp is lower, event in time domain is represented more accurately (such as fast bass drum), otherwise event in frequency domain is represented more accurately (such as bass guitar). Acceptable range is [0.002, 1]. Default value is 0.17.

Default('0.17')
attack Double

Set attack time in seconds. The default is 0 (disabled). Otherwise, it limits future samples by applying asymmetric windowing in time domain, useful when low latency is required. Accepted range is [0, 1].

Default('0')
basefreq Double

Specify the transform base frequency. Default value is 20.01523126408007475, which is frequency 50 cents below E0. Acceptable range is [10, 100000].

Default('20.0152')
endfreq Double

Specify the transform end frequency. Default value is 20495.59681441799654, which is frequency 50 cents above D#10. Acceptable range is [10, 100000].

Default('20495.6')
coeffclamp Float

This option is deprecated and ignored.

Default('1')
tlength String

Specify the transform length in time domain. Use this option to control accuracy trade-off between time domain and frequency domain at every frequency sample. It can contain variables: @end table Default value is 384tc/(384+tcf).

Default('384*tc/(384+tc*f)')
count Int

Specify the transform count for every video frame. Default value is 6. Acceptable range is [1, 30].

Default('6')
fcount Int

Specify the transform count for every single pixel. Default value is 0, which makes it computed automatically. Acceptable range is [0, 10].

Default('0')
fontfile String

Specify font file for use with freetype to draw the axis. If not specified, use embedded font. Note that drawing with font file or embedded font is not implemented with custom basefreq and endfreq, use axisfile option instead.

Default(None)
font String

Specify fontconfig pattern. This has lower priority than fontfile. The : in the pattern may be replaced by | to avoid unnecessary escaping.

Default(None)
fontcolor String

Specify font color expression. This is arithmetic expression that should return integer value 0xRRGGBB. It can contain variables: @end table and functions: @end table Default value is 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

Specify image file to draw the axis. This option override fontfile and fontcolor option.

Default(None)
axis Boolean

Enable/disable drawing text to the axis. If it is set to 0, drawing to the axis is disabled, ignoring fontfile and axisfile option. Default value is 1.

Default('true')
csp Int | Literal['unspecified', 'bt709', 'fcc', 'bt470bg', 'smpte170m', 'smpte240m', 'bt2020ncl'] | Default

Set colorspace. The accepted values are: @end table

Default('unspecified')
cscheme String

Set spectrogram color scheme. This is list of floating point values with format left_r|left_g|left_b|right_r|right_g|right_b. The default is 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

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",
        ]
        | 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 video output representing the audio power spectrum. Audio amplitude is on Y-axis while frequency is on X-axis.

The filter accepts the following options:

Parameters:

Name Type Description Default
size Image_size

Specify size of video. For the syntax of this option, check the "Video size" section in the ffmpeg-utils manual. Default is 1024x512.

Default('1024x512')
rate Video_rate

Set video rate. Default is 25.

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

Set display mode. This set how each frequency bin will be represented. It accepts the following values: @end table Default is bar.

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

Set amplitude scale. It accepts the following values: @end table Default is log.

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

Set frequency scale. It accepts the following values: @end table Default is lin.

Default('lin')
win_size Int

Set window size. Allowed range is from 16 to 65536. Default is 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'] | Default

Set windowing function. It accepts the following values: @end table Default is hanning.

Default('hann')
overlap Float

Set window overlap. In range [0, 1]. Default is 1, which means optimal overlap for selected window function will be picked.

Default('1')
averaging Int

Set time averaging. Setting this to 0 will display current maximal peaks. Default is 1, which means time averaging is disabled.

Default('1')
colors String

Specify list of colors separated by space or by '|' which will be used to draw channel frequencies. Unrecognized or missing colors will be replaced by white color.

Default('red|green|blue|yellow|orange|lime|pink|magenta|brown')
cmode Int | Literal['combined', 'separate'] | Default

Set channel display mode. It accepts the following values: @end table Default is combined.

Default('combined')
minamp Float

Set minimum amplitude used in log amplitude scaler.

Default('1e-06')
data Int | Literal['magnitude', 'phase', 'delay'] | Default

Set data display mode. It accepts the following values: @end table Default is magnitude.

Default('magnitude')
channels String

Set channels to use when processing audio. By default all are processed.

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",
        ]
        | Default
    ) = Default("hann"),
    overlap: Float = Default("0.5"),
    extra_options: dict[str, Any] | None = None
) -> VideoStream

Convert stereo input audio to a video output, representing the spatial relationship between two channels.

The filter accepts the following options:

Parameters:

Name Type Description Default
size Image_size

Specify the video size for the output. For the syntax of this option, check the "Video size" section in the ffmpeg-utils manual. Default value is 512x512.

Default('512x512')
win_size Int

Set window size. Allowed range is from 1024 to 65536. Default size is 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'] | Default

Set window function. It accepts the following values: @end table Default value is hann.

Default('hann')
overlap Float

Set ratio of overlap window. Default value is 0.5. When value is 1 overlap is set to recommended size for specific window function currently used.

Default('0.5')
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",
        ]
        | 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 video output, representing the audio frequency spectrum.

The filter accepts the following options:

Parameters:

Name Type Description Default
size Image_size

Specify the video size for the output. For the syntax of this option, check the "Video size" section in the ffmpeg-utils manual. Default value is 640x512.

Default('640x512')
slide Int | Literal['replace', 'scroll', 'fullframe', 'rscroll', 'lreplace'] | Default

Specify how the spectrum should slide along the window. It accepts the following values: @end table Default value is replace.

Default('replace')
mode Int | Literal['combined', 'separate'] | Default

Specify display mode. It accepts the following values: @end table Default value is combined.

Default('combined')
color Int | Literal['channel', 'intensity', 'rainbow', 'moreland', 'nebulae', 'fire', 'fiery', 'fruit', 'cool', 'magma', 'green', 'viridis', 'plasma', 'cividis', 'terrain'] | Default

Specify display color mode. It accepts the following values: @end table Default value is channel.

Default('channel')
scale Int | Literal['lin', 'sqrt', 'cbrt', 'log', '4thrt', '5thrt'] | Default

Specify scale used for calculating intensity color values. It accepts the following values: @end table Default value is sqrt.

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

Specify frequency scale. It accepts the following values: @end table Default value is lin.

Default('lin')
saturation Float

Set saturation modifier for displayed colors. Negative values provide alternative color scheme. 0 is no saturation at all. Saturation must be in [-10.0, 10.0] range. Default value is 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'] | Default

Set window function. It accepts the following values: @end table Default value is hann.

Default('hann')
orientation Int | Literal['vertical', 'horizontal'] | Default

Set orientation of time vs frequency axis. Can be vertical or horizontal. Default is vertical.

Default('vertical')
overlap Float

Set ratio of overlap window. Default value is 0. When value is 1 overlap is set to recommended size for specific window function currently used.

Default('0')
gain Float

Set scale gain for calculating intensity color values. Default value is 1.

Default('1')
data Int | Literal['magnitude', 'phase', 'uphase'] | Default

Set which data to display. Can be magnitude, default or phase, or unwrapped phase: uphase.

Default('magnitude')
rotation Float

Set color rotation, must be in [-1.0, 1.0] range. Default value is 0.

Default('0')
start Int

Set start frequency from which to display spectrogram. Default is 0.

Default('0')
stop Int

Set stop frequency to which to display spectrogram. Default is 0.

Default('0')
fps String

Set upper frame rate limit. Default is auto, unlimited.

Default('auto')
legend Boolean

Draw time and frequency axes and legends. Default is disabled.

Default('false')
drange Float

Set dynamic range used to calculate intensity color values. Default is 120 dBFS. Allowed range is from 10 to 200.

Default('120')
limit Float

Set upper limit of input audio samples volume in dBFS. Default is 0 dBFS. Allowed range is from -100 to 100.

Default('0')
opacity Float

Set opacity strength when using pixel format output with alpha component.

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",
        ]
        | 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 single video frame, representing the audio frequency spectrum.

The filter accepts the following options:

Parameters:

Name Type Description Default
size Image_size

Specify the video size for the output. For the syntax of this option, check the "Video size" section in the ffmpeg-utils manual. Default value is 4096x2048.

Default('4096x2048')
mode Int | Literal['combined', 'separate'] | Default

Specify display mode. It accepts the following values: @end table Default value is combined.

Default('combined')
color Int | Literal['channel', 'intensity', 'rainbow', 'moreland', 'nebulae', 'fire', 'fiery', 'fruit', 'cool', 'magma', 'green', 'viridis', 'plasma', 'cividis', 'terrain'] | Default

Specify display color mode. It accepts the following values: @end table Default value is intensity.

Default('intensity')
scale Int | Literal['lin', 'sqrt', 'cbrt', 'log', '4thrt', '5thrt'] | Default

Specify scale used for calculating intensity color values. It accepts the following values: @end table Default value is log.

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

Specify frequency scale. It accepts the following values: @end table Default value is lin.

Default('lin')
saturation Float

Set saturation modifier for displayed colors. Negative values provide alternative color scheme. 0 is no saturation at all. Saturation must be in [-10.0, 10.0] range. Default value is 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'] | Default

Set window function. It accepts the following values: @end table Default value is hann.

Default('hann')
orientation Int | Literal['vertical', 'horizontal'] | Default

Set orientation of time vs frequency axis. Can be vertical or horizontal. Default is vertical.

Default('vertical')
gain Float

Set scale gain for calculating intensity color values. Default value is 1.

Default('1')
legend Boolean

Draw time and frequency axes and legends. Default is enabled.

Default('true')
rotation Float

Set color rotation, must be in [-1.0, 1.0] range. Default value is 0.

Default('0')
start Int

Set start frequency from which to display spectrogram. Default is 0.

Default('0')
stop Int

Set stop frequency to which to display spectrogram. Default is 0.

Default('0')
drange Float

Set dynamic range used to calculate intensity color values. Default is 120 dBFS. Allowed range is from 10 to 200.

Default('120')
limit Float

Set upper limit of input audio samples volume in dBFS. Default is 0 dBFS. Allowed range is from -100 to 100.

Default('0')
opacity Float

Set opacity strength when using pixel format output with alpha component.

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 a video output.

The filter accepts the following options:

Parameters:

Name Type Description Default
rate Video_rate

Set video rate.

Default('25')
b Int

Set border width, allowed range is [0, 5]. Default is 1.

Default('1')
w Int

Set channel width, allowed range is [80, 8192]. Default is 400.

Default('400')
h Int

Set channel height, allowed range is [1, 900]. Default is 20.

Default('20')
f Double

Set fade, allowed range is [0, 1]. Default is 0.95.

Default('0.95')
c String

Set volume color expression. The expression can use the following variables: @end table

Default('PEAK*255+floor((1-PEAK)*255)*256+0xff000000')
t Boolean

If set, displays channel names. Default is enabled.

Default('true')
v Boolean

If set, displays volume values. Default is enabled.

Default('true')
dm Double

In second. If set to > 0., display a line for the max level in the previous seconds. default is disabled: 0.

Default('0')
dmc Color

The color of the max line. Use when dm option is set to > 0. default is: orange

Default('orange')
o Int | Literal['h', 'v'] | Default

Set orientation, can be horizontal: h or vertical: v, default is h.

Default('h')
s Int

Set step size, allowed range is [0, 5]. Default is 0, which means step is disabled.

Default('0')
p Float

Set background opacity, allowed range is [0, 1]. Default is 0.

Default('0')
m Int | Literal['p', 'r'] | Default

Set metering mode, can be peak: p or rms: r, default is p.

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

Set display scale, can be linear: lin or log: log, default is 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: Int = Default("0"),
    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, representing the samples waves.

The filter accepts the following options:

Parameters:

Name Type Description Default
size Image_size

Specify the video size for the output. For the syntax of this option, check the "Video size" section in the ffmpeg-utils manual. Default value is 600x240.

Default('600x240')
mode Int | Literal['point', 'line', 'p2p', 'cline'] | Default

Set display mode. Available values are: @end table Default value is point.

Default('point')
n Int

Set the number of samples which are printed on the same column. A larger value will decrease the frame rate. Must be a positive integer. This option can be set only if the value for rate is not explicitly specified.

Default('0')
rate Video_rate

Set the (approximate) output frame rate. This is done by setting the option n. Default value is "25".

Default('25')
split_channels Boolean

Set if channels should be drawn separately or overlap. Default value is 0.

Default('false')
colors String

Set colors separated by '|' which are going to be used for drawing of each channel.

Default('red|green|blue|yellow|orange|lime|pink|magenta|brown')
scale Int | Literal['lin', 'log', 'sqrt', 'cbrt'] | Default

Set amplitude scale. Available values are: @end table Default is linear.

Default('lin')
draw Int | Literal['scale', 'full'] | Default

Set the draw mode. This is mostly useful to set for high n. Available values are: @end table Default value is 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 single video frame, representing the samples waves.

The filter accepts the following options:

Parameters:

Name Type Description Default
size Image_size

Specify the video size for the output. For the syntax of this option, check the "Video size" section in the ffmpeg-utils manual. Default value is 600x240.

Default('600x240')
split_channels Boolean

Set if channels should be drawn separately or overlap. Default value is 0.

Default('false')
colors String

Set colors separated by '|' which are going to be used for drawing of each channel.

Default('red|green|blue|yellow|orange|lime|pink|magenta|brown')
scale Int | Literal['lin', 'log', 'sqrt', 'cbrt'] | Default

Set amplitude scale. Available values are: @end table Default is linear.

Default('lin')
draw Int | Literal['scale', 'full'] | Default

Set the draw mode. Available values are: @end table Default value is scale.

Default('scale')
filter Int | Literal['average', 'peak'] | Default

Set the filter mode. Available values are: @end table Default value is 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

This filter acts like normal compressor but has the ability to compress detected signal using second input signal. It needs two input streams and returns one output stream. First input stream will be processed depending on second stream signal. The filtered signal then can be filtered with other filters in later stages of processing. See pan and amerge filter.

The filter accepts the following options:

Parameters:

Name Type Description Default
level_in Double

Set input gain. Default is 1. Range is between 0.015625 and 64.

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

Set mode of compressor operation. Can be upward or downward. Default is downward.

Default('downward')
threshold Double

If a signal of second stream raises above this level it will affect the gain reduction of first stream. By default is 0.125. Range is between 0.00097563 and 1.

Default('0.125')
ratio Double

Set a ratio about which the signal is reduced. 1:2 means that if the level raised 4dB above the threshold, it will be only 2dB above after the reduction. Default is 2. Range is between 1 and 20.

Default('2')
attack Double

Amount of milliseconds the signal has to rise above the threshold before gain reduction starts. Default is 20. Range is between 0.01 and 2000.

Default('20')
release Double

Amount of milliseconds the signal has to fall below the threshold before reduction is decreased again. Default is 250. Range is between 0.01 and 9000.

Default('250')
makeup Double

Set the amount by how much signal will be amplified after processing. Default is 1. Range is from 1 to 64.

Default('1')
knee Double

Curve the sharp knee around the threshold to enter gain reduction more softly. Default is 2.82843. Range is between 1 and 8.

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

Choose if the average level between all channels of side-chain stream or the louder(maximum) channel of side-chain stream affects the reduction. Default is average.

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

Should the exact signal be taken in case of peak or an RMS one in case of rms. Default is rms which is mainly smoother.

Default('rms')
level_sc Double

Set sidechain gain. Default is 1. Range is between 0.015625 and 64.

Default('1')
mix Double

How much to use compressed signal in output. Default is 1. Range is between 0 and 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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

A sidechain gate acts like a normal (wideband) gate but has the ability to filter the detected signal before sending it to the gain reduction stage. Normally a gate uses the full range signal to detect a level above the threshold. For example: If you cut all lower frequencies from your sidechain signal the gate will decrease the volume of your track only if not enough highs appear. With this technique you are able to reduce the resonation of a natural drum or remove "rumbling" of muted strokes from a heavily distorted guitar. It needs two input streams and returns one output stream. First input stream will be processed depending on second stream signal.

The filter accepts the following options:

Parameters:

Name Type Description Default
level_in Double

Set input level before filtering. Default is 1. Allowed range is from 0.015625 to 64.

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

Set the mode of operation. Can be upward or downward. Default is downward. If set to upward mode, higher parts of signal will be amplified, expanding dynamic range in upward direction. Otherwise, in case of downward lower parts of signal will be reduced.

Default('downward')
range Double

Set the level of gain reduction when the signal is below the threshold. Default is 0.06125. Allowed range is from 0 to 1. Setting this to 0 disables reduction and then filter behaves like expander.

Default('0.06125')
threshold Double

If a signal rises above this level the gain reduction is released. Default is 0.125. Allowed range is from 0 to 1.

Default('0.125')
ratio Double

Set a ratio about which the signal is reduced. Default is 2. Allowed range is from 1 to 9000.

Default('2')
attack Double

Amount of milliseconds the signal has to rise above the threshold before gain reduction stops. Default is 20 milliseconds. Allowed range is from 0.01 to 9000.

Default('20')
release Double

Amount of milliseconds the signal has to fall below the threshold before the reduction is increased again. Default is 250 milliseconds. Allowed range is from 0.01 to 9000.

Default('250')
makeup Double

Set amount of amplification of signal after processing. Default is 1. Allowed range is from 1 to 64.

Default('1')
knee Double

Curve the sharp knee around the threshold to enter gain reduction more softly. Default is 2.828427125. Allowed range is from 1 to 8.

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

Choose if exact signal should be taken for detection or an RMS like one. Default is rms. Can be peak or rms.

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

Choose if the average level between all channels or the louder channel affects the reduction. Default is average. Can be average or maximum.

Default('average')
level_sc Double

Set sidechain gain. Default is 1. Range is from 0.015625 to 64.

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 in an audio stream.

This filter logs a message when it detects that the input audio volume is less or equal to a noise tolerance value for a duration greater or equal to the minimum detected noise duration.

The printed times and duration are expressed in seconds. The lavfi.silence_start or lavfi.silence_start.X metadata key is set on the first frame whose timestamp equals or exceeds the detection duration and it contains the timestamp of the first frame of the silence.

The lavfi.silence_duration or lavfi.silence_duration.X and lavfi.silence_end or lavfi.silence_end.X metadata keys are set on the first frame after the silence. If mono is enabled, and each channel is evaluated separately, the .X suffixed keys are used, and X corresponds to the channel number.

The filter accepts the following options:

Parameters:

Name Type Description Default
n Double

Set noise tolerance. Can be specified in dB (in case "dB" is appended to the specified value) or amplitude ratio. Default is -60dB, or 0.001.

Default('0.001')
d Duration

Set silence duration until notification (default is 2 seconds). See the Time duration section in the ffmpeg-utils(1) manual for the accepted syntax.

Default('2')
mono Boolean

Process each channel separately, instead of combined. By default is disabled.

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("any"),
    detection: (
        Int | Literal["peak", "rms"] | Default
    ) = Default("rms"),
    window: Duration = Default("0.02"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Remove silence from the beginning, middle or end of the audio.

The filter accepts the following options:

Parameters:

Name Type Description Default
start_periods Int

This value is used to indicate if audio should be trimmed at beginning of the audio. A value of zero indicates no silence should be trimmed from the beginning. When specifying a non-zero value, it trims audio up until it finds non-silence. Normally, when trimming silence from beginning of audio the start_periods will be 1 but it can be increased to higher values to trim all audio up to specific count of non-silence periods. Default value is 0.

Default('0')
start_duration Duration

Specify the amount of time that non-silence must be detected before it stops trimming audio. By increasing the duration, bursts of noises can be treated as silence and trimmed off. Default value is 0.

Default('0')
start_threshold Double

This indicates what sample value should be treated as silence. For digital audio, a value of 0 may be fine but for audio recorded from analog, you may wish to increase the value to account for background noise. Can be specified in dB (in case "dB" is appended to the specified value) or amplitude ratio. Default value is 0.

Default('0')
start_silence Duration

Specify max duration of silence at beginning that will be kept after trimming. Default is 0, which is equal to trimming all samples detected as silence.

Default('0')
start_mode Int | Literal['any', 'all'] | Default

Specify mode of detection of silence end in start of multi-channel audio. Can be any or all. Default is any. With any, any sample that is detected as non-silence will cause stopped trimming of silence. With all, only if all channels are detected as non-silence will cause stopped trimming of silence.

Default('any')
stop_periods Int

Set the count for trimming silence from the end of audio. To remove silence from the middle of a file, specify a stop_periods that is negative. This value is then treated as a positive value and is used to indicate the effect should restart processing as specified by start_periods, making it suitable for removing periods of silence in the middle of the audio. Default value is 0.

Default('0')
stop_duration Duration

Specify a duration of silence that must exist before audio is not copied any more. By specifying a higher duration, silence that is wanted can be left in the audio. Default value is 0.

Default('0')
stop_threshold Double

This is the same as start_threshold but for trimming silence from the end of audio. Can be specified in dB (in case "dB" is appended to the specified value) or amplitude ratio. Default value is 0.

Default('0')
stop_silence Duration

Specify max duration of silence at end that will be kept after trimming. Default is 0, which is equal to trimming all samples detected as silence.

Default('0')
stop_mode Int | Literal['any', 'all'] | Default

Specify mode of detection of silence start in end of multi-channel audio. Can be any or all. Default is any. With any, any sample that is detected as non-silence will cause stopped trimming of silence. With all, only if all channels are detected as non-silence will cause stopped trimming of silence.

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

Set how is silence detected. Can be rms or peak. Second is faster and works better with digital silence which is exactly 0. Default value is rms.

Default('rms')
window Duration

Set duration in number of seconds used to calculate size of window in number of samples for detecting silence. Default value is 0.02. Allowed range is from 0 to 10.

Default('0.02')
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"),
    timeline_options: FFMpegTimelineOption | None = None,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Speech Normalizer.

This filter expands or compresses each half-cycle of audio samples (local set of samples all above or all below zero and between two nearest zero crossings) depending on threshold value, so audio reaches target peak value under conditions controlled by below options.

The filter accepts the following options:

Parameters:

Name Type Description Default
peak Double

Set the expansion target peak value. This specifies the highest allowed absolute amplitude level for the normalized audio input. Default value is 0.95. Allowed range is from 0.0 to 1.0.

Default('0.95')
expansion Double

Set the maximum expansion factor. Allowed range is from 1.0 to 50.0. Default value is 2.0. This option controls maximum local half-cycle of samples expansion. The maximum expansion would be such that local peak value reaches target peak value but never to surpass it and that ratio between new and previous peak value does not surpass this option value.

Default('2')
compression Double

Set the maximum compression factor. Allowed range is from 1.0 to 50.0. Default value is 2.0. This option controls maximum local half-cycle of samples compression. This option is used only if threshold option is set to value greater than 0.0, then in such cases when local peak is lower or same as value set by threshold all samples belonging to that peak's half-cycle will be compressed by current compression factor.

Default('2')
threshold Double

Set the threshold value. Default value is 0.0. Allowed range is from 0.0 to 1.0. This option specifies which half-cycles of samples will be compressed and which will be expanded. Any half-cycle samples with their local peak value below or same as this option value will be compressed by current compression factor, otherwise, if greater than threshold value they will be expanded with expansion factor so that it could reach peak target value but never surpass it.

Default('0')
_raise Double

Set the expansion raising amount per each half-cycle of samples. Default value is 0.001. Allowed range is from 0.0 to 1.0. This controls how fast expansion factor is raised per each new half-cycle until it reaches expansion value. Setting this options too high may lead to distortions.

Default('0.001')
fall Double

Set the compression raising amount per each half-cycle of samples. Default value is 0.001. Allowed range is from 0.0 to 1.0. This controls how fast compression factor is raised per each new half-cycle until it reaches compression value.

Default('0.001')
channels String

Specify which channels to filter, by default all available channels are filtered.

Default('all')
invert Boolean

Enable inverted filtering, by default is disabled. This inverts interpretation of threshold option. When enabled any half-cycle of samples with their local peak value below or same as threshold option will be expanded otherwise it will be compressed.

Default('false')
link Boolean

Link channels when calculating gain applied to each filtered channel sample, by default is disabled. When disabled each filtered channel gain calculation is independent, otherwise when this option is enabled the minimum of all possible gains for each filtered channel is used.

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

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

This filter has some handy utilities to manage stereo signals, for converting M/S stereo recordings to L/R signal while having control over the parameters or spreading the stereo image of master track.

The filter accepts the following options:

Parameters:

Name Type Description Default
level_in Double

Set input level before filtering for both channels. Defaults is 1. Allowed range is from 0.015625 to 64.

Default('1')
level_out Double

Set output level after filtering for both channels. Defaults is 1. Allowed range is from 0.015625 to 64.

Default('1')
balance_in Double

Set input balance between both channels. Default is 0. Allowed range is from -1 to 1.

Default('0')
balance_out Double

Set output balance between both channels. Default is 0. Allowed range is from -1 to 1.

Default('0')
softclip Boolean

Enable softclipping. Results in analog distortion instead of harsh digital 0dB clipping. Disabled by default.

Default('false')
mutel Boolean

Mute the left channel. Disabled by default.

Default('false')
muter Boolean

Mute the right channel. Disabled by default.

Default('false')
phasel Boolean

Change the phase of the left channel. Disabled by default.

Default('false')
phaser Boolean

Change the phase of the right channel. Disabled by default.

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. Available values are: @end table

Default('lr>lr')
slev Double

Set level of side signal. Default is 1. Allowed range is from 0.015625 to 64.

Default('1')
sbal Double

Set balance of side signal. Default is 0. Allowed range is from -1 to 1.

Default('0')
mlev Double

Set level of the middle signal. Default is 1. Allowed range is from 0.015625 to 64.

Default('1')
mpan Double

Set middle signal pan. Default is 0. Allowed range is from -1 to 1.

Default('0')
base Double

Set stereo base between mono and inversed channels. Default is 0. Allowed range is from -1 to 1.

Default('0')
delay Double

Set delay in milliseconds how much to delay left from right channel and vice versa. Default is 0. Allowed range is from -20 to 20.

Default('0')
sclevel Double

Set S/C level. Default is 1. Allowed range is from 1 to 100.

Default('1')
phase Double

Set the stereo phase in degrees. Default is 0. Allowed range is from 0 to 360.

Default('0')
bmode_in Int | Literal['balance', 'amplitude', 'power'] | Default

Set balance mode for balance_in/balance_out option. Can be one of the following: @end table

Default('balance')
bmode_out Int | Literal['balance', 'amplitude', 'power'] | Default

Set balance mode for balance_in/balance_out option. Can be one of the following: @end table

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

This filter enhance the stereo effect by suppressing signal common to both channels and by delaying the signal of left into right and vice versa, thereby widening the stereo effect.

The filter accepts the following options:

Parameters:

Name Type Description Default
delay Float

Time in milliseconds of the delay of left signal into right and vice versa. Default is 20 milliseconds.

Default('20')
feedback Float

Amount of gain in delayed signal into right and vice versa. Gives a delay effect of left signal in right output and vice versa which gives widening effect. Default is 0.3.

Default('0.3')
crossfeed Float

Cross feed of left into right with inverted phase. This helps in suppressing the mono. If the value is 1 it will cancel all the signal common to both channels. Default is 0.3.

Default('0.3')
drymix Float

Set level of input signal of original channel. Default is 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 equalizer.

The filter accepts the following options:

Parameters:

Name Type Description Default
_1b Float

Set 65Hz band gain.

Default('1')
_2b Float

Set 92Hz band gain.

Default('1')
_3b Float

Set 131Hz band gain.

Default('1')
_4b Float

Set 185Hz band gain.

Default('1')
_5b Float

Set 262Hz band gain.

Default('1')
_6b Float

Set 370Hz band gain.

Default('1')
_7b Float

Set 523Hz band gain.

Default('1')
_8b Float

Set 740Hz band gain.

Default('1')
_9b Float

Set 1047Hz band gain.

Default('1')
_10b Float

Set 1480Hz band gain.

Default('1')
_11b Float

Set 2093Hz band gain.

Default('1')
_12b Float

Set 2960Hz band gain.

Default('1')
_13b Float

Set 4186Hz band gain.

Default('1')
_14b Float

Set 5920Hz band gain.

Default('1')
_15b Float

Set 8372Hz band gain.

Default('1')
_16b Float

Set 11840Hz band gain.

Default('1')
_17b Float

Set 16744Hz band gain.

Default('1')
_18b Float

Set 20000Hz band gain.

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"),
    angle: Float = Default("90"),
    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",
        ]
        | Default
    ) = Default("hann"),
    overlap: Float = Default("0.5"),
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply audio surround upmix filter.

This filter allows to produce multichannel output from audio stream.

The filter accepts the following options:

Parameters:

Name Type Description Default
chl_out String

Set output channel layout. By default, this is 5.1. See the Channel Layout section in the ffmpeg-utils(1) manual for the required syntax.

Default('5.1')
chl_in String

Set input channel layout. By default, this is stereo. See the Channel Layout section in the ffmpeg-utils(1) manual for the required syntax.

Default('stereo')
level_in Float

Set input volume level. By default, this is 1.

Default('1')
level_out Float

Set output volume level. By default, this is 1.

Default('1')
lfe Boolean

Enable LFE channel output if output channel layout has it. By default, this is enabled.

Default('true')
lfe_low Int

Set LFE low cut off frequency. By default, this is 128 Hz.

Default('128')
lfe_high Int

Set LFE high cut off frequency. By default, this is 256 Hz.

Default('256')
lfe_mode Int | Literal['add', 'sub'] | Default

Set LFE mode, can be add or sub. Default is add. In add mode, LFE channel is created from input audio and added to output. In sub mode, LFE channel is created from input audio and added to output but also all non-LFE output channels are subtracted with output LFE channel.

Default('add')
angle Float

Set angle of stereo surround transform, Allowed range is from 0 to 360. Default is 90.

Default('90')
fc_in Float

Set front center input volume. By default, this is 1.

Default('1')
fc_out Float

Set front center output volume. By default, this is 1.

Default('1')
fl_in Float

Set front left input volume. By default, this is 1.

Default('1')
fl_out Float

Set front left output volume. By default, this is 1.

Default('1')
fr_in Float

Set front right input volume. By default, this is 1.

Default('1')
fr_out Float

Set front right output volume. By default, this is 1.

Default('1')
sl_in Float

Set side left input volume. By default, this is 1.

Default('1')
sl_out Float

Set side left output volume. By default, this is 1.

Default('1')
sr_in Float

Set side right input volume. By default, this is 1.

Default('1')
sr_out Float

Set side right output volume. By default, this is 1.

Default('1')
bl_in Float

Set back left input volume. By default, this is 1.

Default('1')
bl_out Float

Set back left output volume. By default, this is 1.

Default('1')
br_in Float

Set back right input volume. By default, this is 1.

Default('1')
br_out Float

Set back right output volume. By default, this is 1.

Default('1')
bc_in Float

Set back center input volume. By default, this is 1.

Default('1')
bc_out Float

Set back center output volume. By default, this is 1.

Default('1')
lfe_in Float

Set LFE input volume. By default, this is 1.

Default('1')
lfe_out Float

Set LFE output volume. By default, this is 1.

Default('1')
allx Float

Set spread usage of stereo image across X axis for all channels. Allowed range is from -1 to 15. By default this value is negative -1, and thus unused.

Default('-1')
ally Float

Set spread usage of stereo image across Y axis for all channels. Allowed range is from -1 to 15. By default this value is negative -1, and thus unused.

Default('-1')
fcx Float

Set spread usage of stereo image across X axis for each channel. Allowed range is from 0.06 to 15. By default this value is 0.5.

Default('0.5')
flx Float

Set spread usage of stereo image across X axis for each channel. Allowed range is from 0.06 to 15. By default this value is 0.5.

Default('0.5')
frx Float

Set spread usage of stereo image across X axis for each channel. Allowed range is from 0.06 to 15. By default this value is 0.5.

Default('0.5')
blx Float

Set spread usage of stereo image across X axis for each channel. Allowed range is from 0.06 to 15. By default this value is 0.5.

Default('0.5')
brx Float

Set spread usage of stereo image across X axis for each channel. Allowed range is from 0.06 to 15. By default this value is 0.5.

Default('0.5')
slx Float

Set spread usage of stereo image across X axis for each channel. Allowed range is from 0.06 to 15. By default this value is 0.5.

Default('0.5')
srx Float

Set spread usage of stereo image across X axis for each channel. Allowed range is from 0.06 to 15. By default this value is 0.5.

Default('0.5')
bcx Float

Set spread usage of stereo image across X axis for each channel. Allowed range is from 0.06 to 15. By default this value is 0.5.

Default('0.5')
fcy Float

Set spread usage of stereo image across Y axis for each channel. Allowed range is from 0.06 to 15. By default this value is 0.5.

Default('0.5')
fly Float

Set spread usage of stereo image across Y axis for each channel. Allowed range is from 0.06 to 15. By default this value is 0.5.

Default('0.5')
fry Float

Set spread usage of stereo image across Y axis for each channel. Allowed range is from 0.06 to 15. By default this value is 0.5.

Default('0.5')
bly Float

Set spread usage of stereo image across Y axis for each channel. Allowed range is from 0.06 to 15. By default this value is 0.5.

Default('0.5')
bry Float

Set spread usage of stereo image across Y axis for each channel. Allowed range is from 0.06 to 15. By default this value is 0.5.

Default('0.5')
sly Float

Set spread usage of stereo image across Y axis for each channel. Allowed range is from 0.06 to 15. By default this value is 0.5.

Default('0.5')
sry Float

Set spread usage of stereo image across Y axis for each channel. Allowed range is from 0.06 to 15. By default this value is 0.5.

Default('0.5')
bcy Float

Set spread usage of stereo image across Y axis for each channel. Allowed range is from 0.06 to 15. By default this value is 0.5.

Default('0.5')
win_size Int

Set window size. Allowed range is from 1024 to 65536. Default size is 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'] | Default

Set window function. It accepts the following values: @end table Default is hann.

Default('hann')
overlap Float

Set window overlap. If set to 1, the recommended overlap for selected window function will be picked. Default is 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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Boost or cut the lower frequencies and cut or boost higher frequencies of the audio using a two-pole shelving filter with a response similar to that of a standard hi-fi's tone-controls. This is also known as shelving equalisation (EQ).

The filter accepts the following options:

Parameters:

Name Type Description Default
frequency Double

Set the filter's central frequency and so can be used to extend or reduce the frequency range to be boosted or cut. The default value is 3000 Hz.

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

Set method to specify band-width of filter. @end table

Default('q')
width Double

Determine how steep is the filter's shelf transition.

Default('0.5')
gain Double

Give the gain at 0 Hz. Its useful range is about -20 (for a large cut) to +20 (for a large boost). Beware of clipping when using a positive gain.

Default('0')
poles Int

Set number of poles. Default is 2.

Default('2')
mix Double

How much to use filtered signal in output. Default is 1. Range is between 0 and 1.

Default('1')
channels String

Specify which channels to filter, by default all available are filtered.

Default('all')
normalize Boolean

Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB.

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

Set transform type of IIR filter. @end table

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

Set precison of filtering. @end table

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Boost or cut treble (upper) frequencies of the audio using a two-pole shelving filter with a response similar to that of a standard hi-fi's tone-controls. This is also known as shelving equalisation (EQ).

The filter accepts the following options:

Parameters:

Name Type Description Default
frequency Double

Change treble frequency. Syntax for the command is : "frequency"

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

Change treble width_type. Syntax for the command is : "width_type"

Default('q')
width Double

Change treble width. Syntax for the command is : "width"

Default('0.5')
gain Double

Change treble gain. Syntax for the command is : "gain"

Default('0')
poles Int

Set number of poles. Default is 2.

Default('2')
mix Double

Change treble mix. Syntax for the command is : "mix"

Default('1')
channels String

Specify which channels to filter, by default all available are filtered.

Default('all')
normalize Boolean

Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB.

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

Set transform type of IIR filter. @end table

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

Set precison of filtering. @end table

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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Sinusoidal amplitude modulation.

The filter accepts the following options:

Parameters:

Name Type Description Default
f Double

Modulation frequency in Hertz. Modulation frequencies in the subharmonic range (20 Hz or lower) will result in a tremolo effect. This filter may also be used as a ring modulator by specifying a modulation frequency higher than 20 Hz. Range is 0.1 - 20000.0. Default value is 5.0 Hz.

Default('5')
d Double

Depth of modulation as a percentage. Range is 0.0 - 1.0. Default value is 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

vibrato

vibrato(
    *,
    f: Double = Default("5"),
    d: Double = Default("0.5"),
    timeline_options: FFMpegTimelineOption | None = None,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Sinusoidal phase modulation.

The filter accepts the following options:

Parameters:

Name Type Description Default
f Double

Modulation frequency in Hertz. Range is 0.1 - 20000.0. Default value is 5.0 Hz.

Default('5')
d Double

Depth of modulation as a percentage. Range is 0.0 - 1.0. Default value is 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

virtualbass

virtualbass(
    *,
    cutoff: Double = Default("250"),
    strength: Double = Default("3"),
    timeline_options: FFMpegTimelineOption | None = None,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Apply audio Virtual Bass filter.

This filter accepts stereo input and produce stereo with LFE (2.1) channels output. The newly produced LFE channel have enhanced virtual bass originally obtained from both stereo channels. This filter outputs front left and front right channels unchanged as available in stereo input.

The filter accepts the following options:

Parameters:

Name Type Description Default
cutoff Double

Set the virtual bass cutoff frequency. Default value is 250 Hz. Allowed range is from 100 to 500 Hz.

Default('250')
strength Double

Set the virtual bass strength. Allowed range is from 0.5 to 3. Default value is 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,
    enable: str | None = None,
    extra_options: dict[str, Any] | None = None
) -> AudioStream

Adjust the input audio volume.

It accepts the following parameters:

Parameters:

Name Type Description Default
volume String

Modify the volume expression. The command accepts the same syntax of the corresponding option. If the specified expression is not valid, it is kept at its current value.

Default('1.0')
precision Int | Literal['fixed', 'float', 'double'] | Default

This parameter represents the mathematical precision. It determines which input sample formats will be allowed, which affects the precision of the volume scaling. @end table

Default('float')
eval Int | Literal['once', 'frame'] | Default

Set when the volume expression is evaluated. It accepts the following values: @end table Default value is once.

Default('once')
replaygain Int | Literal['drop', 'ignore', 'track', 'album'] | Default

Choose the behaviour on encountering ReplayGain side data in input frames. @end table

Default('drop')
replaygain_preamp Double

Pre-amplification gain in dB to apply to the selected replaygain gain. Default value for replaygain_preamp is 0.0.

Default('0')
replaygain_noclip Boolean

Prevent clipping by limiting the gain applied. Default value for replaygain_noclip is 1.

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 the volume of the input video.

The filter has no parameters. It supports only 16-bit signed integer samples, so the input will be converted when needed. Statistics about the volume will be printed in the log when the input stream end is reached.

In particular it will show the mean volume (root mean square), maximum volume (on a per-sample basis), and the beginning of a histogram of the registered volume values (from the maximum value to a cumulated 1/1000 of the samples).

All volumes are in decibels relative to the maximum PCM value.

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