How to Run FFmpeg FATE Tests Locally

This article provides a step-by-step guide on how to download the FATE (FFmpeg Automated Testing Environment) test suite files and run the tests against your local build of FFmpeg. You will learn how to configure your build environment, download the required regression test samples, and execute the test suite to verify your local build’s stability and correctness.

Step 1: Configure FFmpeg with the Samples Path

Before compiling FFmpeg, you must specify where the FATE test samples should be stored on your local machine. These sample files are required for the tests to run and can occupy several gigabytes of storage.

Navigate to your FFmpeg source directory and run the configuration script, defining the target directory for the samples using the --samples flag:

./configure --samples=fate-suite/

If you have already configured and compiled FFmpeg, you can pass the path directly during the download step instead of re-configuring.

Step 2: Download the FATE Test Samples

FFmpeg provides a built-in Makefile target that uses rsync to download the testing files from the official FFmpeg repository. Run the following command in your build directory to fetch the assets:

make fate-rsync SAMPLES=fate-suite/

If you previously defined the --samples path during the ./configure step, you can simply run:

make fate-rsync

This process may take some time depending on your internet connection speed, as it downloads a large collection of diverse audio and video samples.

Step 3: Run the FATE Tests

Once the samples are successfully downloaded, you can execute the entire test suite against your locally compiled FFmpeg binary. Run the following command:

make fate

To speed up the testing process on multi-core processors, you can execute the tests in parallel by appending the -j flag followed by the number of CPU threads you wish to allocate:

make fate -j$(nproc)

Step 4: Run Specific Tests (Optional)

If you do not want to run the entire suite, you can run specific tests to save time.

To list all available test targets, run:

make fate-list

To run a specific test target (for example, the AAC audio tests), run:

make fate-aac