* fix: link libmpv against the system libasound instead of a static build
A statically linked libasound fails at runtime with 'Unknown PCM
cards.pcm.default': the default PCM is resolved dynamically per sound card
(load_for_all_cards hook enumerating cards and loading cards/<driver>.conf),
and that machinery did not work in the vendored archive, so audio produced no
output even though the config file itself was found (the earlier
--with-configdir prefix bug is fixed).
Link libasound.so.2 dynamically from the system (libasound2-dev), exactly like
CoreAudio on macOS and WASAPI on Windows: the OS audio stack stays external,
all video dependencies remain static and self-contained.
The build script no longer builds alsa-lib (the _alsa step, ALSA_VER pin and
the autoreconf dependency it needed are gone); meson resolves the system
'alsa' dependency via pkg-config. The workflow installs libasound2-dev, drops
autoconf/automake/libtool, and verifies ldd shows libasound.so.2 instead of
asserting a baked-in config dir.
* fix: enable PipeWire/Pulse AOs so audio works on PipeWire desktops
On a desktop where PipeWire owns the sound cards, the direct ALSA/dmix
'default' path is broken: snd_pcm_open('default') resolves to a dmix slave
that cannot be opened (verified: aplay -D default fails identically, while
aplay -D pulse works). libmpv with only the ALSA AO therefore got no sound.
mpv auto-probes audio drivers in the order pipewire -> pulse -> alsa, so
enable all three (each linked against its system shared lib, consistent with
CoreAudio/WASAPI). On a PipeWire/Pulse box it now uses the working server
before ever falling back to the direct ALSA path.
The workflow installs libpipewire-0.3-dev and libpulse-dev alongside
libasound2-dev, and the artifact verification now accepts any of the three
system audio libs instead of only libasound.
---------
Co-authored-by: david <david@phoenix.ipv64.de>
mpv-natives
Self-built libmpv native binaries for jlibmpv, the Java/JNA wrapper library.
Why this repository exists
jlibmpv is 100% MIT and deliberately does not bundle any native binaries
(libmpv is GPL-licensed). End users who want a drop-in native they can point
mpv.libmpv.path at (or that a RemoteNativeLocator can download) find them
here, as versioned GitHub release assets.
- Pinned version: mpv
v0.41.0— the exact client API (131077) the jlibmpv JNA bindings are validated against. A libmpv update means bumpingMPV_REFin the workflows. - Build source: the mpv source tree is checked out at that tag by
GitHub Actions and built with the vendored scripts in
ci/(build-libmpv-mingw64.sh,build-libmpv-macos.sh,build-libmpv-linux.sh). No mpv source or third-party binaries are stored in this repository.
Releases
Each platform build produces a zip with the native library (self-contained,
single file) and a checksums.txt (SHA-256) for verification.
| Asset | Contents |
|---|---|
mpv-natives-windows-x86_64-mpv-<ver>.zip |
libmpv-2.dll (all dependencies statically linked, mingw64 build) |
mpv-natives-macos-universal-mpv-<ver>.zip |
libmpv.dylib (universal arm64 + x86_64, all dependencies statically linked) |
mpv-natives-linux-x86_64-mpv-<ver>.zip |
libmpv.so (all dependencies statically linked, native x86_64 build) |
Each native is fully self-contained: every dependency (ffmpeg, libass, libplacebo, harfbuzz, freetype, fribidi, …) is statically linked into the single library together with the C/C++ runtime where needed. The library depends only on the platform's system libraries, so there is no dependency closure to extract alongside it — jlibmpv loads it at runtime via JNA and never compiles against it, so no public headers are shipped.
On Linux the self-built libmpv.so additionally removes the need for the
distribution package (libmpv1), which lags behind in codec support (dav1d/
AV1, x264/x265): the pinned ffmpeg 8.0.1 guarantees the full codec set on any
recent glibc distribution.
How to use with jlibmpv
- Download the release asset for your platform and extract it.
- Point jlibmpv at the extracted native library —
libmpv-2.dll(Windows),libmpv.dylib(macOS) orlibmpv.so(Linux):-Dmpv.libmpv.path=/path/to/extracted/libmpv-2.dll.
Building
Builds run on GitHub Actions and are triggered by pushes to main or
manually (Actions tab). There is nothing to build locally.
License
The artifacts are built from mpv (GPL-3.0-or-later) and its dependencies (LGPL/GPL) and are distributed under those licenses. See LICENSE for the repository's license terms.