Skip to content
Martin Vallevand edited this page Mar 16, 2026 · 7 revisions

libmpv-mingw64-builder

A build script that produces a yauiclient-optimised libmpv SDK for Windows x64.

Each build produces three files per mpv version tag:

File Contents
libmpv-sdk-vX.XX.X.tar.gz Headers, import libs (MSVC + MinGW), pkg-config
libmpv-dll-vX.XX.X.7z libmpv-2.dll only — for installer DLL swap
libmpv-runtime-vX.XX.X.tar.gz FFmpeg DLLs + libplacebo-NNN.dll (manual deploy reference)

Feature profile

  • OpenGL render API (mpv_render_context / MPV_RENDER_API_TYPE_OPENGL)
  • D3D11VA + DXVA2 hardware decoding (copy mode — compatible with OpenGL render path)
  • WASAPI audio output
  • LuaJIT scripting
  • Blu-ray playback (libbluray)
  • HTTPS streaming via Windows SChannel (tls-verify option supported)
  • Ivy Bridge CPU baseline (AVX1 / SSE4.2, no AVX2 — runs on older Intel hardware)
  • No Vulkan, no encoders, no capture devices

MPV versions

mpv tag FFmpeg libplacebo
v0.41.0 7.1.1 shared DLL (libplacebo-351.dll) — self-contained, Windows system DLLs only
v0.40.0 7.1.1 shared DLL — self-contained
v0.39.0 6.1.1 static (bundled into libmpv-2.dll)
v0.38.0 6.1.1 static (bundled into libmpv-2.dll)
v0.37.0 6.1.1 static (bundled into libmpv-2.dll)

SDK tar.gz layout

include/
  mpv/
    client.h
    render.h
    render_gl.h
    stream_cb.h
lib/
  libmpv-2.dll        ← also present here for convenience
  libmpv.dll.a        ← MinGW import lib
  libmpv.lib          ← MSVC import lib
  libmpv.def          ← export definitions
  pkgconfig/
    libmpv.pc

Runtime tar.gz layout

libmpv-2.dll
avcodec-NN.dll
avfilter-NN.dll
avformat-NN.dll
avutil-NN.dll
swresample-N.dll
swscale-N.dll
libplacebo-NNN.dll    ← v0.40.0 and v0.41.0 only

Downloads

v0.41.0

File Link
Runtime libmpv-runtime-v0.41.0.tar.gz
DLL only libmpv-dll-v0.41.0.7z
DLL SHA256 libmpv-dll-v0.41.0.sha256
SDK libmpv-sdk-v0.41.0.tar.gz

v0.40.0

File Link
Runtime libmpv-runtime-v0.40.0.tar.gz
DLL only libmpv-dll-v0.40.0.7z
DLL SHA256 libmpv-dll-v0.40.0.sha256
SDK libmpv-sdk-v0.40.0.tar.gz

v0.39.0

File Link
Runtime libmpv-runtime-v0.39.0.tar.gz
DLL only libmpv-dll-v0.39.0.7z
DLL SHA256 libmpv-dll-v0.39.0.sha256
SDK libmpv-sdk-v0.39.0.tar.gz

v0.38.0

File Link
Runtime libmpv-runtime-v0.38.0.tar.gz
DLL only libmpv-dll-v0.38.0.7z
DLL SHA256 libmpv-dll-v0.38.0.sha256
SDK libmpv-sdk-v0.38.0.tar.gz

v0.37.0

File Link
Runtime libmpv-runtime-v0.37.0.tar.gz
DLL only libmpv-dll-v0.37.0.7z
DLL SHA256 libmpv-dll-v0.37.0.sha256
SDK libmpv-sdk-v0.37.0.tar.gz

Build script

build-libmpv-mingw64.sh

Run from an MSYS2 MinGW64 shell. Make it executable first:

chmod +x build-libmpv-mingw64.sh

Builds one or more mpv version tags in a single invocation:

./build-libmpv-mingw64.sh v0.41.0 v0.40.0 v0.39.0 v0.38.0 v0.37.0

Prerequisites (MSYS2 MinGW64)

pacman -S --needed \
  mingw-w64-x86_64-libass          \
  mingw-w64-x86_64-libplacebo      \
  mingw-w64-x86_64-freetype        \
  mingw-w64-x86_64-harfbuzz        \
  mingw-w64-x86_64-lcms2           \
  mingw-w64-x86_64-luajit          \
  mingw-w64-x86_64-libjpeg-turbo   \
  mingw-w64-x86_64-libbluray       \
  mingw-w64-x86_64-spirv-cross     \
  mingw-w64-x86_64-llvm            \
  mingw-w64-x86_64-tools-git

Environment overrides

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)
WORK_DIR $PWD/work Scratch space for sources and builds
OUT_DIR $PWD/out Output directory for tarballs and 7z files
JOBS nproc Parallel build jobs
CUSTOM_PATCH_DIR (none) Directory with ffmpeg/ and mpv/ patch subdirs

Notes

  • Always launch MSYS2 from a Windows Explorer shortcut, not from JP Software TCC/LE — TCC intercepts windres child processes.
  • The script is fully resumable — stamp files prevent redundant rebuilds. Delete a stamp to force a rebuild of that component.
  • libplacebo is built from source with Vulkan disabled and all deps statically linked. The resulting DLL depends only on Windows system DLLs.
  • For v0.40.0+ libplacebo-NNN.dll is included in the runtime tar.gz. For older tags it is statically linked into libmpv-2.dll.

Using this SDK

See Using-the-SDK for integration guides for specific projects.

Licenses

See Licenses for the open source license information for all distributed binaries.

Clone this wiki locally