[gst-devel] textoverlay and dynamic text - to subtitle or not and if so how?
Olivier Aubert
olivier.aubert at liris.cnrs.fr
Tue Nov 9 15:53:44 CET 2010
Hello
I am doing this in the Advene application (http://www.advene.org/). To
achieve the behaviour you describe, the application constantly (every
100ms, through gobject.timeout_add) monitors the player time, and
displays data accordingly by setting the text property of the
textoverlay element.
This kind of active polling is not cpu-efficient, but works quite
alright in my context.
Regards,
Olivier Aubert
On Tue, 2010-11-09 at 06:45 -0800, HaroldJRoth wrote:
> Can textoverlay be used to apply dynamically generated text to a frame?
>
> Background:
>
> I noticed that textoverlay allows manual setting of the "text" property.
> Alternatively, the 'subparse' element can be used feed the 'text_sink' pad.
> Presumably 'subparse' merely decodes "appplication/x-subtitle" and other
> MIME formats
>
> My problem is to run an event handler that cross references the TIMESTAMP to
> CCTV-specific text.
>
> Design alternatives:
>
> The static text could be set by an event handler able to do the lookup. The
> event would have to be triggered whenever overlay received a new time stamp.
> Unfortunately, such an event is not exposed.
>
> Alternatively, I could use a 'subparse'. To do that I guess I would have to
> create an appsrc that generated "application/x-subtitle" output. However, I
> can't seem to find a specification for the encoding of text that I need to
> feed to the subparse. Maybe reading the subparse source code will tell me
> enough, but an RFC or other spec should would be handy.
>
> Finally, I could try to feed the 'text_sink' pad of the textoverlay.
> However, I'd need to understand the format of the input the pad expects.
> Presumably I have to cross reference text with a TIMESTAMP.
>
> Since its a really useful feature to custom apps, I'm wondering if anyone
> has any suggestions. As before, I'll try to find a way to post the ultimate
> solution under with some useful keywords.
More information about the gstreamer-devel
mailing list