ON SCREEN CONTROLLER
The On Screen Controller (short: OSC) is a minimal GUI integrated with mpv to offer basic mouse-controllability. It is intended to make interaction easier for new users and to enable precise and direct seeking.
The OSC is enabled by default if mpv was compiled with Lua support. It can be
disabled entirely using the
Using the OSC
By default, the OSC will show up whenever the mouse is moved inside the player window and will hide if the mouse is not moved outside the OSC for 0.5 seconds or if the mouse leaves the window.
+---------+----------+----------------------------+-------------+ | pl prev | pl next | title | cache | +------+--+---+------+---------+-----------+------+-------+-----+ | play | skip | skip | time | seekbar | time | audio | sub | | | back | frwd | elapsed | | left | | | +------+------+------+---------+-----------+------+-------+-----+
- pl prev
left-click play previous file in playlist right-click show playlist shift+L-click show playlist
- pl next
left-click play next file in playlist right-click show playlist shift+L-click show playlist
- Displays current media-title or filename
left-click show playlist position and length and full title right-click show filename
- Shows current cache fill status
left-click toggle play/pause
- skip back
left-click go to beginning of chapter / previous chapter right-click show chapters shift+L-click show chapters
- skip frwd
left-click go to next chapter right-click show chapters shift+L-click show chapters
- time elapsed
- Shows current playback position timestamp
left-click toggle displaying timecodes with milliseconds
- Indicates current playback position and position of chapters
left-click seek to position
- time left
- Shows remaining playback time timestamp
left-click toggle between total and remaining time
- audio and sub
- Displays selected track and amount of available tracks
left-click cycle audio/sub tracks forward right-click cycle audio/sub tracks backwards shift+L-click show available audio/sub tracks
These key bindings are active by default if nothing else is already bound to these keys. In case of collision, the function needs to be bound to a different key. See the Script Commands section.
|del||Cycles visibility between never / auto (mouse-move) / always|
The OSC offers limited configuration through a config file
lua-settings/osc.conf placed in mpv's user dir and through the
--script-opts command-line option. Options provided through the command-line
will override those from the config file.
The config file must exactly follow the following syntax:
# this is a comment optionA=value1 optionB=value2
# can only be used at the beginning of a line and there may be no
spaces around the
= or anywhere else.
To avoid collisions with other scripts, all options need to be prefixed with
The layout for the OSC. Currently available are: box, slimbox, bottombar and topbar. Default pre-0.21.0 was 'box'.
Sets the style of the seekbar, slider (diamond marker), knob (circle marker with guide), or bar (fill). Default pre-0.21.0 was 'slider'.
Size of the deadzone. The deadzone is an area that makes the mouse act like leaving the window. Movement there won't make the OSC show up and it will hide immediately if the mouse enters it. The deadzone starts at the window border opposite to the OSC and the size controls how much of the window it will span. Values between 0.0 and 1.0, where 0 means the OSC will always popup with mouse movement in the window, and 1 means the OSC will only show up when the mouse hovers it. Default pre-0.21.0 was 0.
Minimum amount of pixels the mouse has to move between ticks to make the OSC show up. Default pre-0.21.0 was 3.
Enable the OSC when windowed
Enable the OSC when fullscreen
Scale factor of the OSC when windowed.
Scale factor of the OSC when fullscreen
Scale factor of the OSC when rendered on a forced (dummy) window
Scale the OSC with the video
notries to keep the OSC size constant as much as the window size allows
Vertical alignment, -1 (top) to 1 (bottom)
Horizontal alignment, -1 (left) to 1 (right)
Margin from bottom (bottombar) or top (topbar), in pixels
Alpha of the background box, 0 (opaque) to 255 (fully transparent)
Duration in ms until the OSC hides if no mouse movement, must not be negative
Duration of fade out in ms, 0 = no fade
Size of the tooltip outline when using bottombar or topbar layouts
Show total time instead of time remaining
Display timecodes with milliseconds
Default: auto (auto hide/show on mouse move)
The OSC script listens to certain script commands. These commands can bound
input.conf, or sent by other scripts.
- Show a message on screen using the OSC. First argument is the message, second the duration in seconds.
- Controls visibility mode
auto(on mouse move) /
cycleto cycle between the modes
You could put this into
input.conf to hide the OSC with the
a key and
to set auto mode (the default) with
a script-message osc-visibility never b script-message osc-visibility auto
- Shows a limited view of the respective type of list using the OSC. First argument is duration in seconds.