- Download MSYS2
- Install into
C:/msys64
- Edit
C:/msys64/msys2_shell.cmd
and removerem
from the line withrem MSYS2_PATH_TYPE=inherit
- Open a x64 Native Tools Command Prompt for VS 2022
- Run
C:/msys64/msys2_shell.cmd
- Use the MSYS2 shell for the next steps and enter:
pacman -Syu
pacman -S make pkgconf diffutils yasm nasm
mv /usr/bin/link.exe /usr/bin/link.exe.bak
Default version is FFmpeg 6.1.
git clone https://github.com/FFmpeg/FFmpeg.git -b release/6.1 --depth 1
cd ffmpeg
Config with only decoder H264 & HEVC, dynamic linking.
export CC=cl
./configure \
--toolchain=msvc \
--arch=x86_64 \
--disable-everything \
--enable-yasm \
--enable-asm \
--enable-shared \
--disable-static \
--disable-programs \
--enable-avresample \
--enable-decoder=h264 \
--enable-decoder=hevc \
--enable-gpl
make V=1 -j 8
# make install
The output is too small, under 10MB.
Copy main DLLs from libavcodec/avcodec-60.dll
, libavutil/avutil-58.dll
.