[gst-devel] Simple example of a video filter

Tim-Philipp Müller t.i.m at zen.co.uk
Wed Feb 2 00:46:26 CET 2011


On Tue, 2011-02-01 at 14:37 -0600, Brian Michalk wrote:

> I've been looking through the sources for a simple element that I can 
> use as a basis for a filter that I want to write.
> I don't have much experience in video streams, so I'm intimidated at all 
> of the plumbing needed to implement a lot of the functions of a normal 
> element.  Functions like seeking, resetting, etc.  I've looked at the 
> Pango text overlay, and the Theora encoder, as well as a few others.  
> When I get into the video chains and such, I get lost in the amount of 
> detail.
> 
> I have also created a new node with the boilerplate, and compiled it, 
> and verified that it runs in the pipeline, but then am lost in finding a 
> good example on how to get from there to modification of the video stream.
>
> I would like to start simple.  Not so simple from boilerplate, and not 
> so complicated as the two I mentioned above.  I figure a good start 
> would be to modify a video stream.  For an I420 stream, I want to 
> increment each pixel of the Y plane.  Once I get to that point, I know I 
> can get the rest of the filter implemented.
> 
> Is there any documentation, or simple app notes closer to what I am 
> looking for?

There's a GstVideoFilter base class in libgstvideo in gst-plugins-base.

A very simple element that supports I420 is the navigationtest element
in gst-plugins-good/gst/debug/. (Though it's not exactly tutorial
material, it should be easy enough to follow if you just ignore all the
navigation event handling.)

There are also numerous video effect plugins in -bad such as
coloreffects or geometrictransform.

Cheers 
 -Tim





More information about the gstreamer-devel mailing list