videocrop

videocrop — Crops video into a user-defined region

Synopsis




            GstVideoCrop;

Object Hierarchy


  GObject
   +----GstObject
         +----GstElement
               +----GstBaseTransform
                     +----GstVideoCrop

Properties


  "bottom"               gint                  : Read / Write
  "left"                 gint                  : Read / Write
  "right"                gint                  : Read / Write
  "top"                  gint                  : Read / Write

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

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

Element Information

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

Details

GstVideoCrop

typedef struct _GstVideoCrop GstVideoCrop;

Property Details

The "bottom" property

  "bottom"               gint                  : Read / Write

Pixels to crop at bottom.

Allowed values: >= 0

Default value: 0


The "left" property

  "left"                 gint                  : Read / Write

Pixels to crop at left.

Allowed values: >= 0

Default value: 0


The "right" property

  "right"                gint                  : Read / Write

Pixels to crop at right.

Allowed values: >= 0

Default value: 0


The "top" property

  "top"                  gint                  : Read / Write

Pixels to crop at top.

Allowed values: >= 0

Default value: 0

See Also

GstVideoBox