Description

emb-overlay is a gstreamer element that can be used to overlay: images, text and/or time and date over video streams or photos without using lots of floating point arithmetic. This is necessary to get good performance when the processor doesn't contain an FPU.

GStreamer embedded overlay element

After building the SDK and installing the images onto your target hardware, verify the embedded overlay element is available:

Fonts and Graphics

Any Cairo compatible font can use used. Any graphic that can be stored in the PNG file format can be used. For graphics, a color in the PNG file can be used to indicate transparency.

The time consumed to overlay onto each video frame is dependent on two factors:

Size of text and graphic

If the bitmap version the text and/or graphic in the correct color space is already cached.

The fast GStreamer overlay element caches the text and graphics in a color space that can be directly applied to each video frame. If the text and graphics doesn't change from one frame to the next, then the time to overlay text/graphics on the frame is just the bitblit time to process each pixel associated with other overlay regions.

If the text or graphics is being changed quickly, then there is the addition delay to render the text in the choosen font and perform any needed color space conversion.

GStreamer Pipelines

Next you will find various pipelines showing the emboverlay element capabilities, in this case the element was tested using a Leopardboard DM365 with a 5Mp sensor camera.

You can use emboverlay for text and/or date and/or logo overlay on each video frame.

Video overlay examples

Overlay text

Colored text can be entered using hexadecimal values in the following format:

0xRRGGBB

R stands for Red, G for Green, and B for Blue, with the possible values for each color being: 0-FF

Overlay date

emboverlay date has the same capabilities as the Unix date command, letter and border color can be chosen with the caps "time-color" and "time-border", using hexadecimal numbers with the format 0xRRGGBB, for example: