Blog-Archiv

Montag, 17. November 2025

Some Useful MPV Configurations

Since a month I use MPV now as video player, instead of VLC, for writing my video cutting plans. I had the hope that MPV has a more precise time display than VLC, which is off sometimes more than a second when the video duration goes into minutes and you jump around on the timeline a lot. Unfortunately I could not reliably verify that MPV is better in that. Nevertheless MPV is nice to use, because it is highly configurable, although this is not easy. Which is the reason for this Blog article.

Configuration Goals

Following were my configuration goals:

  1. Make the video player stop when I left-click into the image area (although this is already available through right-click by default)
  2. Prevent the application from exiting when the last video has been finished
  3. Keep the player controller on bottom always visible, as I need to always see the passed time-seconds for my cutting-plan

Goal 2. and 3. I had already implemented as commandline options

mpv --keep-open --script-opt=osc-visibility=always [videofile videofile ....]

but I wanted it to be persistent in some configuration files, possibly for all users in the application-specific /etc/mpv/ directory.

Directories and Files

For these three goals you need two user-specific configuration directories and three configuration files.

Directories:

  1. $HOME/.config/mpv/ (the user-configuration directory for MPV)
  2. $HOME/.config/mpv/script-opts/ (the user-configuration directory for script-opts, whatever that means)

Files:

  1. mpv/mpv.conf (the main MPV configuration file)
  2. mpv/input.conf (the configuration file for input devices like mouse and keyboard)
  3. mpv/script-opts/osc.conf (the On-Screen-Controller configuration file)

File Contents

Now put the following content into the following file:

  1. mpv.conf
    # do not terminate at end of last video
    keep-open
  2. input.conf
    # left mouse click toggles play/pause
    MBTN_LEFT cycle pause
    
  3. script-opts/osc.conf
    # keep the play controller always visible - no space around '=' is allowed here
    visibility=always

How did I find out?

I spent two hours with ...

40 %MPV documentation and source code
40 %Experimenting
20 %Google AI suggestions



Keine Kommentare: