# videotestsrc

The videotestsrc element is used to produce test video data in a wide variety of formats. The video test data produced can be controlled with the "pattern" property.

By default the videotestsrc will generate data indefinitely, but if the num-buffers property is non-zero it will instead generate a fixed number of video frames and then send EOS.

## Example launch line

     gst-launch-1.0 -v videotestsrc pattern=snow ! video/x-raw,width=1280,height=720 ! autovideosink

Shows random noise in a video window.

## Hierarchy

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──GstBaseSrc
                        ╰──GstPushSrc
                            ╰──videotestsrc

## Factory details

Authors: – David A. Schleef <ds></ds>

Classification: – `Source/Video`

Rank – none

Plugin – videotestsrc

Package – GStreamer Base Plug-ins

## Pad Templates

### `src`

    video/x-raw:
             format: { A444_16LE, A444_16BE, Y416_LE, AYUV64, RGBA64_LE, ARGB64, ARGB64_LE, BGRA64_LE, ABGR64_LE, Y416_BE, RGBA64_BE, ARGB64_BE, BGRA64_BE, ABGR64_BE, A422_16LE, A422_16BE, A420_16LE, A420_16BE, A444_12LE, GBRA_12LE, A444_12BE, GBRA_12BE, Y412_LE, Y412_BE, A422_12LE, A422_12BE, A420_12LE, A420_12BE, A444_10LE, GBRA_10LE, A444_10BE, GBRA_10BE, A422_10LE, A422_10BE, A420_10LE, A420_10BE, BGR10A2_LE, RGB10A2_LE, Y410, A444, GBRA, AYUV, VUYA, RGBA, RBGA, ARGB, BGRA, ABGR, A422, A420, AV12, Y444_16LE, GBR_16LE, Y444_16BE, GBR_16BE, Y216_LE, Y216_BE, v216, P016_LE, P016_BE, Y444_12LE, GBR_12LE, Y444_12BE, GBR_12BE, I422_12LE, I422_12BE, Y212_LE, Y212_BE, I420_12LE, I420_12BE, P012_LE, P012_BE, Y444_10LE, GBR_10LE, Y444_10BE, GBR_10BE, r210, I422_10LE, I422_10BE, NV16_10LE32, Y210, UYVP, v210, I420_10LE, I420_10BE, P010_10LE, NV12_10LE40, NV12_10LE32, P010_10BE, MT2110R, MT2110T, NV12_10BE_8L128, NV12_10LE40_4L4, Y444, BGRP, GBR, RGBP, NV24, v308, IYU2, RGBx, xRGB, BGRx, xBGR, RGB, BGR, Y42B, NV16, NV61, YUY2, YVYU, UYVY, VYUY, I420, YV12, NV12, NV21, NV12_16L32S, NV12_32L32, NV12_4L4, NV12_64Z32, NV12_8L128, Y41B, IYU1, YUV9, YVU9, BGR16, RGB16, BGR15, RGB15, RGB8P, GRAY16_LE, GRAY16_BE, GRAY10_LE16, GRAY10_LE32, GRAY8 }
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
          framerate: [ 0/1, 2147483647/1 ]
     multiview-mode: { (string)mono, (string)left, (string)right }
    video/x-bayer:
             format: { bggr, rggb, grbg, gbrg, bggr10le, rggb10le, grbg10le, gbrg10le, bggr10be, rggb10be, grbg10be, gbrg10be, bggr12le, rggb12le, grbg12le, gbrg12le, bggr12be, rggb12be, grbg12be, gbrg12be, bggr14le, rggb14le, grbg14le, gbrg14le, bggr14be, rggb14be, grbg14be, gbrg14be, bggr16le, rggb16le, grbg16le, gbrg16le, bggr16be, rggb16be, grbg16be, gbrg16be }
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
          framerate: [ 0/1, 2147483647/1 ]
     multiview-mode: { (string)mono, (string)left, (string)right }

Presence – always

Direction – src

Object type – GstPad

## Properties

### animation-mode

    “animation-mode” GstVideoTestSrcAnimationMode *

For pattern=ball, which counter defines the position of the ball.

Flags : Read / Write

Default value : frames (0)

### background-color

    “background-color” guint

Color to use for background color of some patterns. Default is black (0xff000000).

Flags : Read / Write

Default value : -16777216

### flip

    “flip” gboolean

For pattern=ball, invert colors every second.

Flags : Read / Write

Default value : false

### foreground-color

    “foreground-color” guint

Color to use for solid-color pattern and foreground color of other patterns. Default is white (0xffffffff).

Flags : Read / Write

Default value : -1

### horizontal-speed

    “horizontal-speed” gint

Scroll image number of pixels per frame (positive is scroll to the left)

Flags : Read / Write

Default value : 0

### is-live

    “is-live” gboolean

Whether to act as a live source

Flags : Read / Write

Default value : false

### k0

    “k0” gint

Zoneplate zero order phase, for generating plain fields or phase offsets

Flags : Read / Write

Default value : 0

### kt

    “kt” gint

Zoneplate 1st order t phase, for generating phase rotation as a function of time

Flags : Read / Write

Default value : 0

### kt2

    “kt2” gint

Zoneplate 2nd order t phase, t*t/256 cycles per picture

Flags : Read / Write

Default value : 0

### kx

    “kx” gint

Zoneplate 1st order x phase, for generating constant horizontal frequencies

Flags : Read / Write

Default value : 0

### kx2

    “kx2” gint

Zoneplate 2nd order x phase, normalised to kx2/256 cycles per horizontal pixel at width/2 from origin

Flags : Read / Write

Default value : 0

### kxt

    “kxt” gint

Zoneplate x*t product phase, normalised to kxy/256 cycles per vertical pixel at width/2 from origin

Flags : Read / Write

Default value : 0

### kxy

    “kxy” gint

Zoneplate x*y product phase

Flags : Read / Write

Default value : 0

### ky

    “ky” gint

Zoneplate 1st order y phase, for generating content vertical frequencies

Flags : Read / Write

Default value : 0

### ky2

    “ky2” gint

Zoneplate 2nd order y phase, normailsed to ky2/256 cycles per vertical pixel at height/2 from origin

Flags : Read / Write

Default value : 0

### kyt

    “kyt” gint

Zoneplate y*t product phase

Flags : Read / Write

Default value : 0

### motion

    “motion” GstVideoTestSrcMotionType *

For pattern=ball, what motion the ball does

Flags : Read / Write

Default value : wavy (0)

### pattern

    “pattern” GstVideoTestSrcPattern *

Type of test pattern to generate

Flags : Read / Write

Default value : smpte (0)

### timestamp-offset

    “timestamp-offset” gint64

An offset added to timestamps set on buffers (in ns)

Flags : Read / Write

Default value : 0

### xoffset

    “xoffset” gint

Zoneplate 2nd order products x offset

Flags : Read / Write

Default value : 0

### yoffset

    “yoffset” gint

Zoneplate 2nd order products y offset

Flags : Read / Write

Default value : 0

## Named constants

### GstVideoTestSrcAnimationMode

#### Members

`frames` (0) – frame count
`wall-time` (1) – wall clock time
`running-time` (2) – running time

### GstVideoTestSrcMotionType

#### Members

`wavy` (0) – Ball waves back and forth, up and down
`sweep` (1) – 1 revolution per second
`hsweep` (2) – 1/2 revolution per second, then reset to top

### GstVideoTestSrcPattern

The test pattern to produce.

The Gamut pattern creates a checkerboard pattern of colors at the edge of the YCbCr gamut and nearby colors that are out of gamut. The pattern is divided into 4 regions: black, white, red, and blue. After conversion to RGB, the out-of-gamut colors should be converted to the same value as their in-gamut neighbors. If the checkerboard pattern is still visible after conversion, this indicates a faulty conversion. Image manipulation, such as adjusting contrast or brightness, can also cause the pattern to be visible.

The Zone Plate pattern is based on BBC R&D Report 1978/23, and can be used to test spatial frequency response of a system. This pattern generator is controlled by the xoffset and yoffset parameters and also by all the parameters starting with 'k'. The default parameters produce a grey pattern. Try 'videotestsrc pattern=zone-plate kx2=20 ky2=20 kt=1' to produce something interesting.

#### Members

`smpte` (0) – SMPTE 100%% color bars
`snow` (1) – Random (television snow)
`black` (2) – 100%% Black
`white` (3) – 100%% White
`red` (4) – Red
`green` (5) – Green
`blue` (6) – Blue
`checkers-1` (7) – Checkers 1px
`checkers-2` (8) – Checkers 2px
`checkers-4` (9) – Checkers 4px
`checkers-8` (10) – Checkers 8px
`circular` (11) – Circular
`blink` (12) – Blink
`smpte75` (13) – SMPTE 75%% color bars
`zone-plate` (14) – Zone plate
`gamut` (15) – Gamut checkers
`chroma-zone-plate` (16) – Chroma zone plate
`solid-color` (17) – Solid color
`ball` (18) – Moving ball
`smpte100` (19) – SMPTE 100%% color bars
`bar` (20) – Bar
`pinwheel` (21) – Pinwheel
`spokes` (22) – Spokes
`gradient` (23) – Gradient
`colors` (24) – Colors
`smpte-rp-219` (25) – SMPTE test pattern, RP 219 conformant

The results of the search are