Reputation: 41
Im running the command such as following and this command broadcasts the video to ethernet port. But here is my question that how I can add overlay onto video where overlay values are stored in shared memory and may change any time.
gst-launch-1.0 -v videotestsrc ! video/xraw,format=NV16, width=1920, height=1080, framerate=30/1 ! omxh264enc ! queue ! rtph264pay config-interval=10 ! udpsink host=192.168.1.5 port=5004
Should I run another thread to do it?
Upvotes: 1
Views: 1577
Reputation: 77
You said you're trying to do this from c or c++ code, you can do this using textoverlay plugin, for example, you name your textoverlay element "textsrc", then when you need to change the text value:
GstElement *textsrc; textsrc = gst_bin_get_by_name_recurse_up(GST_BIN(element), "textsrc");
Then using g_object_set
you can change the value for different parameters that correspond to what you want, text
for text you want shown, more about the different parameters can be found in the documentation.
Upvotes: 0
Reputation: 2761
It looks like the compositor or videomixer plugin is what you are looking for. I've never used them myself so I can't be much help, but there's a nearly complete list of plugins here.
Upvotes: 1