Encapsulating text in RTP stream

tom tomschuring at gmail.com
Tue Jul 12 01:57:31 UTC 2022


I agree with Reuven, SEI meta data in the h264 or h265 stream is well worth
your concideration.

Not sure if it is an option seeing you are on a scientific project, but we
have gone that way and are using a comercial plugin from RidgeRun (
https://developer.ridgerun.com/wiki/index.php/GstSEIMetadata/Examples/Using_gst-launch
) that handles all the SEI specific implementation.

Just add an SeiInject element in the stream when it is in h264 format and
then you can either insert the string as meta data on a data probe just
before the seiinject like:


SeiMetadata smetadata;

smetadata.data = (void *)meta->jsonstring;
smetadata.size = strlen(meta->jsonstring);

GstSeiMeta *retmeta = gst_buffer_add_sei_meta(*outbuf, &smetadata);


or there is metadata-binary property on seeinject as well where you can set
the data (string)


This also makes sure that the meta data is linked to the exact frame that
is being handled by the seiinject and if you save the mp4 in h264 or h265
format , then it is persisted as well. If you add your text to the rtsp
stream it will be gone once comsumed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220712/693437b4/attachment.htm>


More information about the gstreamer-devel mailing list