geglfilter: GStreamer element for manipulating video using Gegl

Gegl is an image processing framework used in projects like Gimp and DarkTable. It will eventually allow Gimp to allow non-destructive, high bit-depth image processing, among other things. And GStreamer is the multimedia framework for GNU/Linux, handling video/audio/other playback/recording/manipulation on your favorite desktop/server/mobile/embedded system.

After writing the Cairo overlay GStreamer element, I implement a basic GStreamer element which allows you to apply a filter to video in a GStreamer pipeline using Gegl. Using this element, video editing/manipulation applications like Pitivi could allow users to apply effects provided by Gegl to videos. Gegl is a very powerful image processing framework, and already has a significant number of image processing operations. More operations is expected, especially from the port the tools, filters and plugins used in Gimp to Gegl.

Here are some screenshots showing the standard GStreamer video test data being manipulated in different ways using Gegl. Note: the size of the images are only different because the output windows had different sizes when I took the screenshot.

Top left: original video. Top right: color temperature adjusted from 6500 to 9000 K Bottom left: inverted colors. Bottom right: inverted colors and black-white threshold

Top left: original video (no-op). Top right: color temperature adjusted from 6500 to 9000K. Bottom left: inverted colors. Bottom right: inverted colors and black-white threshold conversion

A bug has been filed for inclusion of this element into gst-plugins-good. The patch attached there also contains an example application, showing how to use the element.

In the patches you will find an example.

Flattr this!

cairooverlay: Generic Cairo overlay element for GStreamer

I wrote the initial version of this in late January, and after some interations it was merged yesterday to gst-plugins-good, and will be in gst-plugins-good 0.10.33. This solves the feature request I filed in 2009, one of my oldest bugreports in!

What does it do?

cairooverlay allows you to draw arbitrary things on top of a video stream in GStreamer using Cairo. Previously you had to create a custom GStreamer element for that (in C/Vala), but now you can just hook up to some signals, using any programming language with GStreamer/Cairo bindings.

To draw an overlay using this element, you use the “caps-updated” signal to get information about the video stream (like width and height) and the “draw” signal to do the actual drawing. In addition to the Cairo context, the draw signal passes you the timestamp and duration of the buffer, so you can also do animations.

For more info see the included example application or the documentation (should be updated soon). Here is the obligatory screenshot showing the example application drawing a heart onto a test videostream:

GStreamer + Cairo = <3

The heart is actually animated, so I guess I should have had a video. But you’ll just have to trust me that it is very cute, or grab the code yourself!

Flattr this!