Audio output drivers are interfaces to different audio output facilities. mpv auto-selects the best available driver, but you can override it with --ao.
mpv --ao=<driver> audio.flac
Pass a comma-separated priority list to fall back automatically:
mpv --ao=pipewire,pulse,alsa audio.flac
Run mpv --ao=help to list all compiled-in audio output drivers sorted by autoprobe order.
The default audio output driver is subject to change and must not be relied upon. Specify the driver explicitly if a particular AO is required.
Linux
macOS
Windows
Cross-platform
alsa
ALSA audio output driver.| Option | Description |
|---|
--alsa-resample=yes | Enable ALSA resampling plugin (disabled by default; some drivers report incorrect delay) |
--alsa-mixer-device=<device> | Mixer device for volume control (default: default) |
--alsa-mixer-name=<name> | Mixer element name, e.g. Master or PCM (default: Master) |
--alsa-mixer-index=<number> | Mixer channel index (default: 0) |
--alsa-non-interleaved | Allow non-interleaved audio output (disabled by default due to broken plugins) |
--alsa-ignore-chmap | Don’t read or set channel map; pass audio as-is |
--alsa-buffer-time=<microseconds> | Requested buffer time (0 = use ALSA default) |
--alsa-periods=<number> | Number of ALSA periods requested |
To get multichannel/surround audio, use --audio-channels=auto. The default auto-safe explicitly rejects multichannel output because ALSA has no way to detect supported channel layouts.
pulse (PulseAudio)
mpv --ao=pulse audio.flac
| Option | Description |
|---|
--pulse-host=<host> | Host to connect to (empty = local connection) |
--pulse-buffer=<1-2000|native> | Audio buffer size in milliseconds; native lets the server decide |
--pulse-latency-hacks=<yes|no> | Enable latency workarounds for PulseAudio timing bugs (default: yes) |
--pulse-allow-suspended=<yes|no> | Allow playback even if the sink is suspended (default: no) |
pipewire
mpv --ao=pipewire audio.flac
| Option | Description |
|---|
--pipewire-buffer=<1-2000|native> | Audio buffer size in milliseconds |
--pipewire-remote=<remote> | PipeWire remote daemon name (default: pipewire-0) |
--pipewire-volume-mode=<channel|global> | Whether ao-volume controls channel or global volume (default: channel) |
jack (JACK Audio Connection Kit)
| Option | Description |
|---|
--jack-port=<name> | Connect to ports with this name (default: physical ports) |
--jack-name=<client> | JACK client name (default: mpv) |
--jack-autostart=<yes|no> | Auto-start jackd if needed (default: no; tends to be unreliable) |
--jack-connect=<yes|no> | Auto-connect to output ports (default: yes) |
--jack-std-channel-layout=<waveext|any> | Channel layout standard: waveext (WAVE_FORMAT_EXTENSIBLE order, default) or any |
coreaudio
Native macOS audio output using AudioUnits and the CoreAudio sound server. Automatically redirects to coreaudio_exclusive for compressed formats.mpv --ao=coreaudio audio.flac
| Option | Description |
|---|
--coreaudio-change-physical-format=<yes|no> | Change system-wide audio format to match requested format (default: no). Enables multichannel output but affects system audio settings. |
--coreaudio-spdif-hack=<yes|no> | Try to pass AC3/DTS as PCM for drivers that don’t report AC3 support. Use with care. |
coreaudio_exclusive
Native macOS audio using direct device access in exclusive mode, bypassing the sound server.mpv --ao=coreaudio_exclusive audio.flac
avfoundation
Native macOS audio using AVSampleBufferAudioRenderer in AVFoundation. Supports spatial audio.mpv --ao=avfoundation audio.flac
Enabling spatial audio may hang playback if mpv is not started from an app bundle.
wasapi
Audio output to the Windows Audio Session API.mpv --ao=wasapi audio.flac
| Option | Description |
|---|
--wasapi-exclusive-buffer=<default|min|1-2000000> | Buffer duration in exclusive mode (--audio-exclusive=yes). default and min use the device’s default/minimum period. Accepts microseconds directly. |
WASAPI supports exclusive mode for lower latency:mpv --ao=wasapi --audio-exclusive=yes audio.flac
dsound (DirectSound)
Available on older Windows systems.null
Produces no audio output but maintains video playback timing. Useful for benchmarking.mpv --ao=null video.mkv
# Untimed: audio decodes as fast as possible
mpv --ao=null --ao-null-untimed video.mkv
sdl
SDL 2.0+ audio output. Works on any platform supported by SDL 2.0. For compatibility with environments where other drivers are unavailable.| Option | Description |
|---|
--sdl-buflen=<seconds> | Audio buffer length hint in seconds (0 = system default) |
Audio channel layout
Control the output channel layout with --audio-channels:
# Accept any channel layout the audio output supports
mpv --audio-channels=auto audio.flac
# Safe subset only (default)
mpv --audio-channels=auto-safe audio.flac
# Force stereo
mpv --audio-channels=stereo audio.flac
ReplayGain / volume normalization
Adjust volume based on ReplayGain metadata stored in the file:
# Apply track gain
mpv --replaygain=track audio.flac
# Apply album gain (falls back to track gain if absent)
mpv --replaygain=album audio.flac
# Disable (default)
mpv --replaygain=no audio.flac
Additional ReplayGain options:
| Option | Description |
|---|
--replaygain-preamp=<db> | Pre-amplification in dB applied to the selected gain (default: 0) |
--replaygain-clip=<yes|no> | Allow clipping (default: no; mpv auto-lowers gain to prevent clipping) |
--replaygain-fallback=<db> | Gain in dB to apply when no ReplayGain tags are present |
Compressed audio passthrough (S/PDIF / HDMI)
Pass compressed audio formats directly to a receiver via S/PDIF or HDMI:
# Pass through AC-3 and DTS
mpv --audio-spdif=ac3,dts audio.mkv
# Pass through Dolby TrueHD and E-AC-3
mpv --audio-spdif=truehd,eac3 audio.mkv
Supported codecs: ac3, dts, dts-hd, eac3, truehd.
HDMI supports uncompressed multichannel PCM, and mpv supports lossless DTS-HD decoding via FFmpeg’s DCA decoder. Passthrough is rarely necessary on modern systems.
Exclusive output mode
Lock the audio device so only mpv can use it (lower latency, no mixing):
mpv --audio-exclusive=yes audio.flac
Supported by wasapi, coreaudio, pipewire, and audiounit.
Selecting a specific audio device
# List available devices
mpv --audio-device=help
# Use a specific ALSA device
mpv --audio-device=alsa/dmix:default audio.flac
# Use a specific WASAPI device
mpv --audio-device=wasapi/Speakers audio.flac