## videoscale

videoscale

## Properties

gboolean | add-borders | Read / Write
gboolean | dither | Read / Write / Construct
gdouble | envelope | Read / Write / Construct
GstVideoScaleMethod | method | Read / Write
gdouble | sharpen | Read / Write / Construct
gdouble | sharpness | Read / Write / Construct
gboolean | gamma-decode | Read / Write / Construct
guint | n-threads | Read / Write / Construct

## Types and Values

struct | GstVideoScale
enum | GstVideoScaleMethod

## Object Hierarchy

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

## 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-1.0 -v filesrc location=videotestsrc.ogg ! oggdemux ! theoradec ! videoconvert ! videoscale ! autovideosink

Decode an Ogg/Theora and display the video. If the video sink chosen 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-1.0 -v filesrc location=videotestsrc.ogg ! oggdemux ! theoradec ! videoconvert ! videoscale ! video/x-raw,width=100 ! autovideosink

Decode an Ogg/Theora and display the video with a width of 100.

## Synopsis

### Element Information

plugin | videoscale
author | Wim Taymans <wim.taymans@gmail.com>
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, 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 }, width=(int)[ 1, 32767 ], height=(int)[ 1, 32767 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

video/x-raw(ANY), 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 }, 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, 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 }, width=(int)[ 1, 32767 ], height=(int)[ 1, 32767 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

video/x-raw(ANY), 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 }, width=(int)[ 1, 32767 ], height=(int)[ 1, 32767 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

## Functions

## Types and Values

### struct GstVideoScale

    struct GstVideoScale;

Opaque data structure

### enum GstVideoScaleMethod

The videoscale method to use.

#### Members

GST_VIDEO_SCALE_NEAREST | use nearest neighbour scaling (fast and ugly) |
GST_VIDEO_SCALE_BILINEAR | use 2-tap bilinear scaling (slower but prettier). |
GST_VIDEO_SCALE_4TAP | use a 4-tap sinc filter for scaling (slow). |
GST_VIDEO_SCALE_LANCZOS | use a multitap Lanczos filter for scaling (slow). |
GST_VIDEO_SCALE_BILINEAR2 | use a multitap bilinear filter |
GST_VIDEO_SCALE_SINC | use a multitap sinc filter |
GST_VIDEO_SCALE_HERMITE | use a multitap bicubic Hermite filter |
GST_VIDEO_SCALE_SPLINE | use a multitap bicubic spline filter |
GST_VIDEO_SCALE_CATROM | use a multitap bicubic Catmull-Rom filter |
GST_VIDEO_SCALE_MITCHELL | use a multitap bicubic Mitchell filter |

## Property Details

### The `“add-borders”` property

      “add-borders”              gboolean

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

Flags: Read / Write

Default value: TRUE

### The `“dither”` property

      “dither”                   gboolean

Add dither (only used for Lanczos method).

Flags: Read / Write / Construct

Default value: FALSE

### The `“envelope”` property

      “envelope”                 gdouble

Size of filter envelope.

Flags: Read / Write / Construct

Allowed values: [1,5]

Default value: 2

### The `“method”` property

      “method”                   GstVideoScaleMethod

method.

Flags: Read / Write

Default value: Bilinear (2-tap)

### The `“sharpen”` property

      “sharpen”                  gdouble

Sharpening.

Flags: Read / Write / Construct

Allowed values: [0,1]

Default value: 0

### The `“sharpness”` property

      “sharpness”                gdouble

Sharpness of filter.

Flags: Read / Write / Construct

Allowed values: [0.5,1.5]

Default value: 1

### The `“gamma-decode”` property

      “gamma-decode”             gboolean

Decode gamma before scaling.

Flags: Read / Write / Construct

Default value: FALSE

### The `“n-threads”` property

      “n-threads”                guint

Maximum number of threads to use.

Flags: Read / Write / Construct

Default value: 1

## See Also

videorate, videoconvert