- 1 year ago
Need help/instructions to build ffmpeg with libdav1d under Windows
Comment
1 / 1
Building FFmpeg with libdav1d under Windows can be a bit complex, but I'll provide you with step-by-step instructions to guide you through the process. Please note that these instructions are for building FFmpeg with libdav1d using the MSYS2 environment. Here's what you need to do:
Install MSYS2:
- Download the MSYS2 installer from the official website: https://www.msys2.org/
- Run the installer and follow the instructions to install MSYS2. Choose the appropriate architecture (32-bit or 64-bit) based on your system.
Open MSYS2:
- Launch the MSYS2 terminal by running the
msys2.exe
executable. It should be located in the installation directory, such asC:\msys64\msys2.exe
. - Update the system packages by running the following command:shell
pacman -Syu
- Close and reopen the MSYS2 terminal to ensure the changes take effect.
- Launch the MSYS2 terminal by running the
Install required packages:
- Install the necessary development tools and libraries by running the following command:shell
pacman -S --needed base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake
- Install Git by running the following command:shell
pacman -S --needed git
- Install the necessary development tools and libraries by running the following command:
Clone FFmpeg repository:
- Use Git to clone the FFmpeg repository by running the following command:shell
git clone https://git.ffmpeg.org/ffmpeg.git
- Change to the FFmpeg directory:shell
cd ffmpeg
- Use Git to clone the FFmpeg repository by running the following command:
Build libdav1d:
- Build and install libdav1d by running the following commands:shell
git clone https://code.videolan.org/videolan/dav1d.git
cd dav1d
mkdir build && cd build
cmake ..
make
make install
- Build and install libdav1d by running the following commands:
Configure and build FFmpeg with libdav1d:
- Change back to the FFmpeg directory:shell
cd ../
- Configure FFmpeg with libdav1d support by running the following command:shell
./configure --enable-libdav1d
- Build FFmpeg by running the following command:shell
make
- Change back to the FFmpeg directory:
(Optional) Install FFmpeg:
- If you want to install FFmpeg system-wide, run the following command:shell
make install
- Otherwise, you can use the FFmpeg binary directly from the build directory.
- If you want to install FFmpeg system-wide, run the following command:
That's it! You should now have FFmpeg built with libdav1d under Windows using the MSYS2 environment. You can find the FFmpeg binary and libraries in the build directory.