Repository navigation
Building Locally
You can build any platform on your own machine. Use this to test a change before you open a PR. A maintainer still builds and tests every platform before merging. See Contributing.
| Need | Why |
|---|---|
| Docker with Docker Compose | Every build runs in a container. |
| A lot of disk space and time | The base image is about 31 GB when built locally. Each platform image is 0.35 to 0.66 GB. The builds take hours, not minutes. |
| Git | To clone the repository. |
| Bash or PowerShell | To run the test scripts. |
You can build all seven platforms on one Linux x86_64 machine. The Linux ARM64, Windows, macOS and FreeBSD binaries are cross compiled.
docker-compose.yml defines one service per platform, plus the base image.
| Service | Archive written to ./output
|
|---|---|
ffmpeg-base |
none (the shared base image) |
ffmpeg-linux-x86_64 |
ffmpeg-9.1-linux-x86_64.tar.gz |
ffmpeg-linux-aarch64 |
ffmpeg-9.1-linux-aarch64.tar.gz |
ffmpeg-windows-x86_64 |
ffmpeg-9.1-windows-x86_64.zip |
ffmpeg-windows-aarch64 |
ffmpeg-9.1-windows-aarch64.zip |
ffmpeg-darwin-x86_64 |
ffmpeg-9.1-darwin-x86_64.tar.gz |
ffmpeg-darwin-arm64 |
ffmpeg-9.1-darwin-arm64.tar.gz |
ffmpeg-freebsd-x86_64 |
ffmpeg-9.1-freebsd-x86_64.tar.gz |
Local archives carry no release tag. Release archives are named ffmpeg-9.1-<platform>-<release>.<ext>.
-
Clone and enter the repository.
git clone https://github.com/NoMercy-Entertainment/nomercy-ffmpeg.git cd nomercy-ffmpeg -
Build the base image. Every platform needs it. Do this once, and again after you change
ffmpeg-base.dockerfile.docker compose --progress=plain build ffmpeg-base
docker pull nomercyentertainment/ffmpeg-base:latestskips this build, unlessffmpeg-base.dockerfilechanged. -
Build the platform image. The numbered steps in
scripts/run here.docker compose --progress=plain build ffmpeg-linux-x86_64
-
Run the service once. Its command copies the archive to
./output.docker compose run --rm ffmpeg-linux-x86_64 ls output/
-
Unpack the archive into a work folder and run it.
mkdir work tar -xzf output/ffmpeg-9.1-linux-x86_64.tar.gz -C work ./work/ffmpeg -version
The version line says
9.1. The9.1in the archive name is the release line.
For a Windows archive use unzip output/ffmpeg-9.1-windows-x86_64.zip -d work.
You can only run the binary of your own platform. The other archives are for the test machines.
A local build has no built-in AACS key database and does not link AACS and BD+ into libbluray. Those files are not in the public repository; the project's CI adds them. Everything else matches the release.
Run the checks from the repository root.
tests/smoke.sh work 9.1 linux-x86_64
tests/tests.sh "$(pwd)/work"
tests/unit/run.shOn Windows, with a Windows x86_64 archive unpacked into work:
./tests/smoke.ps1 -Workspace "$PWD/work" -ExpectedVersion 9.1 -Platform windows-x86_64
./tests/tests.ps1 -Workspace "$PWD/work" -Platform windows-x86_64What each script checks is on Testing.
Build the base image first, then every platform image. Then run each service once, one after the other. Each run copies its archive to ./output.
docker compose --progress=plain build ffmpeg-base
docker compose --progress=plain build
for p in linux-x86_64 linux-aarch64 windows-x86_64 windows-aarch64 darwin-x86_64 darwin-arm64 freebsd-x86_64; do
docker compose run --rm ffmpeg-$p
done| Goal | How |
|---|---|
| Fewer parallel compiles when memory is short | docker compose build --build-arg BUILD_JOBS=4 ffmpeg-linux-x86_64 |
| Verbose step logs |
docker compose build --build-arg DEBUG=true ffmpeg-base, then rebuild the platform |
| Build from nothing | add --no-cache to the build command |
| Look inside the base image | docker compose run --rm --entrypoint /bin/bash ffmpeg-base |
BUILD_JOBS caps the number of parallel jobs for the whole build. Without it the build uses all CPUs.
init.sh prints the last 200 lines of the failing step's log and stops. Find the step name in the output, for example LIBJXL. Then open scripts/<number>-<name>.sh.
Rebuild after a fix with the same two commands: docker compose build ... <service> and docker compose run --rm <service>. Docker reuses the layers before the line you changed.
For the lyricsalign filter, tools/lyricsalign-lab/ builds a minimal FFmpeg in minutes instead of hours. Nothing from it is shipped.
tools/lyricsalign-lab/run.sh image
tools/lyricsalign-lab/run.sh build
tools/lyricsalign-lab/run.sh suiteUsers
Filters and components
- Filter-stemsplit
- Filter-lyricsalign
- Whisper-Language-Detection
- Whisper-Word-Timestamps
- Filter-trailingsilence
- Filter-keydetect
- Filter-beatdetect
- Filter-rubberband
- Muxer-Sprite-Sheet
- Muxer-Chapter-VTT
- Muxer-VOBsub
- Protocol-dvdread
- Protocol-OmniDrive
- Auto-Create-Directories
- AACS-and-BDplus
- HLS-Master-Playlist
- Subtitles-OCR
- HEVC-Alpha
Acceleration and codecs
Contributors