Filter chain syntax
The syntax for--af is the same as --vf. See video filters for full details on labels, the ! prefix for disabled-by-default filters, and runtime toggling.
--af-add, --af-pre, --af-clr. See --vf group of options for their behavior.
Available filters
lavcac3enc — AC-3 encoding
Encodes multi-channel audio to AC-3 at runtime using libavcodec. Supports up to 6 channels. Output is big-endian for raw AC-3, or native-endian for S/PDIF. Input is resampled to 48 kHz, 44.1 kHz, or 32 kHz if needed.| Parameter | Description |
|---|---|
tospdif=<yes|no> | Output via S/PDIF passthrough (yes, default) or raw AC-3 stream (no) |
bitrate=<rate> | Bitrate in kbps (default: 640). Valid values: 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 576, 640. Use auto to select based on channel count. |
minch=<n> | Detach filter if input has fewer than n channels (default: 3) |
encoder=<name> | libavcodec encoder to use (must be an AC-3 encoder) |
| Channels | Bitrate |
|---|---|
| 1 | 96 kbps |
| 2 | 192 kbps |
| 3 | 224 kbps |
| 4 | 384 kbps |
| 5–6 | 448 kbps |
format — audio format control
Forces a specific audio format, sample rate, or channel layout. Does not perform conversion itself; it instructs the filter system to insert necessary conversion filters.| Parameter | Description |
|---|---|
format | Force a specific sample format (e.g. s16, float) |
srate | Force a specific sample rate (e.g. 48000) |
channels | Force a specific channel layout |
To control audio output format (as opposed to mid-chain format), use
--audio-format, --audio-samplerate, and --audio-channels instead.scaletempo — tempo scaling (legacy)
Scales audio tempo without altering pitch, optionally synced to playback speed. Uses a time-domain WSOLA-like algorithm.| Parameter | Default | Description |
|---|---|---|
scale=<amount> | 1.0 | Additional tempo scale factor |
stride=<ms> | 60 | Output stride length in milliseconds |
overlap=<factor> | 0.20 | Overlap fraction of stride |
search=<ms> | 14 | Search length for best overlap position |
speed=<tempo|pitch|both|none> | tempo | How to respond to speed changes: tempo (scale tempo), pitch (scale pitch instead, loses video sync), both, or none |
scaletempo2 — tempo scaling (recommended, default)
Scales audio tempo without altering pitch using the WSOLA (Waveform Similarity Overlap-and-Add) algorithm, ported from Chromium. Higher audio quality thanscaletempo and rubberband R2 engine.
This filter is inserted automatically when --audio-pitch-correction is enabled (the default) and playback speed changes.
| Parameter | Default | Description |
|---|---|---|
min-speed=<speed> | 0.25 | Mute audio below this playback speed |
max-speed=<speed> | 8.0 | Mute audio above this playback speed (0 = disabled) |
search-interval=<ms> | 40 | Length in ms to search for best overlap position |
window-size=<ms> | 12 | Length in ms of the overlap-and-add window |
rubberband — high-quality pitch correction
High-quality pitch correction using librubberband. Can replacescaletempo and scaletempo2, and supports pitch adjustment independent of speed.
| Parameter | Description |
|---|---|
pitch-scale=<amount> | Pitch scaling factor; frequencies are multiplied by this value (default: 1.0) |
engine=<faster|finer> | Rubberband engine: faster (R2, less CPU) or finer (R3, higher quality — default if librubberband ≥ 3) |
af-command):
set-pitch <value>— Changepitch-scaledynamically at runtimemultiply-pitch <factor>— Multiply the currentpitch-scaledynamically
input.conf for semitone pitch stepping:
lavfi — libavfilter wrapper
Filters audio using FFmpeg’s libavfilter. Provides access to all of libavfilter’s audio filters.| Parameter | Description |
|---|---|
o=<string> | AVOptions passed to the filter graph |
fix-pts=<yes|no> | Compute PTS from sample count instead of relying on libavfilter (default: no). Use for filters that reset or recompute PTS. |
drop — frame dropping for SPDIF
Drops or repeats audio frames to adapt to playback speed. Operates on full audio frames, designed for S/PDIF (compressed audio passthrough). Used automatically with--video-sync=display-adrop.
Common use cases
Tempo-correct playback at 1.5x speed
Tempo-correct playback at 1.5x speed
Encode multi-channel audio to AC-3 for S/PDIF
Encode multi-channel audio to AC-3 for S/PDIF
Loudness normalization with EBU R128
Loudness normalization with EBU R128
Parametric EQ
Parametric EQ
Change audio pitch without changing speed
Change audio pitch without changing speed