Created
December 5, 2023 16:09
-
-
Save mralfarrakhan/3188db45d9c9abb65d5c6b164b855ec2 to your computer and use it in GitHub Desktop.
Build portable FFMPEG with AV1 (libsvtav1/libdav1d) and/or VVC (libvvenc/libvvdec) for Windows with MinGW64 (MSYS2)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Prerequisites: | |
| * MSYS2 with MinGW64 environment. | |
| * build tools: `pacman -S mingw-w64-x86_64-make mingw-w64-x86_64-cmake mingw-w64-x86_64-gcc mingw-w64-x86_64-winpthreads-git ` | |
| AV1 supports | |
| * libsvtav1 (encoder): `pacman -S mingw-w64-x86_64-svt-av1` | |
| * libdav1d (decoder): `pacman -S mingw-w64-x86_64-dav1d` | |
| VVC supports | |
| * libvvenc (encoder): | |
| 1. `git clone https://github.com/fraunhoferhhi/vvenc` | |
| 2. `cd vvenc` | |
| 3. `cmake -S . -B build/release-static -DCMAKE_INSTALL_PREFIX=/mingw64 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0` | |
| 4. `cmake --build build/release-shared -j` | |
| 5. `cmake --build build/release-shared --target install` | |
| * libvvdec (decoder): | |
| 1. `git clone https://github.com/fraunhoferhhi/vvdec` | |
| 2. `cd vvdec` | |
| 3. exact same with libvvenc step | |
| FFMPEG | |
| 1. `git clone https://git.ffmpeg.org/ffmpeg.git` | |
| 2. `cd ffmpeg` | |
| 3. `git checkout 2532e832d2` | |
| 4. `wget -O Add-support-for-H266-VVC.patch https://patchwork.ffmpeg.org/series/9992/mbox/` | |
| 5. `git apply --check Add-support-for-H266-VVC.patch` | |
| 6. `git apply Add-support-for-H266-VVC.patch` | |
| 7. `./configure --enable-w32threads --enable-rpath --arch=amd64 --enable-libvvdec --enable-libvvenc --enable-libsvtav1 --enable-libdav1d` | |
| 8. `make -j` | |
| 9. `make install` | |
| make FFMPEG portable | |
| 1. `mkdir ffmpeg-pack` | |
| 2. `cd ffmpeg-pack` | |
| 3. `cp /usr/local/bin/ff* .` | |
| 4. `ldd ./ffmpeg.exe | grep "=> /mingw64" | awk '{print $3}' | xargs -I '{}' cp -v '{}' .` | |
| 5. Done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment