MPV

Motivation

MPV is a frree media player that plays a variety of formats.

Status

Working using clang and msys2 via wenv.

Compiling

Mainly based on this page, with a few tweaks: https://github.com/mpv-player/mpv/blob/master/DOCS/compile-windows.md

An assumption has been made that the paths were left at default for wenv.

THIS HAS ONLY BEEN TESTED ON AN ARM64 HOST MACHINE.

  1. Set up and install wenv: linaro / WindowsOnArm / wenv ยท GitLab

  2. Activate wenv to launch a shell (PS or CMD)

  3. Modify the file at C:\wenv\msys2\msys64\etc\pacman.conf and uncomment the [clangarm64] line, and the one below it

  4. Execute: C:\wenv\msys2\msys64\clangarm64.exe

  5. In the window that opens (same for all subsequent commands also), execute pacman -Syu

  6. (OPTIONAL) The previous command may close the msys window, if so, execute the command from Step 4 and return to window for all subsequent commands

  7. In the msys2 window, execute pacman -Su

  8. Then the following commands:

    1. pacman -S git $MINGW_PACKAGE_PREFIX-{python,pkgconf,meson,clang,cmake}

    2. pacman -S $MINGW_PACKAGE_PREFIX-{ffmpeg,libjpeg-turbo,spirv-cross,shaderc}

  9. Clone MPV from the repo: https://github.com/mpv-player/mpv and cd into it

  10. Copy the file attached to the bottom of this section into the root of the cloned directory

  11. Execute the following commands:

    1. meson setup build --prefix=$MSYSTEM_PREFIX --cross-file=clang-arm64.txt -Dgl=disabled

    2. meson compile -C build

  12. Wait for compilation to finish, and observe the presence of the file build\mpv.exe

ย 

Notes

OpenGL has specifically been disabled, as it would not compile without modifications (function name clashed with a winnt.h macro), and regardless will likely require users to install the OpenGL compatibility pack. For WoA D3D11 is the better choice.

Running

Run the MPV executables as normal. Tested with Big Buck Bunny 1080p/60fps.

Status

To enable MPV, the above setup should be enough. The PR request stalled because the effort needed was to update documentation. At this time, this is not a priority. Also, MPV is primary built and used as a library by other projects.

ย