Add native MSVC build support for Windows#1477
Add native MSVC build support for Windows#1477StormBytePP wants to merge 14 commits intoNetflix:masterfrom
Conversation
cd41041 to
156b094
Compare
156b094 to
830be14
Compare
830be14 to
a60ccfd
Compare
a60ccfd to
a861995
Compare
1c9a78e to
5dd3005
Compare
3716760 to
9b01286
Compare
9b01286 to
a493150
Compare
|
Hi everyone, First of all, apologies for the noise — there were quite a few force‑pushes while I was trying to understand what looked like a regression in the macOS FFmpeg+libvmaf build. I genuinely thought I had introduced the issue myself, and it took a while to figure out what was actually happening. Good news: the PR is now fully green across all platforms, including MSVC, which produces exactly the same VMAF score as the original workflow. A small warning regarding macOS: while investigating, I temporarily removed After dropping all my changes to double‑check, I confirmed that the original workflow also prints this mismatch — it simply goes unnoticed because The difference is very small, but I wanted to highlight it explicitly so reviewers are aware. With everything now stable and the CI behaving consistently, the PR is ready for review. P.S. Ironically, I don’t even use Windows except for gaming — but at least now FFmpeg+libvmaf builds cleanly on MSVC. |
Add native MSVC support
This pull request introduces first-class, native MSVC support for
libvmafon Windows.The goal is to enable building, testing, and integrating
libvmafusing the Microsoft Visual C++ toolchain without relying on MinGW/MSYS2, greatly improving compatibility with Windows-native projects and CI environments.Motivation
Until now,
libvmafcould only be built on Windows through MinGW/MSYS2. While functional, this approach had several limitations:This PR adds full native MSVC support, including:
Dependencies / Related PRs
This PR depends on the following PRs being merged first.
Merging them first is especially important to ensure proper credit and authorship for all contributors — particularly for the two PRs that were not authored by me (#1410 and #1428).
Once those PRs are merged upstream, the temporary copies of their commits (included here only for CI to pass) will be removed. This way the original authors receive full and fair attribution in the git history.
The required PRs are:
This ensures:
What’s included
pthread-win32as a git submodule for MSVC buildsmeson,ninja,xxd,cmake)Windows.mddocumentation to include MSVC instructionsCI Improvements
The new GitHub Actions workflow builds both MSYS2 and MSVC in parallel, runs the full test suite under each environment, and uploads artifacts for both toolchains.
Importantly, the inclusion of the Windows MSVC tests (both with FFmpeg and the standalone library) in CI guarantees that Windows support will not be accidentally broken in the future. This provides ongoing assurance and prevents regressions as the project continues to evolve.
Issue reference
Closes #1097
Notes
git submodule update --initafter checkout to pull thepthread-win32submodule.About tox tests on Windows
This PR intentionally does not enable the Python
toxtest suite on Windows.While the MSVC build and the C test suite are fully supported, the Python tests rely on several Unix-specific behaviors (e.g.,
fork()-based multiprocessing, POSIX path assumptions, and.exesuffix handling).These issues require non-trivial work to make the tox suite fully compatible with Windows and would significantly increase the scope of this PR.
Windows
toxsupport will be evaluated and implemented in a separate PR once native MSVC support is merged.About the FFmpeg build used in CI
The MSVC CI job also builds FFmpeg to validate that
libvmafintegrates correctly with a Windows-native FFmpeg toolchain. For this purpose, the workflow uses the Meson-based FFmpeg port maintained by the GStreamer project.This port provides a clean Meson build of FFmpeg that supports MSVC out of the box, making it ideal for verifying that
libvmafbuilds and runs correctly in a fully native Windows environment. The Meson-based FFmpeg port is used exclusively for the MSVC job; the Linux and macOS CI jobs continue to use the official FFmpeg repository exactly as before.Status