videomixer

videomixer — Mix multiple video streams

Synopsis

                    GstVideoMixer;
enum                GstVideoMixerBackground;

Object Hierarchy

  GObject
   +----GstObject
         +----GstElement
               +----GstVideoMixer

Implemented Interfaces

GstVideoMixer implements GstChildProxy.

Properties

  "background"               GstVideoMixerBackground  : Read / Write

Description

Videomixer can accept AYUV, ARGB and BGRA video streams. For each of the requested sink pads it will compare the incoming geometry and framerate to define the output parameters. Indeed output video frames will have the geometry of the biggest incoming video stream and the framerate of the fastest incoming one.

All sink pads must be either AYUV, ARGB or BGRA, but a mixture of them is not supported. The src pad will have the same colorspace as the sinks. No colorspace conversion is done.

Individual parameters for each input stream can be configured on the GstVideoMixerPad.

Sample pipelines

gst-launch videotestsrc pattern=1 ! video/x-raw-yuv, framerate=\(fraction\)10/1, width=100, height=100 ! videobox border-alpha=0 alpha=0.5 top=-70 bottom=-70 right=-220 ! videomixer name=mix ! ffmpegcolorspace ! xvimagesink videotestsrc ! video/x-raw-yuv, framerate=\(fraction\)5/1, width=320, height=240 ! alpha alpha=0.7 ! mix.
A pipeline to demonstrate videomixer used together with videobox. This should show a 320x240 pixels video test source with some transparency showing the background checker pattern. Another video test source with just the snow pattern of 100x100 pixels is overlayed on top of the first one on the left vertically centered with a small transparency showing the first video test source behind and the checker pattern under it. Note that the framerate of the output video is 10 frames per second.
gst-launch videotestsrc pattern=1 ! video/x-raw-rgb, framerate=\(fraction\)10/1, width=100, height=100 ! videomixer name=mix ! ffmpegcolorspace ! ximagesink videotestsrc ! video/x-raw-rgb, framerate=\(fraction\)5/1, width=320, height=240 ! mix.
A pipeline to demostrate bgra mixing. (This does not demonstrate alpha blending).
gst-launch   videotestsrc pattern=1 ! video/x-raw-yuv,format =\(fourcc\)I420, framerate=\(fraction\)10/1, width=100, height=100 ! videomixer name=mix ! ffmpegcolorspace ! ximagesink videotestsrc ! video/x-raw-yuv,format=\(fourcc\)I420, framerate=\(fraction\)5/1, width=320, height=240 ! mix.
A pipeline to test I420

Details

GstVideoMixer

typedef struct _GstVideoMixer GstVideoMixer;

The opaque GstVideoMixer structure.


enum GstVideoMixerBackground

typedef enum
{
  VIDEO_MIXER_BACKGROUND_CHECKER,
  VIDEO_MIXER_BACKGROUND_BLACK,
  VIDEO_MIXER_BACKGROUND_WHITE
}
GstVideoMixerBackground;

The different backgrounds videomixer can blend over.

VIDEO_MIXER_BACKGROUND_CHECKER

checker pattern background

VIDEO_MIXER_BACKGROUND_BLACK

solid color black background

VIDEO_MIXER_BACKGROUND_WHITE

solid color white background

Property Details

The "background" property

  "background"               GstVideoMixerBackground  : Read / Write

Background type.

Default value: Checker pattern