alpha

## alpha alpha — Adds an alpha channel to video - uniform or via chroma-keying |

## Synopsis

    struct              GstAlpha;
    enum                GstAlphaMethod;

## Object Hierarchy

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

## Properties

      "alpha"                    gdouble               : Read / Write
      "angle"                    gfloat                : Read / Write
      "method"                   GstAlphaMethod        : Read / Write
      "noise-level"              gfloat                : Read / Write
      "target-b"                 guint                 : Read / Write
      "target-g"                 guint                 : Read / Write
      "target-r"                 guint                 : Read / Write
      "black-sensitivity"        guint                 : Read / Write
      "white-sensitivity"        guint                 : Read / Write
      "prefer-passthrough"       gboolean              : Read / Write

## Description

The alpha element adds an alpha channel to a video stream. The values of the alpha channel can be either be set to a constant or can be dynamically calculated via chroma keying, e.g. blue can be set as the transparent color.

Sample pipeline:

    1
    2
    3
    gst-launch-1.0 videotestsrc pattern=smpte75 ! alpha method=green ! \
      videomixer name=mixer ! videoconvert ! autovideosink     \
      videotestsrc pattern=snow ! mixer.

This pipeline adds a alpha channel to the SMPTE color bars with green as the transparent color and mixes the output with a snow video stream.

## Synopsis

### Element Information

plugin | alpha
author | Wim Taymans <wim.taymans@gmail.com> Edward Hervey <edward.hervey@collabora.co.uk> Jan Schmidt <thaytan@noraisin.net>
class | Filter/Effect/Video

### Element Pads

name | sink
direction | sink
presence | always
details | video/x-raw, format=(string){ AYUV, ARGB, BGRA, ABGR, RGBA, Y444, xRGB, BGRx, xBGR, RGBx, RGB, BGR, Y42B, YUY2, YVYU, UYVY, I420, YV12, Y41B }, 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){ AYUV, ARGB, BGRA, ABGR, RGBA, Y444, xRGB, BGRx, xBGR, RGBx, RGB, BGR, Y42B, YUY2, YVYU, UYVY, I420, YV12, Y41B }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

## Details

### struct GstAlpha

    struct GstAlpha;

### enum GstAlphaMethod

    typedef enum {
      ALPHA_METHOD_SET,
      ALPHA_METHOD_GREEN,
      ALPHA_METHOD_BLUE,
      ALPHA_METHOD_CUSTOM,
    } GstAlphaMethod;

`ALPHA_METHOD_SET` | Set/adjust alpha channel
`ALPHA_METHOD_GREEN` | Chroma Key green
`ALPHA_METHOD_BLUE` | Chroma Key blue
`ALPHA_METHOD_CUSTOM` | Chroma Key on target_r/g/b

## Property Details

### The `"alpha"` property

      "alpha"                    gdouble               : Read / Write

The value for the alpha channel.

Allowed values: [0,1]

Default value: 1

### The `"angle"` property

      "angle"                    gfloat                : Read / Write

Size of the colorcube to change.

Allowed values: [0,90]

Default value: 20

### The `"method"` property

      "method"                   GstAlphaMethod        : Read / Write

How the alpha channels should be created.

Default value: Set/adjust alpha channel

### The `"noise-level"` property

      "noise-level"              gfloat                : Read / Write

Size of noise radius.

Allowed values: [0,64]

Default value: 2

### The `"target-b"` property

      "target-b"                 guint                 : Read / Write

The Blue target.

Allowed values: <= 255

Default value: 0

### The `"target-g"` property

      "target-g"                 guint                 : Read / Write

The Green target.

Allowed values: <= 255

Default value: 255

### The `"target-r"` property

      "target-r"                 guint                 : Read / Write

The Red target.

Allowed values: <= 255

Default value: 0

### The `"black-sensitivity"` property

      "black-sensitivity"        guint                 : Read / Write

Sensitivity to dark colors.

Allowed values: <= 128

Default value: 100

### The `"white-sensitivity"` property

      "white-sensitivity"        guint                 : Read / Write

Sensitivity to bright colors.

Allowed values: <= 128

Default value: 100

### The `"prefer-passthrough"` property

      "prefer-passthrough"       gboolean              : Read / Write

Don't do any processing for alpha=1.0 if possible.

Default value: FALSE