Creating test video - 2020
"This input device reads data from the open output pads of a libavfilter filtergraph. For each filtergraph open output, the input device will create a corresponding stream which is mapped to the generated output. Currently only video data is supported. The filtergraph is specified through the option graph" - from ffmpeg-devices.
The testsrc filter generates a test video pattern showing a color pattern, a scrolling gradient, and a timestamp. This is useful for testing purposes.
This example will create a 10 second output, 30 fps (300 frames total), with a frame size of 640x360 (testsrc.mpg):
ffmpeg -f lavfi -i testsrc=duration=10:size=1280x720:rate=30 testsrc.mpg
The following command will generate a video with a duration of 5.3 seconds, with size 176x144 and a frame rate of 10 frames per second.
ffmpeg -f lavfi -i testsrc=duration=5.3:size=qcif:rate=10 testsrc2.mp4
The smptebars source generates a color bars pattern, based on the SMPTE Engineering Guideline EG 1-1990.
The smptehdbars source generates a color bars pattern, based on the SMPTE RP 219-2002.
This example will create a 10 second output, 30 fps (300 frames total), with a frame size of 640x360:
ffmpeg -f lavfi -i smptebars=duration=10:size=640x360:rate=30 smptebars.mp4
The following graph description will generate a red source with an opacity of 0.2, with size "qcif" and a frame rate of 10 frames per second with the duration of 5 seconds.
ffmpeg -f lavfi -i color=c=red@0.2:duration=5:s=qcif:r=10 colorsrc.mp4
The rgbtestsrc source generates an RGB test pattern useful for detecting RGB vs BGR issues. We should see a red, green and blue stripe from top to bottom.
ffmpeg -f lavfi -i rgbtestsrc -pix_fmt yuv420p -t 5 rgbtestsrc.mp4
Ph.D. / Golden Gate Ave, San Francisco / Seoul National Univ / Carnegie Mellon / UC Berkeley / DevOps / Deep Learning / Visualization