Videotestsrc

Multimedia User Guide (UG1449)

Document ID
UG1449
Release Date
2023-10-19
Revision
1.7 English

The videotestsrc element is an open source up-streamed GStreamer plugin. It is used to produce test video data in a wide variety of formats. You can use the pattern property to control the video test data that is produced.

By default, videotestsrc generates data indefinitely, but if the num-buffers property is non-zero, it generates a fixed number of video frames and sends EOS.

To test the encode functionality, use the following pipeline.

gst-launch-1.0 videotestsrc \
! video/x-raw,format=NV12,width=1920, \
height=1080,framerate=60/1 \
!  videoconvert \
! omxh265enc prefetch-buffer=true \
! fakesink
Note: videotestsrc does not support zero copy. The primary aim of this pipeline is to validate encoder functionality.

In the preceding example, the source device generates a video pattern with 1080p resolution and 60fps. The video stream color format is NV12.

To test the display functionality, use the following pipeline:

gst-launch-1.0 videotestsrc \
! video/x-raw,format=NV12,width=1920,\
height=1080,framerate=60/1 \
!  videoconvert \
! fpsdisplaysink \
video-sink="kmssink bus-id=a00c0000.v_mix" \
text-overlay=false sync=false -v

For more information, see H.264/H.265 Video Codec Unit LogiCORE IP Product Guide (PG252).