# rawvideoparse

This element parses incoming data as raw video frames and timestamps these. It also handles seek queries in said raw video data, and ensures that output buffers contain exactly one frame, even if the input buffers contain only partial frames or multiple frames. In the former case, it will continue to receive buffers until there is enough input data to output one frame. In the latter case, it will extract the first frame in the buffer and output it, then the second one etc. until the remaining unparsed bytes aren't enough to form a complete frame, and it will then continue as described in the earlier case.

If the properties configuration is used, plane strides and offsets will be computed by using gst_video_info_set_format. This can be overridden by passing GstValueArrays to the plane-offsets and plane-strides properties. When this is done, these custom offsets and strides are used later even if new width, height, format etc. property values might be set. To switch back to computed plane strides & offsets, pass NULL to one or both of the plane-offset and plane-array properties.

The frame size property is useful in cases where there is extra data between the frames (for example, trailing metadata, or headers). The parser calculates the actual frame size out of the other properties and compares it with this frame-size value. If the frame size is larger than the calculated size, then the extra bytes after the end of the frame are skipped. For example, with 8-bit grayscale frames and a actual frame size of 100x10 pixels and a frame-size of 1500 bytes, there are 500 excess bytes at the end of the actual frame which are then skipped. It is safe to set the frame size to a value that is smaller than the actual frame size (in fact, its default value is 0); if it is smaller, then no trailing data will be skipped.

If a framerate of 0 Hz is set (for example, 0/1), then output buffers will have no duration set. The first output buffer will have a PTS 0, all subsequent ones an unset PTS.

## Example pipelines

     gst-launch-1.0 filesrc location=video.raw ! rawvideoparse use-sink-caps=false \
             width=500 height=400 format=y444 ! autovideosink

Read raw data from a local file and parse it as video data with 500x400 pixels and Y444 video format.

     gst-launch-1.0 filesrc location=video.raw ! queue ! "video/x-raw, width=320, \
             height=240, format=I420, framerate=1/1" ! rawvideoparse \
             use-sink-caps=true ! autovideosink

Read raw data from a local file and parse it as video data with 320x240 pixels and I420 video format. The queue element here is to force push based scheduling.

## Hierarchy

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──GstBaseParse
                        ╰──GstRawBaseParse
                            ╰──rawvideoparse

## Factory details

Authors: – Carlos Rafael Giani

Classification: – `Codec/Parser/Video`

Rank – none

Plugin – rawparse

Package – GStreamer Base Plug-ins

## Pad Templates

### `sink`

    video/x-unaligned-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, BGR10x2_LE, RGB10x2_LE, r210, I422_10LE, I422_10BE, NV16_10LE40, 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 ]
    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, BGR10x2_LE, RGB10x2_LE, r210, I422_10LE, I422_10BE, NV16_10LE40, 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 ]

Presence – always

Direction – sink

Object type – GstPad

### `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, BGR10x2_LE, RGB10x2_LE, r210, I422_10LE, I422_10BE, NV16_10LE40, 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 ]

Presence – always

Direction – src

Object type – GstPad

## Properties

### colorimetry

    “colorimetry” gchararray

The video source colorimetry

Flags : Read / Write

Default value : NULL

### format

    “format” GstVideoFormat *

Format of frames in raw stream

Flags : Read / Write

Default value : i420 (2)

### frame-size

    “frame-size” guint

Size of a frame (0 = frames are tightly packed together)

Flags : Read / Write

Default value : 0

### framerate

    “framerate” GstFraction *

Rate of frames in raw stream

Flags : Read / Write

Default value : 25/1

### height

    “height” gint

Height of frames in raw stream

Flags : Read / Write

Default value : 240

### interlaced

    “interlaced” gboolean

True if frames in raw stream are interlaced

Flags : Read / Write

Default value : false

### pixel-aspect-ratio

    “pixel-aspect-ratio” GstFraction *

Pixel aspect ratio of frames in raw stream

Flags : Read / Write

Default value : 1/1

### plane-offsets

    “plane-offsets” GstValueArray *

Offsets of the planes in bytes (e.g. plane-offsets="<0,76800>")

Flags : Read / Write

### plane-strides

    “plane-strides” GstValueArray *

Strides of the planes in bytes (e.g. plane-strides="<320,320>")

Flags : Read / Write

### top-field-first

    “top-field-first” gboolean

True if top field in frames in raw stream come first (not used if frames aren't interlaced)

Flags : Read / Write

Default value : false

### width

    “width” gint

Width of frames in raw stream

Flags : Read / Write

Default value : 320

The results of the search are