How create metadata stream like network camera

I want to create rtsp server sent analytic meta data with video and I use gstRtspServer with this pipeline

gst_rtsp_media_factory_set_launch(factory, "( "
    "appsrc name=video_src ! videoconvert ! video/x-raw,format=I420 ! x264enc ! rtph264pay name=pay0 pt=96 "
    "appsrc name=txt_src ! rtpgstpay name=pay1 pt=98 "

in client when get stream it shows text stream media type “application” i want to show it as meta data. when i get stream from ip camera that use live555 for stream , metadata stream media type is “metadata”.

you can download dot file of rtsp client and ip camera pipeline from bellow link
ip camera pipeline
rtsp client pipeline
you can view dot file in Graphviz Online

camera pipeline:


rtsp client pipeline:


is there any plugin in gstreamer to send meta data with this form ?

You’ll have to implement a payloader for your specific metadata format and its corresponding RTP mapping.

Right now you’re using rtpgstpay, which uses a custom GStreamer-specific RTP mapping that can contain every kind of format but is not supported outside of GStreamer client applications.

1 Like

Excuse me but I’m new in gstreamer. I found a plugin in gst-plugins-bad named gstrtponvifmetapay but can not find that with gst-inspect. I’m using gstreamer in windows.

and this is a code sample to use this plugin someExampleForMetadataPluginUse.cpp · GitHub

If I use this plugin, other devices can see stream as a standard onvif metadata stream?

That plugin is not actually part of the GStreamer repository and what you found there is some other branch.

For ONVIF there’s rtponvifmetadatapay (from gst-plugins-rs), but that uses the ONVIF metadata RTP mapping. That uses VND.ONVIF.METADATA as encoding-name. Yours is just using METADATA, so no idea what that actually is.

1 Like

What we’ve been doing on our side is to use GstAnalyticMeta (1.24+) to store the results of our analytic onto GstBuffers. Then we had to implement a converter from/to ONVIF Metadata (WIP From there, we’ve been able to convert and payload easily, and been able to reused the generic elements form the ONNX plugin. There is more new up-coming GStreamer feature used, but you can find this demo here if that is of anyone interest (careful, demo code).

1 Like