[gst-devel] dynamic overlaying of images on video

Tim Müller t.i.m at zen.co.uk
Wed Aug 29 14:47:39 CEST 2007


Hi,

> My problem is that the position of each overlay sink pad is fixed to (0,0), 
> so all layers overlap each-others. I have modified the component such that 
> each pad has a fixed (hardcoded) position in the output frame. But this is 
> static, not dynamic...

The videomixer sink pads all have "xpos", "ypos", "zorder" and "alpha"
properties (which you can set in your code using g_object_set()). The
documentation should probably mention that somewhere.


> I was thinking of deriving the videomixer element, adding an additional text 
> sink pad. This pad would be fed with a txt file giving the (x,y) pos for 
> each image to be overlaid.
> In fact, I'd also like to extend this to the pango textoverlay (for 
> displaying the name of the player below its thumbnail in the video, I again 
> need to specify the position where the text must be set).
> 
> Would that make sense to you, or is there any better/nicer solution? Has 
> anyone experienced that kind of problem?

There's also the textrender element which renders a text string to a
bitmap, which you could then in turn feed into videomixer.  Or you could
just put N textoverlay elements in a row after the videomixer, rendering
the texts (settable via the "text" property) at whatever position you
like.

 Cheers
  -Tim






More information about the gstreamer-devel mailing list