mpv reads configuration from files on startup. Options set in config files use the same names as command-line options, but without the leadingDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/mpv-player/mpv/llms.txt
Use this file to discover all available pages before exploring further.
--. Command-line options override config file settings.
Config file locations
- Linux / macOS
- Windows
- macOS
| File | Purpose |
|---|---|
~/.config/mpv/mpv.conf | User configuration (highest priority) |
/etc/mpv/mpv.conf | System-wide configuration |
/usr/local/etc/mpv/mpv.conf | System-wide configuration (alternative) |
XDG_CONFIG_HOME environment variable overrides the config directory. If set, mpv uses $XDG_CONFIG_HOME/mpv/ instead of ~/.config/mpv/.Setting MPV_HOME overrides everything: mpv looks for $MPV_HOME/mpv.conf.Syntax
The configuration file syntax isoption=value. Lines beginning with # are comments.
- Drop the
--prefix from command-line options:--fsbecomesfs. - Flag options can be enabled by setting them to
yes, or just by specifying the option name alone (hwdecimplieshwdec=yes). - Flag options are disabled with
no:fs=no. - Values do not need to be quoted unless they contain
#, leading/trailing whitespace, or start with",', or%. - You cannot use
--option=valuesyntax inside config files.
Config directory structure
On Linux, the watch-later directory follows the XDG state directory convention at
~/.local/state/mpv/watch_later/. On macOS it is at ~/.config/mpv/watch_later/. On Windows it is at %LOCALAPPDATA%\mpv\watch_later. The location can be overridden by setting $XDG_STATE_HOME (Linux) or $MPV_HOME (all platforms)..lua and .js files placed in ~/.config/mpv/scripts/ are automatically loaded as if passed to --script. Use --load-scripts=no to disable this behavior.
Annotated mpv.conf example
Profiles
Profiles group a set of options under a named section. A profile begins with its name in square brackets. Options that follow belong to that profile until the next profile section or end of file.--profile=<name>:
Built-in profiles
mpv ships several built-in profiles you can apply directly:| Profile | Description |
|---|---|
fast | Optimized for low-power hardware. Uses bilinear scaling, disables dithering and advanced downscaling. |
high-quality | Superior image quality. Uses ewa_lanczossharp scaling with anti-ringing and HDR peak detection. |
low-latency | Minimizes buffering and latency for live streams and camera inputs. |
gpu-hq | Deprecated alias for high-quality. |
Conditional auto-profiles
Profiles with aprofile-cond option are applied automatically when their condition evaluates to true. The condition is a Lua expression that can reference mpv properties.
p.property_name or get("property-name", default) for more robust property access. Underscores in identifiers are automatically converted to hyphens when looking up properties.
Per-file configuration files
To apply specific options to one file, create a companion config file named<filename>.conf in the same directory as the media file, or in ~/.config/mpv/.
You must also enable file-directory config loading:
movie.mkv, create movie.mkv.conf:
--use-filedir-conf enabled, mpv also looks for a mpv.conf in the same directory as the file for directory-level settings.
Legacy extension/protocol auto-profiles
A simpler (soft-deprecated) mechanism automatically loads profiles based on the file extension or protocol:profile-cond) for new configurations.
Including other config files
Useinclude to split your configuration across multiple files: