-
Notifications
You must be signed in to change notification settings - Fork 32
MinGW Toolchain
This page describes the MSYS2 / MinGW-w64 toolchain used to build FFmpegKitNext for Windows.
For Windows build commands, see Building Windows. For the Windows script option reference, see windows.sh.
Windows builds are native MSYS2 builds. Nix is not used on Windows because it does not provide the MinGW-w64 target toolchain required by windows.sh.
Download and install MSYS2 from msys2.org.
Use the native installer for the Windows host:
-
arm64Windows host: install the ARM64 MSYS2 package and use theCLANGARM64shell. -
x86-64Windows host: use theCLANG64shell for experimentalx86-64builds.x86-64support is implemented but not yet tested.
Do not run the build from the plain MSYS shell. It provides POSIX host tools, not the MinGW-w64 compiler environment used to produce native Windows DLLs.
Open the matching MinGW shell and update the package database and installed packages:
pacman -SyuIf MSYS2 asks you to close the terminal after updating core packages, close it, open the same MinGW shell again and run:
pacman -SyuCheck that the active shell is the intended MinGW environment:
echo "$MSYSTEM"
echo "$MINGW_PACKAGE_PREFIX"
clang --versionFor supported arm64 builds, the values should identify CLANGARM64, and MINGW_PACKAGE_PREFIX should be mingw-w64-clang-aarch64.
Install the compiler, pkg-config implementation and mandatory host build tools:
pacman -S --needed ${MINGW_PACKAGE_PREFIX}-clang ${MINGW_PACKAGE_PREFIX}-pkgconf make autoconf \
automake libtool git curl rsync pkg-configThe ${MINGW_PACKAGE_PREFIX} variable is set by MSYS2. It selects packages for the active MinGW environment, such as mingw-w64-clang-aarch64 in CLANGARM64.
Some optional external libraries need additional tools. Install these when you enable the matching libraries:
pacman -S --needed ${MINGW_PACKAGE_PREFIX}-meson ${MINGW_PACKAGE_PREFIX}-ninja \
${MINGW_PACKAGE_PREFIX}-cmake gperf bison gettext-devel autogen gtk-docInstall nasm only when experimenting with x86-64 builds or libraries that require x86 assembly:
pacman -S --needed nasmUse the ${MINGW_PACKAGE_PREFIX}- builds of meson, ninja and cmake. The plain MSYS versions run as POSIX host tools and can fail inside a MinGW build with Python or executable-format errors.
From the same MSYS2 shell, change to the ffmpeg-kit-next repository root and run:
./windows.shFor optional libraries:
./windows.sh --enable-lib-openssl --enable-lib-dav1dThe output bundle is created under:
prebuilt/bundle-windows/ffmpeg-kit-next/
- If
clangor${MINGW_PACKAGE_PREFIX}-pkgconfis missing, reopen the correct MinGW shell and reinstall the required packages. - If Meson or CMake reports that MSYS Python is being used in a MinGW environment, install the
${MINGW_PACKAGE_PREFIX}-meson,${MINGW_PACKAGE_PREFIX}-ninjaand${MINGW_PACKAGE_PREFIX}-cmakepackages. - If a build fails after partially downloading or configuring a library, retry with
--redownload-lib-LIBRARY,--reconf-lib-LIBRARYor--rebuild-lib-LIBRARYas needed. See Redownload Option, Reconf Option and Rebuild Option.
Copyright (c) 2026 FFmpegKitNext
- Status
- Versions
- Changelog
- Project Layout
- Using
- Building
- External Libraries
- Patents
- License