TextOverlay with Playbin2

Tim Müller tim at centricular.com
Sat Nov 7 03:43:45 PST 2015


On Fri, 2015-11-06 at 01:15 -0800, modelvincent wrote:

Hi,

> I'm searching to display some text over a playbin2 but I haven't
> found how
> to do this.
> 
> I'm not searching for subtitles but for an overlayed text (it is more
> or
> less the same think but I would like to pass my text as an argument
> and not
> as a file like for subtitle) but I haven't found anything.
> 
> 
> Does someone have some suggestions to do that or even better a code
> example?

Something like this might work:

gst-launch-0.10 playbin2 uri=.. \
 video-sink='textoverlay font-desc=Sans,36 text=Hello ! autovideosink'

(if your 0.10 version is not the latest 0.10 version this might not
work in gst-launch, but it will work if you write some code and create
a bin with gst_parse_bin_from_description() and then set that as video
sink on playbin2.)

(+ insert obligatory disclaimer that 0.10 is ancient and no longer
maintained and you should really use 1.x)

Cheers
 -Tim

> -- 
Tim Müller, Centricular Ltd - http://www.centricular.com




More information about the gstreamer-devel mailing list