Skip to content

Andarwinux/mpv-winbuild

 
 

Repository files navigation

mpv-winbuild-arm64

GitHub Workflow Status releases downloads

Use Github Action to build apps for Windows with latest commit.

  • mpv (with libsixel)
  • mpv-menu-plugin
  • mpv-debug-plugin
  • ffmpeg (with frei0r, opencl)
  • curl
  • mediainfo
  • libmediainfo
  • qBittorrent-Enhanced-Edition
  • svtav1-psy (with libdovi, libhdr10plus)

Note

x86-64 version is built with PGO to improve performance.

x86-64 version based on MSVC-compatible 64-bit long double ABI instead of UNIX/MinGW 80-bit long double ABI, so any FP operations are lowered to AVX instead of x87 FPU (software emulated) to improve performance.

The x86-64-v4 build uses rocketlake as the ISA baseline, but chooses the znver5 scheduling model (512bit vector width), so it can be used for rocketlake, tigerlake, znver4, znver5. However, due to DownFall mitigation (mandatory since 24H2) and AVX512 downclocking, performance regression is expected on Intel MSDT series CPUs.

The x86-64-v3 build uses skylake as the ISA baseline and applies compiler mitigation (-mno-gather) to avoid the performance penalty of the DownFall microcode mitigation.

All EXEs are integrated with mimalloc.

libmpv can't use mimalloc, the only alternative is system-wide Segment Heap:

reg add “HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Segment Heap” /v Enabled /t REG_DWORD /d 1 /f

The mpv is built with consoleAllocationPolicy, so make sure to use Windows 11 24H2 or higher otherwise you will see a console when starting mpv.

The OpenSSL has been patched to use winstore by default, so tls-verify for mpv can be enabled out of the box. Consider enabling it for security.

The profdata used by PGO is generated manually, so it usually only scrolls every few weeks, during which time there might be random performance regressions.

If LargePages support is enabled on your system, mimalloc will automatically use it, and you can also enable LargePages for exe:

reg add “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\mpv.exe” /v UseLargePages /t REG_DWORD /d 1 /f

You can use VMMap to check if LargePages works or is a placebo.

Private Data Locked WS are LargePages explicitly allocated by mimalloc via VirtualAlloc API.

Image Locked WS are LargePages coalesced by NT kernel for exe.

Based on https://github.com/Andarwinux/mpv-winbuild-cmake.

Note

This repo only provides x86-64-v3/v4 and aarch64 version.

I have added a znver5 template, if more variants needed just copy and paste it.

If you need to customize the build process more, change all Andarwinux/mpv-winbuild-cmake to your own fork.

If you need to build it yourself, make sure to build the LLVM first, and then the toolchain, otherwise the build is bound to fail.

If you build too many times in a short period of time, LLVM and toolchain caches may be pushed out by the build cache, so you will also need to rebuild the whole toolchain.

As a workaround, you can remove qBittorrent/Qt, which will significantly reduce the use of the build cache.

Release Retention Policy

  • The last 30 days of builds will be retained.

About

Use Github Action to build mpv for Windows with latest commit.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%