How to Show Stats Like Frame Drops and Bitrate in mpv?
This article provides a quick guide on how to display real-time on-screen performance statistics, such as frame drops, bitrates, codecs, and resolution, while watching videos in the mpv media player. You will learn the default keyboard shortcuts to toggle these overlays and how to customize them for a better viewing or troubleshooting experience.
Default Keyboard Shortcuts for mpv Stats
The mpv media player comes with a built-in statistics overlay that requires no extra plugins or complex configuration. You can trigger it instantly using your keyboard:
i(lowercase): Displays the stats overlay temporarily. It will automatically fade away after a few seconds.I(uppercase /Shift + i): Toggles the stats overlay permanently. The information will stay on your screen until you pressShift + iagain to dismiss it.
What Information is Displayed?
When you activate the stats overlay, mpv opens a multi-page data
screen. You can navigate through different pages by pressing the
corresponding numbers on your keyboard (e.g., 1,
2, 3) while the overlay is active.
Page 1: Current Playback and Performance
This is the most critical page for troubleshooting lag or buffering issues. It highlights:
- Frame Drops: Lists both the current and total number of dropped frames. If this number is rapidly climbing, your hardware might be struggling to decode the video.
- Bitrate: Displays the current video and audio bitrates in real-time.
- Resolution and FPS: Shows the native video dimensions alongside the actual frame rate.
Page 2: Codecs and Hardware Acceleration
This page details how the video is being processed:
- Decoder: Shows whether mpv is using your graphics
card (hardware acceleration like
vaapi,nvdec, ordxva2) or your CPU (software decoding) to run the file. - Codecs: Displays the specific video and audio formats (e.g., HEVC, H.264, AV1, Opus).
Page 3: Cache and Network Info
If you are streaming a video directly via a URL (using yt-dlp integration), this page tracks your network health, including total cache size and speed.
Customizing the Stats Overlay
If you want to change how long the temporary stats stay on screen, or
if you want to remap the toggle to a different key, you can modify your
input.conf file.
- Locate your
input.conffile (usually found in~/.config/mpv/on Linux/macOS or%APPDATA%\mpv\on Windows). - Add custom keybindings using the
script-bindingcommand:
# Change temporary stats to the 'v' key
v script-binding stats/display-stats
# Change permanent stats toggle to the 'V' key
V script-binding stats/display-stats-toggle
By utilizing these built-in tools, you can easily monitor your playback performance and pinpoint exactly why a video might be stuttering or dropping frames.