Automated build system for FFmpeg with a comprehensive set of audio/video codecs and libraries. Supports Ubuntu/Debian and RHEL/Rocky/Alma Linux.
- Full source build: Compiles FFmpeg from source with 40+ codecs and libraries
- Version control: All component versions defined in
versions.txt(Source of Truth) - Checkpointing: Resumable builds via
.done_*stamps; skips already-built modules - Multi-OS: Ubuntu 22.04, Rocky Linux 9, and compatible distributions
- Optional: CUDA/NVENC, Intel QSV, static linking, PATH/ldconfig integration
cd /opt
# Clone repository
git clone https://github.com/wanyigroup/ffmpegtoolkit.git
cd ffmpegtoolkit
chmod +x -R ./
# 1. Install build dependencies (requires root)
sudo ./build.sh deps
# 2. Download all source packages
./build.sh fetch
# 3. Build (compiles to /opt/ffmpeg-toolkit by default)
./build.sh build
# 4. Symlink ffmpeg/ffprobe to /usr/local/bin (optional)
./build.sh --link
# 5. Register shared libraries (fix "cannot open shared object")
./build.sh ldconfig
# Verify
ffmpeg -versionAfter a successful build, ffmpeg -version shows:
ffmpeg version 8.0.1 Copyright (c) 2000-2025 the FFmpeg developers
built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04.2)
configuration: --prefix=/opt/ffmpeg-toolkit --pkg-config-flags=--static --extra-cflags=-I/opt/ffmpeg-toolkit/include --extra-ldflags='-L/opt/ffmpeg-toolkit/lib -L/opt/ffmpeg-toolkit/lib64' --extra-libs='-lstdc++ -lpthread -lm' --enable-gpl --enable-version3 --enable-static --enable-libx264 --enable-libx265 --enable-libvpx --enable-libaom --enable-libsvtav1 --enable-libopenh264 --enable-libvmaf --enable-libilbc --enable-libjxl --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libtheora --enable-libwebp --enable-libass --enable-libfreetype --enable-libfribidi --enable-libzimg --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-swscale --enable-avfilter --disable-debug --enable-runtime-cpudetect --enable-libfdk-aac --enable-nonfree
libavutil 60. 8.100 / 60. 8.100
libavcodec 62. 11.100 / 62. 11.100
libavformat 62. 3.100 / 62. 3.100
libavdevice 62. 1.100 / 62. 1.100
libavfilter 11. 4.100 / 11. 4.100
libswscale 9. 1.100 / 9. 1.100
libswresample 6. 1.100 / 6. 1.100
| Component | Link | Description |
|---|---|---|
| dav1d | https://code.videolan.org/videolan/dav1d | AV1 decoder |
| aom (libaom) | https://aomedia.googlesource.com/aom/ | AV1 reference |
| vpx (libvpx) | https://chromium.googlesource.com/webm/libvpx | VP8/VP9 |
| fdk-aac | https://github.com/mstorsjo/fdk-aac/releases | AAC codec |
| kvazaar | https://github.com/ultravideo/kvazaar/releases | HEVC encoder |
| uavs3d | https://github.com/uavs3/uavs3d | AVS3 decoder |
| zimg | https://github.com/sekrit-twc/zimg/releases | Image scaling |
| vidstab | https://github.com/georgmartius/vid.stab/releases | Video stabilization |
| libsrt | https://github.com/Haivision/srt/releases | SRT streaming |
| aribb24 | https://github.com/nkorber/aribb24 | ARIB subtitles |
| faad2 | https://github.com/knik0/faad2/releases | AAC decode |
| gsm | https://github.com/timothytylee/libgsm | GSM speech |
| neroaacenc | Nero AAC (archived) | AAC encode |
| Command | Description |
|---|---|
fetch |
Download all source packages to downloads/ |
deps |
Install build dependencies (gcc, cmake, meson, etc.) – requires root |
build |
Full compile from source |
dist |
Pack project to ffmpegtoolkit-YYYYMMDD-HHMMSS.tar.gz (output in parent directory) |
ldconfig |
Register PREFIX/lib in dynamic loader – fix "cannot open shared object" |
| Option | Description |
|---|---|
--mode=quick |
Install pre-built binary (johnvansickle) |
--mode=static |
Extract pre-compiled static package |
--mode=compile |
Full compile from source (default) |
--with-cuda |
Enable CUDA/NVENC build |
--with-qsv |
Enable Intel Quick Sync Video |
--exclude=mod |
Skip module(s), e.g. --exclude=x265 |
--only=mod |
Build only this module |
--force |
Force rebuild all (ignore checkpoints) |
--link |
Symlink ffmpeg/ffprobe to /usr/local/bin |
--unlink |
Remove those symlinks |
--link-path |
Add PREFIX/bin to PATH via /etc/profile.d |
--clean |
Clean build artifacts |
# Quick install (pre-built binary)
./build.sh --mode=quick
# Full build with CUDA
./build.sh --mode=compile --with-cuda
# Build only ffmpeg (skip already-built deps)
./build.sh build --only=ffmpeg
# Force rebuild everything
./build.sh build --force
# Symlink and fix loader
sudo ./build.sh --link
sudo ./build.sh ldconfig- Ubuntu/Debian: Ubuntu 22.04, Debian 11+
- RHEL Family: Rocky Linux 9, Alma Linux, CentOS 8/9, RHEL 8/9
ffmpegtoolkit/
├── build.sh # Main entry script
├── versions.txt # Version manifest (Source of Truth)
├── downloads/ # Downloaded source tarballs
├── logs/ # Build logs
├── scripts/
│ ├── common.sh # Utilities, version helpers
│ ├── env_check.sh # OS/hardware detection
│ ├── dep_manager.sh # Dependency installation
│ ├── ldconfig_setup.sh # Dynamic loader config
│ └── build_modules/ # Per-component build scripts
└── templates/ # Build parameter templates
All component versions are defined in versions.txt. To update a component:
- Edit
versions.txt(e.g.ffmpeg=8.0.1) - Run
./build.sh fetchto download new sources - Run
./build.sh build --forceor rebuild only that module
See version.md for full dependency list and official links.
GPL v3. FFmpeg is licensed under GPL when built with --enable-gpl. Some components (e.g. fdk-aac with --enable-nonfree) have different licenses; see each component's source for details.