alpha
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:
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.
Hierarchy
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstElement ╰──GstBaseTransform ╰──GstVideoFilter ╰──alpha
Factory details
Authors: – Wim Taymans
Classification: – Filter/Effect/Video
Rank – none
Plugin – alpha
Package – GStreamer Good Plug-ins
Pad Templates
sink
video/x-raw:
format: { AYUV, ARGB, BGRA, ABGR, RGBA, Y444, xRGB, BGRx, xBGR, RGBx, RGB, BGR, Y42B, YUY2, YVYU, UYVY, I420, YV12, Y41B }
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
src
video/x-raw:
format: { AYUV, ARGB, BGRA, ABGR, RGBA, Y444, xRGB, BGRx, xBGR, RGBx, RGB, BGR, Y42B, YUY2, YVYU, UYVY, I420, YV12, Y41B }
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
Properties
black-sensitivity
“black-sensitivity” guint
Sensitivity to dark colors
Flags : Read / Write
Default value : 100
method
“method” GstAlphaMethod *
How the alpha channels should be created
Flags : Read / Write
Default value : set (0)
prefer-passthrough
“prefer-passthrough” gboolean
Don't do any processing for alpha=1.0 if possible
Flags : Read / Write
Default value : false
target-b
“target-b” guint
The blue color value for custom RGB chroma keying
Flags : Read / Write
Default value : 0
target-g
“target-g” guint
The green color value for custom RGB chroma keying
Flags : Read / Write
Default value : 255
target-r
“target-r” guint
The red color value for custom RGB chroma keying
Flags : Read / Write
Default value : 0
white-sensitivity
“white-sensitivity” guint
Sensitivity to bright colors
Flags : Read / Write
Default value : 100
Named constants
GstAlphaMethod
Members
set
(0) – Set/adjust alpha channel
green
(1) – Chroma Key on pure green
blue
(2) – Chroma Key on pure blue
custom
(3) – Chroma Key on custom RGB values
The results of the search are