1

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?

5
  • You are talking about doing this from code and not the command line, right? Commented Sep 10, 2021 at 13:37
  • Yes from a C or C++ code @Mike Commented Sep 13, 2021 at 4:56
  • I did this via a GTKOverlay at the receiving end and then drew on top of the video stream. If you wanted the result to definitely go over the network, I suppose you could (somehow) capture the output and transmit that. Would this be any use to you? It might take some time to extract the minimum code from my project. Commented Sep 18, 2021 at 21:30
  • Thanks @Mike, Im getting video data from framebuffer on FPGA using only command above. So, how I manipulate it using GTKOverlay? Actually is it possible? Commented Sep 20, 2021 at 8:26
  • I think I see what you're needing. If it's text then there's a textoverlay plugin but I've put some info in my answer. Hopefully that will help. Commented Sep 21, 2021 at 5:22

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.