scrolling text suggestions

Holger Kaelberer hk at elberer.de
Mon Dec 2 00:55:37 PST 2013


Hi

On 12/02/2013 09:21 AM, buzzy wrote:
> Hello,
> 
> I need some scrolling text on my stream (like on the news). I've tried many
> ways to implement it, but it seems I cant find anything efficient enough.
> Right now this is my best solution:

In general, highly dynamic or interactive video overlays (as in your case) are probably best solved
by decoupling the overlay rendering from the video pipeline, e.g.  by embedding your videosink into
a clutter stage. Have a look at what snappy (or totem) does.

This would allow you to render your overlay elements completely independently of the video.

> 
> ... ! textoverlay shaded-background=true wrap-mode=-1 text=\"test
> ksaljdhkjshfkjsd\" ! videobox name=\"border\" border-alpha=0 top=0 left=0 !
> ...
> 
> with this method I change videobox property "left" every 50 miliseconds.

In in this case you might run into timing problems because the frequency textoverlay can render its
text is bound to the framerate of the video.

If you don't have performance problems due to blending of the overlay-data in CPU you could also try
to use cairooverlay. It allows you to hook on a signal that is fired for every frame and provide
overlay data via cairo. With this approach you automatically synchronize with the video framerate
when doing in-pipeline overlay processing.

Holger


More information about the gstreamer-devel mailing list