Putting NTP/PTP timestamps on RTP as metadata

Toon Heyrman toonheyrman at hotmail.com
Mon Jun 11 14:49:58 UTC 2018


I'm trying to put NTP/PTP timestamps on a RTP stream as metadata, just as
information for the receiver to do some things with.
The sender is a RTSP server and will be synced with a NTP or PTP server.

I found some things about this subject. 
1. Someone who edited code of the gst-plugins-bad/gst/onvif to add these
timestamps as metadata to the stream. He uses elements to add the timestamps
to the buffers. 
http://gstreamer-devel.966125.n4.nabble.com/Transmit-absolute-time-td4674058.html
<http://gstreamer-devel.966125.n4.nabble.com/Transmit-absolute-time-td4674058.html>  
2. I see in the gstreamer code something with RFC6051, in
gst-plugins-base/gst-libs/gst/rtp/gstrtphdrext.c is a function
gst_rtp_hdrext_set_ntp_64 that is adding an extension to the RTP packets
with a timestamp. 

Is it a good idea to use 2 in a 1 scenario? So putting the NTP extension on
RTP via a gstreamer element on the server side? And how will the element
know the timestamps to use? 
For the moment I get the clock in the main application, like this:
gst_ntp_cleck_new with the ntp server
gst_clock_wait_for_sync untill I get synced
gst_rtsp_media_factory_set_clock with the clock
gst_rtsp_media_factory_set_publish_clock_mode with
GST_RTSP_PUBLISH_CLOCK_MODE_AND_OFFSET

Can someone push me in the right direction?



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list