Skip to main content
Audio filters let you modify the audio stream before it reaches the audio output. The filter chain syntax is identical to video filters.
Run mpv --af=help to list all available audio filters. Most filters are available via the lavfi wrapper, which exposes all of libavfilter’s audio filters.

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.
Filter list management options: --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.
Auto bitrate by channel count:

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.
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.
Scales audio tempo without altering pitch using the WSOLA (Waveform Similarity Overlap-and-Add) algorithm, ported from Chromium. Higher audio quality than scaletempo and rubberband R2 engine. This filter is inserted automatically when --audio-pitch-correction is enabled (the default) and playback speed changes.

rubberband — high-quality pitch correction

High-quality pitch correction using librubberband. Can replace scaletempo and scaletempo2, and supports pitch adjustment independent of speed.
List all available rubberband sub-options:
Runtime commands (via af-command):
  • set-pitch <value> — Change pitch-scale dynamically at runtime
  • multiply-pitch <factor> — Multiply the current pitch-scale dynamically
Example input.conf for semitone pitch stepping:

lavfi — libavfilter wrapper

Filters audio using FFmpeg’s libavfilter. Provides access to all of libavfilter’s audio filters.
Quote libavfilter graphs to avoid conflicts with mpv’s own syntax. Use the same quoting strategies as described in the video filters lavfi section.
Additional options:

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.
This filter is extremely low quality. Do not use it unless you have a specific need for S/PDIF with display-adrop.

Common use cases

This is useful when your audio output device requires AC-3 but the source file is in a different multichannel format.

Filter help

For libavfilter audio filters, refer to the FFmpeg filter documentation.