What Does the keep-open Option Do in MPV?

When playing a video in the MPV media player, the --keep-open option determines whether the player remains active or automatically closes once the playback reaches the end of the file. By default, MPV terminates and closes its window as soon as a video finishes. Enabling this option overrides that behavior, allowing users to keep the player window open on the final frame of the video, which is particularly useful for reviewing content, checking video properties, or preparing to restart playback.

How the Keep-Open Option Works

The --keep-open configuration accepts a few different parameters, allowing you to customize exactly how MPV behaves at the end of a file:

Benefits of Using Keep-Open

Keeping the media player open at the end of a video offers several practical advantages for everyday viewing and technical workflows:

How to Enable Keep-Open

You can utilize this option either on a case-by-case basis via the command line or permanently through your configuration file.

Via Command Line

To use this setting for a single viewing session, launch MPV from your terminal with the following flag:

mpv --keep-open=yes video.mp4

Via Configuration File

To make this the permanent default behavior so you do not have to type it every time, add the line to your mpv.conf file:

keep-open=yes