How to Build MPV Player with Statically Linked libraries in MSYS2 #21046
Unanswered
SiddaramMavinamar
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I'm trying to build MPV with a statically linked libraries using MSYS2 on Windows. I've followed the steps given in below link , but I'm encountering some issues and would appreciate any help or guidance.
Native compilation with MSYS2
For Windows developers looking to get started quickly, MSYS2 can be used to compile mpv natively on a Windows machine. The MSYS2 repositories have binary packages for most of mpv's dependencies, so the process should only involve building mpv itself.
To build 64-bit mpv on Windows:
Installing MSYS2
Download an installer from https://www.msys2.org/
Both the i686 and the x86_64 version of MSYS2 can build 32-bit and 64-bit mpv binaries when running on a 64-bit version of Windows, but the x86_64 version is preferred since the larger address space makes it less prone to fork() errors.
Start a MinGW-w64 shell (mingw64.exe). Note: This is different from the MSYS2 shell that is started from the final installation dialog. You must close that shell and open a new one.
For a 32-bit build, use mingw32.exe.
Updating MSYS2
To prevent errors during post-install, the MSYS2 core runtime must be updated separately.
Check for core updates. If instructed, close the shell window and reopen it
before continuing.
pacman -Syu
Update everything else
pacman -Su
Installing mpv dependencies
Install MSYS2 build dependencies and a MinGW-w64 compiler
pacman -S git $MINGW_PACKAGE_PREFIX-{python,pkgconf,gcc,meson}
Install the most important MinGW-w64 dependencies. libass and lcms2 are also
pulled in as dependencies of ffmpeg.
pacman -S $MINGW_PACKAGE_PREFIX-{ffmpeg,libjpeg-turbo,luajit}
Building mpv
Finally, compile and install mpv. Binaries will be installed to /mingw64/bin or /mingw32/bin.
meson setup build --prefix=$MSYSTEM_PREFIX
meson compile -C build
https://github.com/mpv-player/mpv/blob/master/DOCS/compile-windows.md
Beta Was this translation helpful? Give feedback.
All reactions