## videotestsrc

videotestsrc

## Properties

guint | background-color | Read / Write
guint | foreground-color | Read / Write
gint | horizontal-speed | Read / Write
gboolean | is-live | Read / Write
gint | k0 | Read / Write
gint | kt | Read / Write
gint | kt2 | Read / Write
gint | kx | Read / Write
gint | kx2 | Read / Write
gint | kxt | Read / Write
gint | kxy | Read / Write
gint | ky | Read / Write
gint | ky2 | Read / Write
gint | kyt | Read / Write
GstVideoTestSrcPattern | pattern | Read / Write
gint64 | timestamp-offset | Read / Write
gint | xoffset | Read / Write
gint | yoffset | Read / Write
GstVideoTestSrcAnimationMode | animation-mode | Read / Write
gboolean | flip | Read / Write
GstVideoTestSrcMotionType | motion | Read / Write

## Types and Values

struct | GstVideoTestSrc
enum | GstVideoTestSrcPattern

## Object Hierarchy

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

## Description

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

    1

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

Shows random noise in a video window.

## Synopsis

### Element Information

plugin | videotestsrc
author | David A. Schleef <ds@schleef.org>
class | Source/Video

### Element Pads

name | src
direction | source
presence | always

details

video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE, GRAY10_LE32, NV12_10LE32, NV16_10LE32 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], multiview-mode=(string){ mono, left, right }

| video/x-bayer, format=(string){ bggr, rggb, grbg, gbrg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], multiview-mode=(string){ mono, left, right }

## Functions

## Types and Values

### struct GstVideoTestSrc

    struct GstVideoTestSrc;

Opaque data structure.

### enum 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

GST_VIDEO_TEST_SRC_SMPTE | A standard SMPTE test pattern |
GST_VIDEO_TEST_SRC_SNOW | Random noise |
GST_VIDEO_TEST_SRC_BLACK | A black image |
GST_VIDEO_TEST_SRC_WHITE | A white image |
GST_VIDEO_TEST_SRC_RED | A red image |
GST_VIDEO_TEST_SRC_GREEN | A green image |
GST_VIDEO_TEST_SRC_BLUE | A blue image |
GST_VIDEO_TEST_SRC_CHECKERS1 | Checkers pattern (1px) |
GST_VIDEO_TEST_SRC_CHECKERS2 | Checkers pattern (2px) |
GST_VIDEO_TEST_SRC_CHECKERS4 | Checkers pattern (4px) |
GST_VIDEO_TEST_SRC_CHECKERS8 | Checkers pattern (8px) |
GST_VIDEO_TEST_SRC_CIRCULAR | Circular pattern |
GST_VIDEO_TEST_SRC_BLINK | Alternate between black and white |
GST_VIDEO_TEST_SRC_SMPTE75 | SMPTE test pattern (75% color bars) |
GST_VIDEO_TEST_SRC_ZONE_PLATE | Zone plate |
GST_VIDEO_TEST_SRC_GAMUT | Gamut checking pattern |
GST_VIDEO_TEST_SRC_CHROMA_ZONE_PLATE | Chroma zone plate |
GST_VIDEO_TEST_SRC_SOLID | A solid color, defined by the “foreground-color” property |
GST_VIDEO_TEST_SRC_BALL | Moving ball |
GST_VIDEO_TEST_SRC_SMPTE100 | SMPTE test pattern (100% color bars) |
GST_VIDEO_TEST_SRC_BAR | Bar with foreground color |
GST_VIDEO_TEST_SRC_PINWHEEL | Pinwheel |
GST_VIDEO_TEST_SRC_SPOKES | Spokes |
GST_VIDEO_TEST_SRC_GRADIENT | Gradient |
GST_VIDEO_TEST_SRC_COLORS | All colors |

## Property Details

### The `“background-color”` property

      “background-color”         guint

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

Flags: Read / Write

Default value: 4278190080

### The `“foreground-color”` property

      “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: 4294967295

### The `“horizontal-speed”` property

      “horizontal-speed”         gint

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

Flags: Read / Write

Default value: 0

### The `“is-live”` property

      “is-live”                  gboolean

Whether to act as a live source.

Flags: Read / Write

Default value: FALSE

### The `“k0”` property

      “k0”                       gint

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

Flags: Read / Write

Default value: 0

### The `“kt”` property

      “kt”                       gint

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

Flags: Read / Write

Default value: 0

### The `“kt2”` property

      “kt2”                      gint

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

Flags: Read / Write

Default value: 0

### The `“kx”` property

      “kx”                       gint

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

Flags: Read / Write

Default value: 0

### The `“kx2”` property

      “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

### The `“kxt”` property

      “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

### The `“kxy”` property

      “kxy”                      gint

Zoneplate x*y product phase.

Flags: Read / Write

Default value: 0

### The `“ky”` property

      “ky”                       gint

Zoneplate 1st order y phase, for generating contant vertical frequencies.

Flags: Read / Write

Default value: 0

### The `“ky2”` property

      “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

### The `“kyt”` property

      “kyt”                      gint

Zoneplate y*t product phase.

Flags: Read / Write

Default value: 0

### The `“pattern”` property

      “pattern”                  GstVideoTestSrcPattern

Type of test pattern to generate.

Flags: Read / Write

Default value: SMPTE 100% color bars

### The `“timestamp-offset”` property

      “timestamp-offset”         gint64

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

Flags: Read / Write

Allowed values: >= 0

Default value: 0

### The `“xoffset”` property

      “xoffset”                  gint

Zoneplate 2nd order products x offset.

Flags: Read / Write

Default value: 0

### The `“yoffset”` property

      “yoffset”                  gint

Zoneplate 2nd order products y offset.

Flags: Read / Write

Default value: 0

### The `“animation-mode”` property

      “animation-mode”           GstVideoTestSrcAnimationMode

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

Flags: Read / Write

Default value: frame count

### The `“flip”` property

      “flip”                     gboolean

For pattern=ball, invert colors every second.

Flags: Read / Write

Default value: FALSE

### The `“motion”` property

      “motion”                   GstVideoTestSrcMotionType

For pattern=ball, what motion the ball does.

Flags: Read / Write

Default value: Ball waves back and forth, up and down