videoscale

## videoscale videoscale — Resizes video |

## Synopsis

    struct              GstVideoScale;
    enum                GstVideoScaleMethod;

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GstObject
                   +----GstElement
                         +----GstBaseTransform
                               +----GstVideoFilter
                                     +----GstVideoScale

## Properties

      "method"                   GstVideoScaleMethod   : Read / Write
      "add-borders"              gboolean              : Read / Write
      "dither"                   gboolean              : Read / Write / Construct
      "envelope"                 gdouble               : Read / Write / Construct
      "sharpen"                  gdouble               : Read / Write / Construct
      "sharpness"                gdouble               : Read / Write / Construct

## Description

This element resizes video frames. By default the element will try to negotiate to the same size on the source and sinkpad so that no scaling is needed. It is therefore safe to insert this element in a pipeline to get more robust behaviour without any cost if no scaling is needed.

This element supports a wide range of color spaces including various YUV and RGB formats and is therefore generally able to operate anywhere in a pipeline.

### Example pipelines

    1
    gst-launch -v filesrc location=videotestsrc.ogg ! oggdemux ! theoradec ! videoconvert ! videoscale ! ximagesink

Decode an Ogg/Theora and display the video using ximagesink. Since ximagesink cannot perform scaling, the video scaling will be performed by videoscale when you resize the video window. To create the test Ogg/Theora file refer to the documentation of theoraenc.

    1
    gst-launch -v filesrc location=videotestsrc.ogg ! oggdemux ! theoradec ! videoscale ! video/x-raw, width=50 ! xvimagesink

Decode an Ogg/Theora and display the video using xvimagesink with a width of 50.

Last reviewed on 2006-03-02 (0.10.4)

## Synopsis

### Element Information

plugin | videoscale
author | Wim Taymans <wim.taymans@chello.be>
class | Filter/Converter/Video/Scaler

### Element Pads

name | sink
direction | sink
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, GRAY8, GRAY16_BE, GRAY16_LE, v308, Y800, Y16, RGB16, RGB15, ARGB64, AYUV64, NV12 }, width=(int)[ 1, 32767 ], height=(int)[ 1, 32767 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

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, GRAY8, GRAY16_BE, GRAY16_LE, v308, Y800, Y16, RGB16, RGB15, ARGB64, AYUV64, NV12 }, width=(int)[ 1, 32767 ], height=(int)[ 1, 32767 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

## Details

### struct GstVideoScale

    struct GstVideoScale;

Opaque data structure

### enum GstVideoScaleMethod

    typedef enum {
      GST_VIDEO_SCALE_NEAREST,
      GST_VIDEO_SCALE_BILINEAR,
      GST_VIDEO_SCALE_4TAP,
      GST_VIDEO_SCALE_LANCZOS
    } GstVideoScaleMethod;

The videoscale method to use.

`GST_VIDEO_SCALE_NEAREST` | use nearest neighbour scaling (fast and ugly)
`GST_VIDEO_SCALE_BILINEAR` | use bilinear scaling (slower but prettier).
`GST_VIDEO_SCALE_4TAP` | use a 4-tap filter for scaling (slow).
`GST_VIDEO_SCALE_LANCZOS` | use a multitap Lanczos filter for scaling (slow).

## Property Details

### The `"method"` property

      "method"                   GstVideoScaleMethod   : Read / Write

method.

Default value: Bilinear

### The `"add-borders"` property

      "add-borders"              gboolean              : Read / Write

Add black borders if necessary to keep the display aspect ratio.

Default value: FALSE

### The `"dither"` property

      "dither"                   gboolean              : Read / Write / Construct

Add dither (only used for Lanczos method).

Default value: FALSE

### The `"envelope"` property

      "envelope"                 gdouble               : Read / Write / Construct

Size of filter envelope.

Allowed values: [0,5]

Default value: 2

### The `"sharpen"` property

      "sharpen"                  gdouble               : Read / Write / Construct

Sharpening.

Allowed values: [0,1]

Default value: 0

### The `"sharpness"` property

      "sharpness"                gdouble               : Read / Write / Construct

Sharpness of filter.

Allowed values: [0,2]

Default value: 1

## See Also

videorate, videoconvert