How to add text on gstreamer except textoverlay ?

Nicolas Dufresne nicolas at ndufresne.ca
Wed Sep 9 17:24:17 UTC 2020


Le mardi 08 septembre 2020 à 23:46 -0500, ToanVnET a écrit :
> Hi,
> I'm using textoverlay to add dynamic text in GStreamer. But the problem is
> it takes quite lot of CPU usage. 
> Assume that, I only record video --> CPU usage about 3-5 %. But when I add
> textoverlay, It can reached up to 20% at peak.

If you only display the text, you can use a capable videosink to get
the overlay rendering offloaded to the sink. glimagesink, gtkglsink,
qmlglsink do supports this. You also get higher quality text, since the
render will be done according to your display size.

> 
> This is how I add dynamic text: 
> First, I create a timeout_callback function. In there, I use g_object_set to
> set textoverlay content.  Then I use g_timeout_add_seconds_full function to
> create an event each 1 sec and call timeout_callback function. 
> 
> So, it there any way to add dynamic text in GStreamer without using
> textoverlay ? Or, there is a problem with the way I do dynamic text ?
> 
> Please help me !
> 
> 
> 
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list