How to Stop MPV From Auto-Playing on Load?
If you want to prevent the mpv media player from automatically playing a video or audio file the moment you open it, you can achieve this by using a specific configuration setting. This article will quickly cover the exact command-line option, how to add it to your permanent configuration file, and a few related settings to help you customize your player’s startup behavior.
The Core Configuration Option
The primary setting used to prevent mpv from automatically playing a
loaded file is --pause.
When you pass this option, mpv will load the file, display the first frame (or the player interface), and immediately enter a paused state, waiting for you to press the play button or spacebar.
- Command Line Usage:
mpv --pause "your_video_file.mp4"Making the Change Permanent
Instead of typing --pause every time you open a file
from the terminal, you can add it to your mpv.conf
configuration file so that it applies globally every time the player
launches.
Depending on your operating system, your mpv.conf file
is typically located in one of the following directories:
- Windows:
%APPDATA%\mpv\mpv.conf - Linux/macOS:
~/.config/mpv/mpv.conf
To apply the setting, open the file in a text editor and add the following line:
pause=yes
Useful Related Settings
If you are tweaking how mpv behaves when it first launches, you might also want to look into these complementary options in your configuration file:
keep-open=yesPrevents the player from automatically closing when the video finishes playing. Instead, it pauses on the very last frame.force-window=yesForces mpv to open a graphical user interface window immediately upon launch, even if you are just loading an audio file or starting the player without a file.