## videocrop

videocrop

## Properties

gint | bottom | Read / Write
gint | left | Read / Write
gint | right | Read / Write
gint | top | Read / Write

## Types and Values

struct | GstVideoCrop

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstElement
                    ╰── GstBaseTransform
                        ╰── GstVideoFilter
                            ╰── GstVideoCrop

## Description

This element crops video frames, meaning it can remove parts of the picture on the left, right, top or bottom of the picture and output a smaller picture than the input picture, with the unwanted parts at the border removed.

The videocrop element is similar to the videobox element, but its main goal is to support a multitude of formats as efficiently as possible. Unlike videbox, it cannot add borders to the picture and unlike videbox it will always output images in exactly the same format as the input image.

If there is nothing to crop, the element will operate in pass-through mode.

Note that no special efforts are made to handle chroma-subsampled formats in the case of odd-valued cropping and compensate for sub-unit chroma plane shifts for such formats in the case where the “left” or “top” property is set to an odd number. This doesn't matter for most use cases, but it might matter for yours.

### Example launch line

    1

    gst-launch-1.0 -v videotestsrc ! videocrop top=42 left=1 right=4 bottom=0 ! ximagesink

## Synopsis

### Element Information

plugin | videocrop
author | Tim-Philipp Müller <tim centricular net>
class | Filter/Effect/Video

### Element Pads

name | sink
direction | sink
presence | always
details | video/x-raw, format=(string){ RGBx, xRGB, BGRx, xBGR, RGBA, ARGB, BGRA, ABGR, RGB, BGR, AYUV, YUY2, YVYU, UYVY, I420, YV12, RGB16, RGB15, GRAY8, NV12, NV21, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

name | src
direction | source
presence | always
details | video/x-raw, format=(string){ RGBx, xRGB, BGRx, xBGR, RGBA, ARGB, BGRA, ABGR, RGB, BGR, AYUV, YUY2, YVYU, UYVY, I420, YV12, RGB16, RGB15, GRAY8, NV12, NV21, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

## Functions

## Types and Values

### struct GstVideoCrop

    struct GstVideoCrop;

## Property Details

### The `“bottom”` property

      “bottom”                   gint

Pixels to crop at bottom (-1 to auto-crop).

Owner: GstVideoCrop

Flags: Read / Write

Allowed values: >= G_MAXULONG

Default value: 0

### The `“left”` property

      “left”                     gint

Pixels to crop at left (-1 to auto-crop).

Owner: GstVideoCrop

Flags: Read / Write

Allowed values: >= G_MAXULONG

Default value: 0

### The `“right”` property

      “right”                    gint

Pixels to crop at right (-1 to auto-crop).

Owner: GstVideoCrop

Flags: Read / Write

Allowed values: >= G_MAXULONG

Default value: 0

### The `“top”` property

      “top”                      gint

Pixels to crop at top (-1 to auto-crop).

Owner: GstVideoCrop

Flags: Read / Write

Allowed values: >= G_MAXULONG

Default value: 0

## See Also

GstVideoBox