Skip to main content
mpv uses Meson as its build system. Autotools and CMake are not supported.

Prerequisites

Install Meson from your distribution’s package manager or via PyPI:
Meson requires Meson >= 1.3.0 and a C11-capable compiler (GCC or Clang).

Essential dependencies

The following libraries must be present before configuring the build: Optional dependencies:

Basic build

1

Configure

Run meson setup to create a build directory and configure the project:
Meson detects available libraries automatically. Review detected features in the output.
2

Compile

3

Install

The default install prefix is /usr/local. Override with --prefix:
To see all available build options after configuring:
You can also inspect meson_options.txt in the source root directly. Build logs are written to build/meson-logs/.

libplacebo as a subproject

If a sufficiently recent libplacebo is not available on your system, Meson can build it as a statically linked subproject:
Run meson setup build afterwards — Meson will detect and build libplacebo automatically.

Notable build options

Platform-specific instructions

Install development packages for the required libraries using your package manager.Debian / Ubuntu:
Fedora:
Then build:
For X11 output support, also install:

Using mpv-build

mpv-build is a wrapper that compiles FFmpeg and libass from source and then statically links them into mpv. It is useful when you need specific FFmpeg versions or features not packaged by your distribution.

LGPL mode

By default, mpv is licensed GPLv2+. To build under LGPLv2.1+ (which removes some features and enables use in proprietary software), pass -Dgpl=false:
The client API header (include/mpv/client.h) is always ISC licensed, independent of the -Dgpl setting.
Run mpv --version after installation to confirm the build succeeded and check which features were compiled in.