Top |
Properties
gdouble | alpha | Read / Write |
gfloat | angle | Read / Write |
GstAlphaMethod | method | Read / Write |
gfloat | noise-level | Read / Write |
guint | target-b | Read / Write |
guint | target-g | Read / Write |
guint | target-r | Read / Write |
guint | black-sensitivity | Read / Write |
guint | white-sensitivity | Read / Write |
gboolean | prefer-passthrough | Read / Write |
Object Hierarchy
GObject ╰── GInitiallyUnowned ╰── GstObject ╰── GstElement ╰── GstBaseTransform ╰── GstVideoFilter ╰── GstAlpha
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 4 |
gst-launch-1.0 videotestsrc pattern=snow ! mixer.sink_0 \ videotestsrc pattern=smpte75 ! alpha method=green ! mixer.sink_1 \ videomixer name=mixer sink_0::zorder=0 sink_1::zorder=1 ! \ videoconvert ! autovideosink |
This pipeline adds a alpha channel to the SMPTE color bars with green as the transparent color and overlays the output on top of 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 ] |
Property Details
The “alpha”
property
“alpha” gdouble
The value for the alpha channel.
Flags: Read / Write
Allowed values: [0,1]
Default value: 1
The “angle”
property
“angle” gfloat
Size of the colorcube to change.
Flags: Read / Write
Allowed values: [0,90]
Default value: 20
The “method”
property
“method” GstAlphaMethod
How the alpha channels should be created.
Flags: Read / Write
Default value: Set/adjust alpha channel
The “noise-level”
property
“noise-level” gfloat
Size of noise radius.
Flags: Read / Write
Allowed values: [0,64]
Default value: 2
The “target-b”
property
“target-b” guint
The blue color value for custom RGB chroma keying.
Flags: Read / Write
Allowed values: <= 255
Default value: 0
The “target-g”
property
“target-g” guint
The green color value for custom RGB chroma keying.
Flags: Read / Write
Allowed values: <= 255
Default value: 255
The “target-r”
property
“target-r” guint
The red color value for custom RGB chroma keying.
Flags: Read / Write
Allowed values: <= 255
Default value: 0
The “black-sensitivity”
property
“black-sensitivity” guint
Sensitivity to dark colors.
Flags: Read / Write
Allowed values: <= 128
Default value: 100
The “white-sensitivity”
property
“white-sensitivity” guint
Sensitivity to bright colors.
Flags: Read / Write
Allowed values: <= 128
Default value: 100
The “prefer-passthrough”
property
“prefer-passthrough” gboolean
Don't do any processing for alpha=1.0 if possible.
Flags: Read / Write
Default value: FALSE