Generate Zone Plate Test Pattern with FFmpeg yuvtestsrc

This guide demonstrates how to generate a zone plate test pattern using FFmpeg’s built-in yuvtestsrc filter. You will learn the exact command-line syntax required to create this specialized video pattern, customize its resolution and frame rate, and save it as a video file for testing display calibration, scaling algorithms, or video encoders.

The yuvtestsrc filter in FFmpeg is a virtual input source designed specifically to generate a YUV test pattern featuring a zone plate (a pattern of concentric rings with increasing spatial frequency). This is highly useful for analyzing aliasing, frequency response, and rendering quality.

Basic Command Syntax

To generate a default zone plate pattern and save it to an MP4 file, use the following command:

ffmpeg -f lavfi -i yuvtestsrc -t 5 output.mp4

Customizing Resolution and Frame Rate

By default, the filter outputs a resolution of 320x240 at 25 frames per second. You can customize these parameters directly inside the filter argument using the size (or s) and rate (or r) options.

To generate a 10-second Full HD (1080p) zone plate at 60 frames per second, use this command:

ffmpeg -f lavfi -i yuvtestsrc=size=1920x1080:rate=60 -t 10 output.mp4

Key Parameter Options

You can fine-tune the source filter using the following key-value pairs separated by colons:

For example, to specify the duration inside the filter instead of using the -t flag:

ffmpeg -f lavfi -i yuvtestsrc=s=1280x720:r=30:d=10 output.mp4