FFMpeg Compilation guide - mpeg5/ffevc GitHub Wiki

Linux

Prerequisites

Before compiling FFmpeg, the Xeve and Xevd libraries must be compiled and installed on the system.
Detailed instructions on how to build and install the Xeve library can be found at: Xeve-Compilation-guide
The process of building and installing the Xevd library is analogous to the Xeve library.

Build configuration

Static build

Compile FFmpeg as static (single file)

PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --pkg-config-flags="--static" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --extra-libs="-lpthread -lm" --bindir="$HOME/bin" -enable-libxeve --enable-libxevd

Shared build

By using ./configure --enable-shared when configuring FFmpeg, you can build the FFmpeg libraries (e.g. libavutil, libavcodec, libavformat) as DLLs.

Compilation

PATH="$HOME/bin:$PATH" make -j $(nproc)

Installation

make install

All in one step

Configuration with support for other libraries

PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --pkg-config-flags="--static" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --extra-libs="-lpthread -lm" --bindir="$HOME/bin" --enable-gpl --enable-gnutls --enable-libaom --enable-libass --enable-libf
dk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libdav1d --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxeve --enable-libxevd --enable-nonfree && PATH="$HOME/bin:$PATH" make -j $(nproc) && make instal

Windows

Prerequisites

  • This guide require MSYS2 installed in your system. Detailed manual can be found on MSYS2 website: https://www.msys2.org/

  • Before compiling FFmpeg, the Xeve and Xevd libraries must be compiled and installed on the system.
    Detailed instructions on how to build and install the Xeve library can be found at: Xeve-Compilation-guide
    The process of building and installing the Xevd library is analogous to the Xeve library.

MingGW 64 with MSVC compiler

Open “x64 Native Tools Command Prompt for VS 2019” then write in the opened command prompt the following command.

c:\msys64>msys2_shell.cmd -mingw64

This will cause the MinGW shell configured to use it with MSVC compiler to open. All subsequent commands must be executed in the open MinGW shell.

Build configuration

Set the PKG_CONFIG_PATH to show the location of xeve.pc and xevd.pc files.

PKG_CONFIG_PATH="c:/msys64/lib/pkgconfig" ./configure --target-os=win64 --arch=x86_64 --toolchain=msvc -disable-doc --enable-shared --disable-static --enable-libxeve --enable-libxevd --prefix=/c/ffmpeg
PKG_CONFIG_PATH="c:/msys64/lib/pkgconfig" ./configure --target-os=win64 --arch=x86_64 --toolchain=msvc -disable-doc --disable-shared --enable-static --enable-libxeve --enable-libxevd --prefix=/c/ffmpeg

Compilation

make -j $(nproc)

Installation

make install

References

Link Description
https://trac.ffmpeg.org/wiki/CompilationGuide FFmpeg Compilation Guide
https://trac.ffmpeg.org/wiki/CompilationGuide/MSVC CompilationGuide/MSVC
https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu Compile FFmpeg for Ubuntu, Debian, or Mint