-
Notifications
You must be signed in to change notification settings - Fork 0
Building on Linux
Martin Vallevand edited this page Mar 23, 2026
·
10 revisions
libmpv SDK for Linux x86_64, built with VAAPI hardware decoding, teletext support and a clean minimal dependency set.
- OpenGL render API (
mpv_render_context/MPV_RENDER_API_TYPE_OPENGL) - VAAPI hardware decoding (Intel/AMD)
- VDPAU hardware decoding (NVIDIA)
- ALSA, PulseAudio and PipeWire audio output
- LuaJIT scripting
- Blu-ray playback (
libbluray) - Teletext subtitles (
libzvbi— statically linked into avcodec) - Wayland + X11 display output
- Generic x86-64 CPU baseline (SSE2 minimum)
- No Vulkan, no encoders, no capture devices
| mpv tag | FFmpeg | libplacebo |
|---|---|---|
| v0.41.0 | 7.1.1 | source-built (no Vulkan, no avdevice) |
| v0.40.0 | 7.1.1 | source-built |
| v0.39.0 | 6.1.1 | source-built |
| v0.38.0 | 6.1.1 | source-built |
| v0.37.0 | 6.1.1 | source-built |
| File | Link |
|---|---|
| SDK | libmpv-sdk-v0.41.0-linux-x86_64.tar.gz |
| SDK SHA256 | libmpv-sdk-v0.41.0-linux-x86_64.sha256 |
| Runtime | libmpv-runtime-v0.41.0-linux-x86_64.tar.gz |
| Runtime SHA256 | libmpv-runtime-v0.41.0-linux-x86_64.sha256 |
| File | Link |
|---|---|
| SDK | libmpv-sdk-v0.40.0-linux-x86_64.tar.gz |
| SDK SHA256 | libmpv-sdk-v0.40.0-linux-x86_64.sha256 |
| Runtime | libmpv-runtime-v0.40.0-linux-x86_64.tar.gz |
| Runtime SHA256 | libmpv-runtime-v0.40.0-linux-x86_64.sha256 |
| File | Link |
|---|---|
| SDK | libmpv-sdk-v0.39.0-linux-x86_64.tar.gz |
| SDK SHA256 | libmpv-sdk-v0.39.0-linux-x86_64.sha256 |
| Runtime | libmpv-runtime-v0.39.0-linux-x86_64.tar.gz |
| Runtime SHA256 | libmpv-runtime-v0.39.0-linux-x86_64.sha256 |
| File | Link |
|---|---|
| SDK | libmpv-sdk-v0.38.0-linux-x86_64.tar.gz |
| SDK SHA256 | libmpv-sdk-v0.38.0-linux-x86_64.sha256 |
| Runtime | libmpv-runtime-v0.38.0-linux-x86_64.tar.gz |
| Runtime SHA256 | libmpv-runtime-v0.38.0-linux-x86_64.sha256 |
| File | Link |
|---|---|
| SDK | libmpv-sdk-v0.37.0-linux-x86_64.tar.gz |
| SDK SHA256 | libmpv-sdk-v0.37.0-linux-x86_64.sha256 |
| Runtime | libmpv-runtime-v0.37.0-linux-x86_64.tar.gz |
| Runtime SHA256 | libmpv-runtime-v0.37.0-linux-x86_64.sha256 |
chmod +x build-libmpv-linux.sh
./build-libmpv-linux.sh v0.41.0 v0.40.0 v0.39.0 v0.38.0 v0.37.0sudo apt-get install -y \
build-essential nasm yasm pkg-config \
meson ninja-build cmake git \
autoconf automake libtool gettext \
libass-dev libfreetype6-dev libfribidi-dev libharfbuzz-dev \
libbluray-dev liblcms2-dev libluajit-5.1-dev \
libfontconfig-dev libjpeg-dev zlib1g-dev libpng-dev \
libva-dev libvdpau-dev
# Note: libplacebo is built from source by the script - no need to install libplacebo-devRemove these dev packages before building to prevent mpv picking them up:
sudo apt-get remove -y libavdevice-dev libcdio-dev libcdio-paranoia-devNote on libcurl: If you see a conflict between libcurl4-gnutls-dev and libcurl4-openssl-dev, keep whichever is already installed — both work fine for libmpv. Pin it to prevent conflicts:
sudo apt-mark hold libcurl4-gnutls-dev # or libcurl4-openssl-devsudo pacman -S --needed \
base-devel nasm yasm pkgconf meson ninja cmake git \
autoconf automake libtool gettext \
libass freetype2 fribidi harfbuzz \
libbluray lcms2 luajit \
fontconfig libjpeg-turbo zlib libpng \
libplacebo libva libvdpau| Variable | Default | Purpose |
|---|---|---|
FFMPEG6_VERSION |
6.1.1 |
FFmpeg version for mpv < v0.40.0 |
FFMPEG7_VERSION |
7.1.1 |
FFmpeg version for mpv >= v0.40.0 |
LIBPLACEBO_VERSION |
7.351.0 |
libplacebo version (source-built, no Vulkan) |
ZVBI_VERSION |
0.2.44 |
libzvbi version (source-built, static) |
WORK_DIR |
$PWD/work |
Scratch space for sources and builds |
OUT_DIR |
$PWD/out |
Output directory for tarballs |
INSTALL_PREFIX |
$HOME/.local |
Optional install prefix |
JOBS |
nproc |
Parallel build jobs |
- libplacebo is built from source with Vulkan disabled — avoids pulling in
libavdevice,libcaca,libSDL2and FireWire libraries - libzvbi is built from source and statically linked into
avcodec-NN.so— no extra.soto ship - The script is fully resumable — stamp files prevent redundant rebuilds
- Remove
libavdevice-devandlibcdio-devbefore building — mpv's meson finds them by scanning/usr/libdirectly, bypassing PKG_CONFIG_PATH
| Setting | Value |
|---|---|
| CPU | 8 cores, type: host
|
| RAM | 16 GB, balloon: disabled |
| Disk | 40 GB SSD/NVMe |
| Guest OS | Ubuntu 22.04 or Debian 12 |
Set balloon: 0 to prevent memory reclaim during linking.
include/
mpv/
client.h
render.h
render_gl.h
stream_cb.h
lib/
libmpv.so.2
libmpv.so -> symlink
pkgconfig/
libmpv.pc
libmpv.so.2
libavcodec.so.NN
libavfilter.so.NN
libavformat.so.NN
libavutil.so.NN
libswresample.so.N
libswscale.so.N
Install the runtime libs to /usr/local/lib so yauiclient runs directly:
sudo cp libmpv.so* libplacebo.so* /usr/local/lib/
sudo ldconfig
./yauiclientThe source-built libplacebo.so.351 coexists safely with any system libplacebo since the sonames differ.