ConfigsApr 23, 2026·3 min read

mpv — Minimalist High-Performance Media Player

mpv is a free, open-source command-line media player forked from MPlayer and mplayer2. It supports a wide range of video and audio formats, hardware decoding, and scripting via Lua and JavaScript, all with minimal resource usage.

Introduction

mpv is a media player focused on clean design, performance, and scriptability. Forked from MPlayer/mplayer2, it dropped legacy baggage in favor of modern APIs and a scriptable architecture. It is widely used as both a standalone player and an embedded playback engine in other applications.

What mpv Does

  • Plays virtually any audio and video format through FFmpeg/libav integration
  • Supports hardware-accelerated decoding via VAAPI, VDPAU, VideoToolbox, and D3D11
  • Provides high-quality video output with configurable shaders, color management, and interpolation
  • Allows automation and extension through Lua and JavaScript scripting
  • Serves as a library (libmpv) that other applications embed for media playback

Architecture Overview

mpv uses FFmpeg for demuxing and decoding, then routes output through its own video and audio pipelines. The video output layer supports OpenGL, Vulkan, and platform-native APIs with a shader-based rendering chain. Configuration is file-based (mpv.conf) with per-directory and per-file overrides, and the OSD is rendered via libass.

Self-Hosting & Configuration

  • Place global config in ~/.config/mpv/mpv.conf for persistent settings
  • Add custom keybindings in ~/.config/mpv/input.conf to override defaults
  • Install user scripts from the mpv wiki (e.g., quality-menu, autoload) into ~/.config/mpv/scripts/
  • Enable hardware decoding with --hwdec=auto for reduced CPU usage
  • Use profiles in mpv.conf to switch between quality presets (e.g., [low-latency] for streaming)

Key Features

  • Extremely lightweight with no persistent background processes or GUI chrome
  • Advanced subtitle rendering with full ASS/SSA support and on-the-fly style overrides
  • Protocol support for HTTP, HTTPS, RTSP, and streaming playlists (HLS, DASH)
  • OSC (on-screen controller) is optional and fully customizable via Lua
  • libmpv API lets developers embed mpv in Electron, Qt, GTK, or any other UI toolkit

Comparison with Similar Tools

  • VLC — more beginner-friendly with a full GUI, but heavier on resources and less scriptable
  • MPlayer — the original ancestor; mpv modernized its codebase and dropped broken legacy features
  • FFplay — even more minimal but lacks mpv's rendering pipeline, shader support, and scripting
  • IINA — macOS-only player built on libmpv with a native Cocoa interface

FAQ

Q: Does mpv have a GUI? A: mpv includes a minimal on-screen controller (OSC). For a full GUI, use frontends like IINA (macOS) or Celluloid (Linux).

Q: Can mpv play YouTube videos? A: Yes, when paired with yt-dlp. Run: mpv https://youtube.com/watch?v=ID and mpv will invoke yt-dlp automatically if installed.

Q: How do I enable hardware decoding? A: Add hwdec=auto to your mpv.conf or pass --hwdec=auto on the command line.

Q: What is libmpv used for? A: libmpv is the embeddable library version of mpv. Applications like IINA, Celluloid, and Stremio use it for media playback.

Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets