Skip to main content
The On-Screen Controller (OSC) is a minimal built-in GUI integrated into mpv that provides mouse-controllable playback controls. It is designed to make mpv accessible to new users and to enable precise direct seeking with a mouse.
The OSC requires Lua support at compile time. It is enabled by default in all official mpv builds.

Enabling and disabling

You can also disable it in your config file:

How the OSC appears

By default, the OSC appears whenever you move the mouse inside the player window and hides after 0.5 seconds of mouse inactivity, or when the mouse leaves the window. Press del to cycle between auto (mouse-triggered), always visible, and never visible.

Interface layout

Control reference

Displays the current playlist position and media title, filename, or custom title. While hovering the seekbar, shows the target chapter name instead.
Shows the current cache fill status.
Indicates current playback position and shows chapter markers.
Shows the selected track and the total number of available tracks.

Key bindings

Configuration

The OSC is configured through a config file or via --script-opts on the command line. Config file: ~/.config/mpv/script-opts/osc.conf Command line:
All option names must be prefixed with osc- on the command line.

Layout options

string
default:"bottombar"
The overall OSC layout. Available layouts:
  • bottombar — horizontal bar at the bottom (default)
  • topbar — horizontal bar at the top
  • slimbottombar — thinner version of bottombar
  • slimtopbar — thinner version of topbar
  • box — compact floating box
  • slimbox — slimmer floating box
  • floating — compact floating window controls
bar|diamond|knob
default:"bar"
Style of the playback position marker on the seekbar.
float
default:"0.6"
Size of the seek handle when seekbarstyle is diamond or knob. Relative to the full seekbar height.
yes|no
default:"yes"
Use keyframe-based seeking when dragging the seekbar. Set to no for exact seeking on drag (may be slower).
inverted|bar|line|slider|none
default:"inverted"
Display style for seekable (cached) ranges on the seekbar.

Visibility and scaling

auto|never|always
default:"auto"
Controls when the OSC is visible:
  • auto — show on mouse movement, hide after inactivity
  • always — always visible
  • never — always hidden
float
default:"1.0"
Scale factor for the OSC when the player is in windowed mode.
float
default:"1.0"
Scale factor for the OSC when the player is in fullscreen mode.
auto|yes|no
default:"auto"
Whether to scale the OSC with the video:
  • auto — scale with OSD (respects --osd-scale-by-window)
  • no — keep OSC size constant as the window resizes
yes|no
default:"yes"
Show the OSC in windowed mode.
yes|no
default:"yes"
Show the OSC in fullscreen mode.

Timing and appearance

integer (ms)
default:"500"
Milliseconds of mouse inactivity before the OSC hides. Must not be negative.
integer (ms)
default:"200"
Duration of the fade-in and fade-out animations. Set to 0 to disable fading.
yes|no
default:"no"
Display timecodes with millisecond precision.
yes|no
default:"no"
Show total duration instead of time remaining in the right timecode display.
string
Template string for the OSC title. Supports property expansion. Default: ${!playlist-count==1:[${playlist-pos-1}/${playlist-count}] }${media-title}
integer (0–255)
default:"80"
Background box transparency for box and slimbox layouts. 0 is opaque, 255 is fully transparent.
float (0.0–1.0)
default:"0.75"
Size of the deadzone — an area where mouse movement does not trigger the OSC. The deadzone spans this fraction of the window, starting from the edge opposite the OSC. 0 means the OSC appears anywhere in the window; 1 means only hovering the OSC itself shows it.

Colors

All color values use #RRGGBB format.
color
default:"#000000"
Background color of the OSC.
color
default:"#FFFFFF"
Color of timecodes and the seekbar.
color
default:"#FFFFFF"
Color of the title text.
color
default:"#FFFFFF"
Color of the main playback buttons.

Window controls

auto|left|right|no
default:"auto"
Whether to show window management controls (minimize, maximize, quit) over the video. Useful when the window has no system title bar.auto shows controls when there is no system title bar.
left|right
default:"right"
Which side to place window controls on.

Custom buttons

You can add up to several custom buttons in bottombar and topbar layouts. Each button is configured with a set of custom_button_N_* options:

Script commands

Other scripts and input.conf bindings can send commands to the OSC: Example input.conf:

Example configuration