# mpv

> Free command-line media player supporting many audio/video formats, codecs and subtitle types, with GPU shader-based rendering and optional hardware decoding.

Stars: 37.6k · Language: C · Categories: System

- Repository: https://github.com/mpv-player/mpv
- Website: https://mpv.io
- Page: https://www.trmn.sh/tools/mpv

## Install

- Build from source (meson): `meson setup build`
- Build from source (meson): `meson compile -C build`
- Build from source (meson): `meson install -C build`

## Overview

mpv is a free, open-source media player that runs from the command line. It plays a wide range of media file formats, audio and video codecs, and subtitle types. It is based on the MPlayer project, via the intermediate mplayer2 project. It runs on Linux, Windows 10 1607 or later, and macOS 10.15 or later.

The main video output renders and scales video with shaders instead of GPU fixed-function hardware. Hardware decoding is not enabled by default and must be turned on with the `--hwdec` option. On low-power GPUs that show tearing or stutter, the README recommends `--profile=fast`. A legacy output such as `--vo=xv` exists on Linux, but it is not recommended or supported. Optional components include Lua for the OSC pseudo-GUI and youtube-dl integration, libass for OSD and text subtitles, and uchardet for subtitle charset detection.

mpv has a client C API, user scripts, and configurable key and OSC bindings. It is aimed at users who want a scriptable player and at developers who embed or extend it. It is built with meson. Optional build helpers include a libplacebo subproject and the mpv-build wrapper, which compiles FFmpeg and libass statically into the player. Releases are cut once or twice a year as 0.X.0 versions, and only the latest release is supported. The license is GPLv2 or later by default, or LGPLv2.1 or later with `-Dgpl=false`.

### Installation

```bash
# via Build from source (meson)
meson setup build
meson compile -C build
meson install -C build
```

## Alternatives

- [hashcat](https://www.trmn.sh/tools/hashcat.md): Password recovery tool that cracks hashes on GPUs and CPUs using CUDA, HIP, Metal or OpenCL, with 590+ hash modes and 10 attack modes. (C, 27.2k stars)
- [fastfetch](https://www.trmn.sh/tools/fastfetch.md): System information tool that displays hardware and OS details with customizable ASCII art logos and module configuration (C, 25.2k stars)
- [tmux](https://www.trmn.sh/tools/tmux.md): Terminal multiplexer that creates, manages, and controls multiple terminal sessions from a single screen (C, 50.0k stars)
- [GoAccess](https://www.trmn.sh/tools/goaccess.md): Real-time web server log analyzer written in C that shows HTTP statistics in a terminal or a live HTML dashboard, with JSON and CSV export. (C, 21.1k stars)
- [nvtop](https://www.trmn.sh/tools/nvtop.md): htop-like GPU and accelerator task monitor supporting NVIDIA, AMD, Intel, Apple, and other vendors (C, 11.1k stars)

---

Canonical: https://www.trmn.sh/tools/mpv
