# 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

Classification: – `Source/Video`

Rank – none

Plugin – videotestsrc

Package – GStreamer Base Plug-ins

## Pad Templates

### `src`

    video/x-raw:
             format: { AYUV64, ARGB64, GBRA_12LE, GBRA_12BE, Y412_LE, Y412_BE, A444_10LE, GBRA_10LE, A444_10BE, GBRA_10BE, A422_10LE, A422_10BE, A420_10LE, A420_10BE, RGB10A2_LE, BGR10A2_LE, Y410, GBRA, ABGR, VUYA, BGRA, AYUV, ARGB, RGBA, A420, Y444_16LE, Y444_16BE, 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, v210, UYVP, I420_10LE, I420_10BE, P010_10LE, NV12_10LE32, NV12_10LE40, P010_10BE, Y444, GBR, RGBP, BGRP, NV24, xBGR, BGRx, xRGB, RGBx, BGR, IYU2, v308, RGB, Y42B, NV61, NV16, VYUY, UYVY, YVYU, YUY2, I420, YV12, NV21, NV12, NV12_64Z32, NV12_4L4, NV12_32L32, AV12, Y41B, IYU1, YVU9, YUV9, RGB16, BGR16, RGB15, BGR15, RGB8P, GRAY16_LE, GRAY16_BE, 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 }
              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

The results of the search are