How to Run FFmpeg FATE Tests Locally
Testing a local build of FFmpeg ensures that custom patches,
configuration changes, or new code additions do not introduce
regressions into the multimedia framework. This guide outlines the exact
steps required to obtain the FFmpeg Automated Testing Environment (FATE)
sample files using rsync, configure your build tree to
recognize the test suite, and run the tests on your local machine.
Prerequisites
Ensure you have cloned the FFmpeg source code and installed the
standard compilation dependencies, along with rsync and
make.
Step 1: Download the FATE Sample Files
The FATE suite tests your build against hundreds of real-world audio,
video, and container formats. These files are not stored directly in the
Git repository due to their size, but they can be synced via
rsync.
Create a directory to store the test files, then download the suite
using make:
mkdir -p fate-samples
make fate-rsync SAMPLES=fate-samples/Alternatively, download the files directly using rsync
without invoking make:
rsync -vrltLW --timeout=60 --contimeout=60 rsync://fate-suite.ffmpeg.org/fate-suite/ fate-samples/Step 2: Configure and Compile FFmpeg
To ensure the test runner knows where to find the media samples,
supply the absolute path to the samples directory using the
--samples option during the configuration step:
./configure --samples=/absolute/path/to/fate-samples
make -j$(nproc)(Replace /absolute/path/to/fate-samples with the
actual path to your directory).
Step 3: Run the FATE Suite
Once compilation finishes, run the complete suite of tests across multiple CPU cores:
make fate -j$(nproc)If you configured FFmpeg without the --samples flag, you
can specify the path at runtime:
make fate SAMPLES=/absolute/path/to/fate-samples -j$(nproc)Step 4: Running Individual Tests (Optional)
Running the entire test suite can take several minutes. To view all available test targets, run:
make fate-listTo run a specific test or group of tests, pass the specific target
name to make:
make fate-flac
make fate-mp3
make fate-h264Any errors, failed assertions, or regression differences will be output directly to your terminal.