Skip to main content
The stats overlay is a built-in Lua script that displays detailed playback statistics and performance information directly on the OSD. It is enabled by default in all mpv builds with Lua support.

Enabling and disabling

The stats overlay is loaded automatically. To disable it:
Or in your config file:

Basic usage

1

Show stats briefly

Press i to display stats for a fixed duration (default: 4 seconds), then they disappear automatically.
2

Toggle stats permanently

Press I (capital i) to keep stats visible until toggled off again. Press I again or ESC to hide them.
3

Show key bindings

Press ? to toggle the display of active key bindings.

Default key bindings

Activation

Scroll controls (on scrollable pages)

Key bindings page (page 4)

When stats are toggled on

Pages overview

The default page. Shows:
  • Video codec, format, resolution, framerate, bitrate
  • Audio codec, sample rate, channels, bitrate
  • Current A/V sync offset
  • Dropped frame count
  • Cache fill status and buffer duration
  • Optional graphs for vsync ratio and jitter (when toggled, if plot_vsync_ratio / plot_vsync_jitter are enabled)
Shows per-frame timing data including decoder, filter, and display times. Supports scrolling for long lists. Optionally shows graphs for performance data (plot_perfdata=yes).
Shows the demuxer cache status, including bytes in cache, cache ranges, and timestamps. Optionally shows a cache fill graph (plot_cache=yes in toggled mode).
Lists all active key bindings and the commands they run, grouped by command type. Excludes stats script internal keys.You can also print this list to the terminal and quit immediately:
Disable escape sequences in the output:
Limit to built-in bindings only:
Detailed information about selected tracks (or all tracks, depending on track_info_selected_only): codec, format, bitrate, language, metadata.
Internal performance counters including CPU/thread time per subsystem and per Lua script. Selecting this page for the first time enables data collection, which has a small ongoing performance impact.
The internal data page can itself use significant CPU and GPU resources. Treat it as a debugging tool only.

Configuration

Configure the stats script through ~/.config/mpv/script-opts/stats.conf or via --script-opts on the command line (prefix options with stats-):

Timing options

integer (seconds)
default:"4"
How long the stats display stays on screen when triggered with i (oneshot mode).
integer (seconds)
default:"1"
How frequently the stats display refreshes when in toggled mode (I).

Key binding options

default:"1"
Key to show page 1.
default:"2"
Key to show page 2.
default:"3"
Key to show page 3.
default:"4"
Key to show page 4.
default:"5"
Key to show page 5.
default:"0"
Key to show page 0 (internal data).
default:"ESC"
Key to close the stats when in toggled mode.
default:"UP"
Scroll up on scrollable pages.
default:"DOWN"
Scroll down on scrollable pages.
Search key bindings on page 4.
integer
default:"1"
Number of lines to scroll per key press on scrollable pages.

Display options

yes|no
default:"no"
When yes, stats text is not overwritten by other scripts printing to the OSD. When no, any script writing to the OSD can overwrite the stats. Enabling this can cause overlapping text if multiple scripts write simultaneously.
yes|no
default:"yes"
When yes, page 5 shows only selected tracks. When no, all tracks in the file are listed.

File tag limits

integer (bytes)
default:"128"
Hide file metadata tags longer than this many bytes.
integer
default:"16"
Show at most this many file metadata tags.
yes|no
default:"yes"
Clip lines to the terminal width when printing to the terminal (used with bindlist).

Graph options

yes|no
default:"no"
Show performance graphs on page 2.
yes|no
default:"no"
Show a vsync ratio graph on page 1 (toggled mode only).
yes|no
default:"no"
Show a vsync jitter graph on page 1 (toggled mode only).
yes|no
default:"yes"
Show a cache fill graph on page 3 (toggled mode only).
yes|no
default:"no"
Enable tone-mapping LUT visualization automatically (toggled mode only).
yes|no
default:"yes"
Clear graph data buffers when toggling stats off and on.

Appearance options

string
default:"same as osd-font"
Font family for stats text. Should support multiple weights for best appearance.
string
default:"monospace"
Monospaced font for aligned columns. Monospaced digits are sufficient.
integer
default:"20"
Font size for stats text in scaled pixels.
color (BBGGRR hex)
default:"same as osd-color"
Text color. Note: unlike most mpv color options, stats colors use ASS tag order: BBGGRR (blue-green-red), not RRGGBB.
float
default:"1.65"
Outline size drawn around stats text.
color (BBGGRR hex)
default:"same as osd-border-color"
Text outline color (BBGGRR order).
float
default:"same as --osd-shadow-offset"
Horizontal shadow offset in scaled pixels.
float
default:"same as --osd-shadow-offset"
Vertical shadow offset in scaled pixels.
color (BBGGRR hex)
default:"same as osd-shadow-color"
Shadow color (BBGGRR order).
integer (0–255)
default:"11"
Transparency of text, borders, and shadows when their respective colors are specified. 0 is fully opaque, 255 is fully transparent.
auto|yes|no
default:"auto"
Scale stats text with the video/window:
  • auto — scale with OSD (respects --osd-scale-by-window)
  • no — fixed size regardless of window dimensions

Graph colors

Graph colors use BBGGRR hex order (not RRGGBB).
color (BBGGRR)
default:"0000FF"
Border color for graph backgrounds.
float
default:"1.25"
Border width for graph backgrounds.
color (BBGGRR)
default:"262626"
Background color for graphs.
color (BBGGRR)
default:"FFFFFF"
Foreground color for graph data lines.

Custom key bindings

You can add extra bindings in input.conf to trigger specific stats pages:

Example configuration