Dynamic text on video frame

Nicolas Dufresne nicolas at ndufresne.ca
Wed Jul 15 15:34:41 UTC 2020


Le mercredi 15 juillet 2020 à 06:33 -0500, eyalhir74 a écrit :
> Hi,
>   I've looked a lot for a C++ example of how to do this, but couldn't find
> any.
>   I have a v4l2src element and would like to display the frame ID on each
> frame coming out of the camera.
>   I later on save the frames using a tee to display and record.
>   How can I do this?

You can build an app with the following pipeline:

  v4l2src ! tee name=t
     t. ! queue ! textoverlay name=overlay ! glimagesink
     t. ! queue ! ....

Then in your app, you'd add a pad probe before text overlay, and update
the "text" property on textoverlay for each frames that pass by. I will
let you define what a "frame ID" is as it is not a GStreamer concept.
You can embed glimagesink into your application using GstVideoOverlay
interface. The overlayed text will be composed in GL with glimagesink,
so this is suitable for high resolution too.


> 
> thanks
> Eyal
> 
> 
> 
> --
> 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