From: gael n. <gn...@ho...> - 2007-08-29 20:01:16
|
>From: Tim Müller <t....@ze...> >To: gst...@li... >Subject: Re: [gst-devel] dynamic overlaying of images on video >Date: Wed, 29 Aug 2007 13:47:39 +0100 > >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. > Yes, I've seen that in the code source of videomixer. But these properties are not seen as the plugin ones (using gst-inspect for example), these are pads properties. From my application code, how should I access to them? Pads are generated with random names when I link a new 'image pipeline' to it, so unless I access the GList of sinks and try to use g_object_set() on parsed list elements, I don't get right how to set these properties... > > > 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. Yes, I would try that, as soon as I can figure out the solution of the x/y pos properties. I have another question relative to the text renderer. If I launch "gst-launch filesrc location=sampletext.txt ! textrender ! videomixer name=mix ! directdrawsink videotestsrc ! mix.", with the text file containing a single text line, this text is displayed on the video only for a few secs, then disappears. Is there a way to have it displayed continuously? Thanks again, Regards, Gael _________________________________________________________________ Windows Live Spaces : créez votre blog à votre image ! http://www.windowslive.fr/spaces |