2013-10-15 20:27:08 +00:00
|
|
|
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.
|
|
|
|
|
2015-06-17 17:37:25 +00:00
|
|
|
The OSC is enabled by default if mpv was compiled with Lua support. It can be
|
2013-10-17 22:32:07 +00:00
|
|
|
disabled entirely using the ``--osc=no`` option.
|
2013-10-15 21:46:12 +00:00
|
|
|
|
2013-10-15 20:27:08 +00:00
|
|
|
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.
|
|
|
|
|
|
|
|
The Interface
|
|
|
|
~~~~~~~~~~~~~
|
|
|
|
|
2013-10-15 21:22:52 +00:00
|
|
|
::
|
|
|
|
|
|
|
|
+------------------+-----------+--------------------+
|
|
|
|
| playlist prev | title | playlist next |
|
|
|
|
+-------+------+---+--+------+-+----+------+--------+
|
|
|
|
| audio | skip | seek | | seek | skip | full |
|
|
|
|
+-------+ back | back | play | frwd | frwd | screen |
|
|
|
|
| sub | | | | | | |
|
|
|
|
+-------+------+------+------+------+------+--------+
|
|
|
|
| seekbar |
|
|
|
|
+----------------+--------------+-------------------+
|
|
|
|
| time passed | cache status | time remaining |
|
|
|
|
+----------------+--------------+-------------------+
|
2013-10-15 20:27:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
playlist prev
|
|
|
|
============= ================================================
|
|
|
|
left-click play previous file in playlist
|
|
|
|
shift+L-click show playlist
|
|
|
|
============= ================================================
|
|
|
|
|
|
|
|
title
|
|
|
|
| Displays current media-title or filename
|
2013-10-15 21:22:52 +00:00
|
|
|
|
2013-10-15 20:27:08 +00:00
|
|
|
============= ================================================
|
|
|
|
left-click show playlist position and length and full title
|
|
|
|
right-click show filename
|
|
|
|
============= ================================================
|
|
|
|
|
|
|
|
playlist next
|
|
|
|
============= ================================================
|
|
|
|
left-click play next file in playlist
|
|
|
|
shift+L-click show playlist
|
|
|
|
============= ================================================
|
|
|
|
|
|
|
|
audio and sub
|
|
|
|
| Displays selected track and amount of available tracks
|
2013-10-15 21:22:52 +00:00
|
|
|
|
2013-10-15 20:27:08 +00:00
|
|
|
============= ================================================
|
|
|
|
left-click cycle audio/sub tracks forward
|
|
|
|
right-click cycle audio/sub tracks backwards
|
|
|
|
shift+L-click show available audio/sub tracks
|
|
|
|
============= ================================================
|
|
|
|
|
|
|
|
skip back
|
|
|
|
============= ================================================
|
|
|
|
left-click go to beginning of chapter / previous chapter
|
|
|
|
shift+L-click show chapters
|
|
|
|
============= ================================================
|
|
|
|
|
|
|
|
seek back
|
|
|
|
============= ================================================
|
|
|
|
left-click skip back 5 seconds
|
|
|
|
right-click skip back 30 seconds
|
|
|
|
shift-L-click skip back 1 frame
|
|
|
|
============= ================================================
|
|
|
|
|
|
|
|
play
|
|
|
|
============= ================================================
|
|
|
|
left-click toggle play/pause
|
|
|
|
============= ================================================
|
|
|
|
|
|
|
|
seek frwd
|
|
|
|
============= ================================================
|
|
|
|
left-click skip forward 10 seconds
|
|
|
|
right-click skip forward 60 seconds
|
|
|
|
shift-L-click skip forward 1 frame
|
|
|
|
============= ================================================
|
|
|
|
|
|
|
|
skip frwd
|
|
|
|
============= ================================================
|
|
|
|
left-click go to next chapter
|
|
|
|
shift+L-click show chapters
|
|
|
|
============= ================================================
|
|
|
|
|
|
|
|
fullscreen
|
|
|
|
============= ================================================
|
|
|
|
left-click toggle fullscreen
|
|
|
|
============= ================================================
|
|
|
|
|
|
|
|
seekbar
|
|
|
|
| Indicates current playback position and position of chapters
|
2013-10-15 21:22:52 +00:00
|
|
|
|
2013-10-15 20:27:08 +00:00
|
|
|
============= ================================================
|
|
|
|
left-click seek to position
|
|
|
|
============= ================================================
|
|
|
|
|
|
|
|
time passed
|
|
|
|
| Shows current playback position timestamp
|
2013-10-15 21:22:52 +00:00
|
|
|
|
2013-10-15 20:27:08 +00:00
|
|
|
============= ================================================
|
|
|
|
left-click toggle displaying timecodes with milliseconds
|
|
|
|
============= ================================================
|
|
|
|
|
|
|
|
cache status
|
2013-10-26 09:12:08 +00:00
|
|
|
| Shows current cache fill status (only visible when below 45%)
|
2013-10-15 20:27:08 +00:00
|
|
|
|
|
|
|
time remaining
|
|
|
|
| Shows remaining playback time timestamp
|
2013-10-15 21:22:52 +00:00
|
|
|
|
2013-10-15 20:27:08 +00:00
|
|
|
============= ================================================
|
|
|
|
left-click toggle between total and remaining time
|
|
|
|
============= ================================================
|
|
|
|
|
2014-09-01 02:25:57 +00:00
|
|
|
Key Bindings
|
|
|
|
~~~~~~~~~~~~
|
2014-03-20 21:49:31 +00:00
|
|
|
|
2014-09-01 02:25:57 +00:00
|
|
|
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
|
2014-12-05 18:08:24 +00:00
|
|
|
different key. See the `Script Commands`_ section.
|
2014-05-23 11:24:27 +00:00
|
|
|
|
|
|
|
============= ================================================
|
2016-02-09 12:07:00 +00:00
|
|
|
del Cycles visibility between never / auto (mouse-move) / always
|
2014-05-23 11:24:27 +00:00
|
|
|
============= ================================================
|
2013-10-15 20:27:08 +00:00
|
|
|
|
|
|
|
Configuration
|
|
|
|
-------------
|
|
|
|
|
2014-05-23 11:24:27 +00:00
|
|
|
The OSC offers limited configuration through a config file
|
|
|
|
``lua-settings/osc.conf`` placed in mpv's user dir and through the
|
2014-12-14 23:31:30 +00:00
|
|
|
``--script-opts`` command-line option. Options provided through the command-line
|
2014-05-23 11:24:27 +00:00
|
|
|
will override those from the config file.
|
2013-10-15 20:27:08 +00:00
|
|
|
|
|
|
|
Config Syntax
|
|
|
|
~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
The config file must exactly follow the following syntax::
|
|
|
|
|
|
|
|
# this is a comment
|
2014-05-23 11:24:27 +00:00
|
|
|
optionA=value1
|
|
|
|
optionB=value2
|
2013-10-15 20:27:08 +00:00
|
|
|
|
|
|
|
``#`` can only be used at the beginning of a line and there may be no
|
|
|
|
spaces around the ``=`` or anywhere else.
|
|
|
|
|
2014-05-23 11:24:27 +00:00
|
|
|
Command-line Syntax
|
|
|
|
~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
To avoid collisions with other scripts, all options need to be prefixed with
|
|
|
|
``osc-``.
|
|
|
|
|
|
|
|
Example::
|
|
|
|
|
2014-12-14 23:31:30 +00:00
|
|
|
--script-opts=osc-optionA=value1,osc-optionB=value2
|
2014-05-23 11:24:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
Configurable Options
|
|
|
|
~~~~~~~~~~~~~~~~~~~~
|
2013-10-15 20:27:08 +00:00
|
|
|
|
|
|
|
``showwindowed``
|
|
|
|
| Default: yes
|
2015-05-01 18:59:18 +00:00
|
|
|
| Enable the OSC when windowed
|
2013-10-15 20:27:08 +00:00
|
|
|
|
|
|
|
``showfullscreen``
|
|
|
|
| Default: yes
|
2015-05-01 18:59:18 +00:00
|
|
|
| Enable the OSC when fullscreen
|
2013-10-15 20:27:08 +00:00
|
|
|
|
|
|
|
``scalewindowed``
|
2015-05-01 18:59:18 +00:00
|
|
|
| Default: 1.0
|
|
|
|
| Scale factor of the OSC when windowed
|
2013-10-15 20:27:08 +00:00
|
|
|
|
|
|
|
``scalefullscreen``
|
2015-05-01 18:59:18 +00:00
|
|
|
| Default: 1.0
|
|
|
|
| Scale factor of the OSC when fullscreen
|
2013-10-15 20:27:08 +00:00
|
|
|
|
|
|
|
``scaleforcedwindow``
|
2015-05-01 18:59:18 +00:00
|
|
|
| Default: 2.0
|
|
|
|
| Scale factor of the OSC when rendered on a forced (dummy) window
|
2013-10-15 20:27:08 +00:00
|
|
|
|
|
|
|
``vidscale``
|
|
|
|
| Default: yes
|
2015-05-01 18:59:18 +00:00
|
|
|
| Scale the OSC with the video
|
|
|
|
| ``no`` tries to keep the OSC size constant as much as the window size allows
|
2013-10-15 20:27:08 +00:00
|
|
|
|
|
|
|
``valign``
|
|
|
|
| Default: 0.8
|
|
|
|
| Vertical alignment, -1 (top) to 1 (bottom)
|
|
|
|
|
|
|
|
``halign``
|
2015-05-01 18:59:18 +00:00
|
|
|
| Default: 0.0
|
2013-10-15 20:27:08 +00:00
|
|
|
| Horizontal alignment, -1 (left) to 1 (right)
|
|
|
|
|
2013-10-17 22:32:07 +00:00
|
|
|
``boxalpha``
|
|
|
|
| Default: 80
|
|
|
|
| Alpha of the background box, 0 (opaque) to 255 (fully transparent)
|
|
|
|
|
2013-10-15 20:27:08 +00:00
|
|
|
``hidetimeout``
|
|
|
|
| Default: 500
|
2016-02-09 12:07:00 +00:00
|
|
|
| Duration in ms until the OSC hides if no mouse movement, must not be
|
|
|
|
negative
|
2013-10-15 20:27:08 +00:00
|
|
|
|
|
|
|
``fadeduration``
|
|
|
|
| Default: 200
|
|
|
|
| Duration of fade out in ms, 0 = no fade
|
|
|
|
|
|
|
|
``deadzonesize``
|
|
|
|
| Default: 0
|
|
|
|
| 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
|
2014-05-23 11:24:27 +00:00
|
|
|
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 and 1.
|
2013-10-15 20:27:08 +00:00
|
|
|
|
|
|
|
``minmousemove``
|
|
|
|
| Default: 3
|
|
|
|
| Minimum amount of pixels the mouse has to move between ticks to make
|
|
|
|
the OSC show up
|
|
|
|
|
2014-12-05 18:08:24 +00:00
|
|
|
``layout``
|
|
|
|
| Default: box
|
|
|
|
| The layout for the OSC. Currently available are: box, slimbox,
|
|
|
|
bottombar and topbar.
|
|
|
|
|
2014-11-13 09:19:28 +00:00
|
|
|
``seekbarstyle``
|
|
|
|
| Default: slider
|
|
|
|
| Sets the style of the seekbar, slider (diamond marker) or bar (fill)
|
|
|
|
|
2015-06-19 11:33:06 +00:00
|
|
|
``timetotal``
|
|
|
|
| Default: no
|
|
|
|
| Show total time instead of time remaining
|
|
|
|
|
|
|
|
``timems``
|
|
|
|
| Default: no
|
|
|
|
| Display timecodes with milliseconds
|
|
|
|
|
2016-02-09 12:07:00 +00:00
|
|
|
``visibility``
|
|
|
|
| Default: auto (auto hide/show on mouse move)
|
|
|
|
| Also supports ``never`` and ``always``
|
|
|
|
|
2014-05-23 11:24:27 +00:00
|
|
|
Script Commands
|
2014-03-20 21:49:31 +00:00
|
|
|
~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
The OSC script listens to certain script commands. These commands can bound
|
|
|
|
in ``input.conf``, or sent by other scripts.
|
|
|
|
|
2014-12-29 17:26:22 +00:00
|
|
|
``osc-message``
|
|
|
|
Show a message on screen using the OSC. First argument is the message,
|
|
|
|
second the duration in seconds.
|
|
|
|
|
2016-02-09 12:07:00 +00:00
|
|
|
``osc-visibility``
|
|
|
|
Controls visibility mode ``never`` / ``auto`` (on mouse move) / ``always``
|
|
|
|
and also ``cycle`` to cycle between the modes
|
2014-03-20 21:49:31 +00:00
|
|
|
|
2014-05-23 11:24:27 +00:00
|
|
|
Example
|
2014-03-20 21:49:31 +00:00
|
|
|
|
2014-05-23 11:24:27 +00:00
|
|
|
You could put this into ``input.conf`` to hide the OSC with the ``a`` key and
|
2016-02-09 12:07:00 +00:00
|
|
|
to set auto mode (the default) with ``b``::
|
2014-03-20 21:49:31 +00:00
|
|
|
|
2016-05-09 18:39:33 +00:00
|
|
|
a script-message osc-visibility never
|
|
|
|
b script-message osc-visibility auto
|
2014-03-20 21:49:31 +00:00
|
|
|
|