glalpha

The glalpha 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 gltestsrc pattern=snow ! mixer.sink_0 \
   gltestsrc pattern=smpte ! glalpha method=green ! mixer.sink_1 \
   glvideomixer name=mixer sink_0::zorder=0 sink_1::zorder=1 ! \
   glimagesink

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
                    ╰──GstGLBaseFilter
                        ╰──GstGLFilter
                            ╰──glalpha

Factory details

Authors: – Matthew Waters

Classification:Filter/Effect/Video

Rank – none

Plugin – opengl

Package – GStreamer Base Plug-ins

Pad Templates

sink

video/x-raw(ANY):
         format: RGBA
          width: [ 1, 2147483647 ]
         height: [ 1, 2147483647 ]
      framerate: [ 0/1, 2147483647/1 ]
 texture-target: 2D

video/x-raw(memory:GLMemory):
         format: RGBA
          width: [ 1, 2147483647 ]
         height: [ 1, 2147483647 ]
      framerate: [ 0/1, 2147483647/1 ]
 texture-target: 2D

Presencealways

Directionsink

Object typeGstPad


src

video/x-raw(memory:GLMemory):
         format: RGBA
          width: [ 1, 2147483647 ]
         height: [ 1, 2147483647 ]
      framerate: [ 0/1, 2147483647/1 ]
 texture-target: 2D

video/x-raw(ANY):
         format: RGBA
          width: [ 1, 2147483647 ]
         height: [ 1, 2147483647 ]
      framerate: [ 0/1, 2147483647/1 ]
 texture-target: 2D

Presencealways

Directionsrc

Object typeGstPad


Properties

alpha

“alpha” gdouble

The value for the alpha channel

Flags : Read / Write

Default value : 1


angle

“angle” gfloat

Size of the colorcube to change

Flags : Read / Write

Default value : 20


black-sensitivity

“black-sensitivity” guint

Sensitivity to dark colors

Flags : Read / Write

Default value : 100


method

“method” Glalpha-method *

How the alpha channels should be created

Flags : Read / Write

Default value : set (0)


noise-level

“noise-level” gfloat

Size of noise radius

Flags : Read / Write

Default value : 2


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

Glalpha-method

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