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
menu
menu
pl prev / pl next
pl prev / pl next
| Action | Result |
|---|---|
| Left-click | Play previous / next file in playlist |
| Shift+left-click | Show the playlist |
| Middle-click | Show the playlist |
| Right-click | Open the playlist menu |
title
title
Displays the current playlist position and media title, filename, or custom title. While hovering the seekbar, shows the target chapter name instead.
| Action | Result |
|---|---|
| Left-click | Show file and track info |
| Shift+left-click | Show the file path |
| Middle-click | Show the file path |
| Right-click | Open the history menu |
cache
cache
Shows the current cache fill status.
play (play/pause button)
play (play/pause button)
skip back / skip frwd
skip back / skip frwd
| Action | Result |
|---|---|
| Left-click (skip back) | Go to start of current chapter / previous chapter |
| Left-click (skip frwd) | Go to next chapter |
| Shift+left-click | Show chapter list |
| Middle-click | Show chapter list |
| Right-click | Open the chapter menu |
time elapsed / time left
time elapsed / time left
| Action | Result |
|---|---|
| Left-click (time elapsed) | Toggle millisecond display |
| Left-click (time left) | Toggle between total and remaining time |
seekbar
seekbar
Indicates current playback position and shows chapter markers.
| Action | Result |
|---|---|
| Left-click | Seek to clicked position |
| Right-click | Seek to nearest chapter |
| Mouse wheel | Seek forward / backward |
audio / sub track selectors
audio / sub track selectors
Shows the selected track and the total number of available tracks.
| Action | Result |
|---|---|
| Left-click | Cycle tracks forward |
| Shift+left-click | Cycle tracks backward |
| Middle-click | Cycle tracks backward |
| Right-click | Open the track selection menu |
| Mouse wheel | Cycle tracks forward / backward |
vol (volume)
vol (volume)
| Action | Result |
|---|---|
| Left-click | Toggle mute |
| Right-click | Open audio device menu |
| Mouse wheel | Volume up / down |
fs (fullscreen)
fs (fullscreen)
| Action | Result |
|---|---|
| Left-click | Toggle fullscreen |
| Right-click | Toggle window maximized state |
Key bindings
| Key | Action |
|---|---|
del | Cycle OSC visibility: auto (mouse) → always → never |
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
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
Style of the playback position marker on the seekbar.
Size of the seek handle when
seekbarstyle is diamond or knob. Relative to the full seekbar height.Use keyframe-based seeking when dragging the seekbar. Set to
no for exact seeking on drag (may be slower).Display style for seekable (cached) ranges on the seekbar.
Visibility and scaling
Controls when the OSC is visible:
auto— show on mouse movement, hide after inactivityalways— always visiblenever— always hidden
Scale factor for the OSC when the player is in windowed mode.
Scale factor for the OSC when the player is in fullscreen mode.
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
Show the OSC in windowed mode.
Show the OSC in fullscreen mode.
Timing and appearance
Milliseconds of mouse inactivity before the OSC hides. Must not be negative.
Duration of the fade-in and fade-out animations. Set to
0 to disable fading.Display timecodes with millisecond precision.
Show total duration instead of time remaining in the right timecode display.
Template string for the OSC title. Supports property expansion. Default:
${!playlist-count==1:[${playlist-pos-1}/${playlist-count}] }${media-title}Background box transparency for
box and slimbox layouts. 0 is opaque, 255 is fully transparent.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.
Background color of the OSC.
Color of timecodes and the seekbar.
Color of the title text.
Color of the main playback buttons.
Window controls
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.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:
| Command | Effect |
|---|---|
osc-visibility never | Hide the OSC |
osc-visibility auto | Set to mouse-triggered mode |
osc-visibility always | Always show the OSC |
osc-visibility cycle | Cycle through visibility modes |
osc-show | Trigger the OSC to appear (as if the mouse moved) |
osc-hide | Hide the OSC (when in auto mode) |
osc-idlescreen yes/no/cycle | Control the mpv logo idle screen |
input.conf: