
Let’s say you have a computer connected to a 4K TV. You open a movie in mpv and you want it to play in fullscreen. Makes sense. But do you really want that same behavior when you open a 480p video you’ve had on a hard drive for 15 years?
You could create two separate mpv configurations and switch between them. Or you could let mpv decide which settings to use depending on what you’re watching.
You can create profiles in your mpv configuration that apply automatically when certain conditions are met. And you don’t need to install an additional script to do it.
Where is the mpv configuration file?
On Linux and macOS, the usual location is ~/.config/mpv/mpv.conf. On Windows, it’s %APPDATA%\mpv\mpv.conf. If you’re using mpv as a portable Windows app and there’s a portable_config folder next to mpv.exe, use that folder instead.
If the configuration file doesn’t exist, create it with a plain text editor. Make sure it’s called mpv.conf, not mpv.conf.txt. If you already have a configuration, make a copy of it before changing anything.
NOTE: You don’t have to touch your existing configuration to try the examples in this article. Create a separate folder called mpv-test and save your new mpv.conf inside it. Open a terminal in the folder containing mpv-test and run:
mpv --config-dir=./mpv-test --load-scripts=no "VIDEO_FILE"
Replace VIDEO_FILE with the path to a video. If you’re on macOS and you installed the standalone app in Applications rather than the command line version, use:
/Applications/mpv.app/Contents/MacOS/mpv --config-dir=./mpv-test --load-scripts=no "VIDEO_FILE"
On Windows, use .\mpv.exe from its folder in PowerShell, or mpv if it is in your PATH. For the rest of the examples, use the same executable and keep those two options if you want to continue using the test configuration.
NOTE: --config-dir changes where mpv reads its configuration, not where it stores its cache and playback state. The examples below disable resuming playback and saving its position so that previous playback sessions don’t interfere with the test.
The examples are based on mpv 0.42.0, a free and open source player available for macOS, Linux and Windows. You can check your installed version with mpv --version (use the full executable path if needed).
Start with a simple configuration
vo=gpu-next
hwdec=auto
fullscreen=no
autofit-larger=65%x65%
deband=no
save-position-on-quit=no
resume-playback=no
That’s it. We’re using the GPU renderer, asking mpv to use hardware decoding when possible, and limiting the initial window to 65% of the screen width and height without stretching the image. Small videos aren’t forced to fill that window. You can change the percentage to whatever makes sense for your display.
Hardware decoding can reduce CPU usage, but it depends on your hardware, codecs and mpv build. If you get graphical glitches or other playback problems, press Ctrl+h to toggle hardware decoding and see if that helps.

Automatically go fullscreen for HD movies
At the bottom of mpv.conf, add:
[cinema]
profile-cond=get('video-params/w', 0) >= 1920 and get('video-params/h', 0) >= 800
profile-restore=copy
fullscreen=yes
Let’s break this down. [cinema] is the name of the profile. The condition checks the width and height of the video, not the resolution of your display. Why 800 instead of 1080? A lot of widescreen movies have fewer than 1080 lines of actual picture because the black bars aren’t encoded into the video.
When both conditions are met, mpv switches to fullscreen. And when you open a lower resolution video in the same playlist, profile-restore=copy tells mpv to restore the previous fullscreen setting.
If you’re watching on a 4K TV and only want this behavior for 4K content, change the width to 3840 and the height to 1600. These thresholds are just examples, not a way to determine if a movie is actually good enough to watch on a particular screen. Window size changes also depend on the window manager and video output.
Different settings for anime
Some animated content has visible color banding, especially in backgrounds where the color changes gradually. You can enable debanding for those files without using the filter for every other video you play.
[anime]
profile-cond=get('filename', ''):lower():find('anime', 1, true) ~= nil
profile-restore=copy
deband=yes
This doesn’t magically recognize anime. It checks whether the filename contains the word anime. If you prefer to organize your videos by folder, you can use the path property instead of filename, but keep in mind that any matching part of the path will trigger the profile.
Both the cinema and anime profiles can be active at the same time because they’re changing different options. A 1080p file called anime-episode.mp4 will go fullscreen and enable debanding. Open a 360p file with a different name and both options will be restored. We tested that switch with three short sample videos on macOS using mpv 0.42.0. The fullscreen and debanding settings changed as expected and were restored for the last 360p video.

NOTE: Don’t create a bunch of automatic profiles that all change the same setting. Each profile saves its own previous values, and the order in which the profiles are applied and restored can leave you with unexpected settings. If you often change a setting manually during playback, profile-restore=copy-equal is another option. It restores a saved value only if the current value still matches what the profile set.
What about HDR?
HDR video and an HDR display are two different things. You can’t just check if a video is 4K and tell mpv to output HDR. A 4K movie can be SDR, and HDR content can have a lower resolution.
With the gpu-next renderer, mpv can tone map HDR video for an SDR display. On supported output contexts, it can also communicate color space information to the display system. The default target-colorspace-hint=auto already attempts this when the display parameters are known on supported Wayland and Windows GPU contexts. Whether native HDR output actually works depends on the operating system, driver, compositor and display.
I’d leave the HDR settings alone to begin with. Don’t copy someone’s TV peak brightness or force an HDR output mode just because their configuration works on their setup. Press I during playback to bring up the statistics and check what mpv is doing. If you want to experiment with tone mapping, the mpv manual explains the available algorithms and target display parameters.

Picture quality on a TV vs battery life on a laptop
There are two built-in mpv profiles worth knowing about. Try opening the same video with each one (without changing your configuration):
mpv --profile=fast "VIDEO_FILE"
mpv --profile=high-quality "VIDEO_FILE"
The fast profile uses bilinear scaling and disables several expensive processing options. The high-quality profile uses a different scaling filter and additional HDR processing settings. You can see exactly what either profile changes on your installed version:
mpv --show-profile=fast
mpv --show-profile=high-quality
On a laptop, try the fast profile if you want to reduce the rendering workload. It also disables dynamic HDR peak computation, so compare HDR playback before making it your default. On a large display, try the quality profile and decide if the difference is worth it. These aren’t magic battery saving or picture enhancement settings. And remember, scaling a 480p video won’t bring back missing detail.
If you regularly watch old TV recordings and see comb-like lines during movement, press d to change the deinterlacing setting. mpv also supports deinterlace=auto, but incorrectly flagged files can trigger it when the footage doesn’t need it. Keep it off for ordinary progressive video if you don’t need it.
Audio and subtitles
Let’s say you prefer Japanese audio when it’s available and English subtitles. Add these two lines to the global settings at the top of mpv.conf (before the first profile):
alang=ja,en
slang=en
mpv will prefer Japanese audio, then English, and prefer English subtitles. Change the language codes to suit your needs. This depends on the actual tracks and their language metadata; mpv isn’t going to translate a movie or create subtitles that don’t exist.
Ever find yourself turning up the volume to hear dialogue, then turning it down again as soon as something explodes? You can create a separate profile with an audio compressor. Add this to the end of the configuration:
[night]
profile-restore=copy
af=lavfi=[acompressor=threshold=0.125:ratio=4:attack=20:release=250]
This example uses FFmpeg’s audio compressor to reduce the level of louder audio. It needs a build with the filter available, and it won’t isolate voices or guarantee a particular loudness. If you already have audio filters, this example replaces that filter list while the profile is active. You can use --profile=night when launching mpv, or create two keyboard shortcuts.
In the same configuration folder, create or edit input.conf and add:
F6 apply-profile night
F7 apply-profile night restore
Now F6 applies the night profile and F7 restores the saved audio filter settings. Pick other keys if you already use F6 and F7 for something else.
Separate settings for streaming
If you use mpv to watch YouTube videos, there is another setting that makes a difference, especially on laptops. Instead of asking mpv to upscale or downscale an already selected stream, tell yt-dlp which stream to select in the first place.
[stream-1080p]
ytdl-format=bestvideo[height<=1080]+bestaudio/best[height<=1080]
Launch it like this:
mpv --profile=stream-1080p "VIDEO_URL"
This limits the requested video height to 1080p, including the fallback. If no matching format is available, playback may fail. Select this profile when launching mpv so the setting is in place before yt-dlp extracts the stream. An automatic profile triggered after the video starts isn’t a reliable way to change the format that has already been selected.
If you haven’t set up yt-dlp yet, here’s how to make mpv work with yt-dlp. Also check out our guide to limiting stream resolution for more examples.
How do you know which settings are working?
Open a video from a terminal with verbose logging enabled:
mpv -v "VIDEO_FILE"
Look for messages about applying and restoring automatic profiles and the active hardware decoder. Press i to briefly display the playback statistics or I to keep them visible. You can also try mpv --no-config "VIDEO_FILE" if something stops working. That ignores the normal configuration and user files, which is a useful way to determine whether the problem comes from your settings.
One more thing: the conditions in profile-cond are Lua expressions. They aren’t sandboxed, so treat configuration files from random GitHub repositories with the same caution as scripts. There’s a big difference between copying a couple of settings you understand and replacing your entire configuration with someone else’s.
You’ll find the full list of options, properties and default key bindings in the official mpv documentation and the source for version 0.42.0.

