ffmpeg -f lavfi -i "testsrc=duration=5:size=640x480:rate=30" -pix_fmt yuv420p test.mp4

Category: Media & Conversion

ffmpeg -f lavfi -i "testsrc=duration=5:size=640x480:rate=30" -pix_fmt yuv420p test.mp4

Generate a test pattern video

Generates a 5-second test pattern video from ffmpeg's lavfi virtual input, useful for testing pipelines and players. testsrc renders moving color bars, and size and rate set the resolution and frame rate. -pix_fmt yuv420p keeps it compatible.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.