carrying metadata through gst-rtsp-server pipeline

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

carrying metadata through gst-rtsp-server pipeline

ramoncaldeira
Hi,

I have the following pipeline in gst-rtsp-server: appsrc ! videoconvert !
x264enc ! rtph264pay

I wish to link information related to my synthesized video frames at appsrc
with custom RTP headers on rtph264pay.

I already tried two things:

1. Use a GQueue. Was unsuccessful.
2. Use gst_buffer_add_meta. Could not retrieve metadata later.

Any ideas on how I can achieve this?

Thanks,

Ramon



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: carrying metadata through gst-rtsp-server pipeline

Mathieu Duponchelle
One way to do this is to:

* Use gst_buffer_add_meta on buffers you pass to appsrc

* Write a GstElement subclass with caps application/x-rtp -> application/x-rtp,
  and append it after the payloader. This element will be in charge of retrieving
  your buffer metas and translating them to RTP extension data, an example
  for how to set extension data is the rtponviftimestamp[1] element.

Hope that helps,

--
Mathieu Duponchelle · https://www.centricular.com


[1]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/blob/master/gst/onvif/gstrtponviftimestamp.c

On 12/10/19 10:02 PM, ramoncaldeira wrote:

> Hi,
>
> I have the following pipeline in gst-rtsp-server: appsrc ! videoconvert !
> x264enc ! rtph264pay
>
> I wish to link information related to my synthesized video frames at appsrc
> with custom RTP headers on rtph264pay.
>
> I already tried two things:
>
> 1. Use a GQueue. Was unsuccessful.
> 2. Use gst_buffer_add_meta. Could not retrieve metadata later.
>
> Any ideas on how I can achieve this?
>
> Thanks,
>
> Ramon
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: carrying metadata through gst-rtsp-server pipeline

ramoncaldeira
Hi Mathieu,

Thanks for the support.

I understood the GstElement part. I was able to configure extension data in
a similar way using a pad probe but I don't fully understand the metadata
flow.

I registered a meta api using the gst_meta_api_type_register and
gst_meta_register functions and added the metadata to the buffer originated
by appsrc element using the gst_buffer_add_meta function.

I was able to retrieve the metadata from the appsrc element itself using the
gst_buffer_get_meta function, but no data was returned when I tried to
retrieve it from a pad probe on the src pad of the rtph264pay element.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: carrying metadata through gst-rtsp-server pipeline

Mathieu Duponchelle
Ah right, you'll need to check if / how the payloader copies meta from its input buffers to
its output buffers, I don't remember the exact details however :)
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: carrying metadata through gst-rtsp-server pipeline

chakra
I was looking for a similar way to send metadata as another stream with rtsp
streams like video, audio, text.

As mentioned at
https://fossies.org/linux/gst-plugins-good/gst/rtp/README => 2793 RTP
Payload for Text Conversation.

Is there a way to encode/rtppayload text data along with video audio in
gst-rtsp-server pipeline?

Say for example rtp*pay with pay0=video, pay1=audio and pay2=text which can
send the text as parallel stream along

I could not find rtp payloaders for text or any examples to start with,
please do share how can I start with if there is any such possibility?

Thanks



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel