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:
- Make the video player stop when I left-click into the image area (although this is already available through right-click by default)
- Prevent the application from exiting when the last video has been finished
- 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:
$HOME/.config/mpv/(the user-configuration directory for MPV)$HOME/.config/mpv/script-opts/(the user-configuration directory for script-opts, whatever that means)
Files:
mpv/mpv.conf(the main MPV configuration file)mpv/input.conf(the configuration file for input devices like mouse and keyboard)mpv/script-opts/osc.conf(the On-Screen-Controller configuration file)
File Contents
Now put the following content into the following file:
mpv.conf# do not terminate at end of last video keep-open
input.conf# left mouse click toggles play/pause MBTN_LEFT cycle pause
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:
Kommentar veröffentlichen