The OSC requires Lua support at compile time. It is enabled by default in all official mpv builds.
Enabling and disabling
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. Pressdel to cycle between auto (mouse-triggered), always visible, and never visible.
Interface layout
Control reference
pl prev / pl next
pl prev / pl next
title
title
Displays the current playlist position and media title, filename, or custom title. While hovering the seekbar, shows the target chapter name instead.
cache
cache
Shows the current cache fill status.
skip back / skip frwd
skip back / skip frwd
time elapsed / time left
time elapsed / time left
seekbar
seekbar
Indicates current playback position and shows chapter markers.
audio / sub track selectors
audio / sub track selectors
Shows the selected track and the total number of available tracks.
vol (volume)
vol (volume)
fs (fullscreen)
fs (fullscreen)
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:
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 topslimbottombar— thinner version of bottombarslimtopbar— thinner version of topbarbox— compact floating boxslimbox— slimmer floating boxfloating— 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 inactivityalways— always visiblenever— 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 inbottombar and topbar layouts. Each button is configured with a set of custom_button_N_* options:
Script commands
Other scripts andinput.conf bindings can send commands to the OSC:
Example
input.conf: