AnsweredAssumed Answered

How to get the NTP timestamp delays for the same frame(Trx - Ttx)?

Question asked by imx learner on Nov 20, 2018
Latest reply on Dec 6, 2018 by Joan Xie



I am transmitting a live video from iMX6 to an Ubuntu PC using GStreamer. I used RTP over UDP for video streaming. 

I can access the RTP timestamps of each individual frame, at the receiver side now. If I can map this frame RTP timestamp to a NTP timestamp, and get the current NTP timestamp at Rx, the difference will give me the delay in receiving the frame and its transmission. 


Can anyone give me pointers on how to convert these RTP timestamps to NTP timestamps for the video frames? Also how can I get the NTP timestamp at the receiver, so that I can compare? 


Below are my pipelines: 


Tx (iMX6): 

     imxv4l2videosrc fps-n=30 ! imxvpuenc_h264 ! h264parse ! rtph264pay ! rtpbin.send_rtp_sink_0     rtpbin.send_rtp_src_0 ! udpsink host=xxx.xx.xx.xx port=2000 ! rtpbin.send_rtcp_src_0 ! udpsink port= 2001 ! udpsrc     port=2003 ! rtpbin.recv_rtcp_sink_0 


Rx (Ubuntu):

    udpsrc port=2000 ! $ CAPS(application/x-rtp) ! rtpbin.recv_rtp_sink_0 rtpbin. ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink ! udpsrc port=2001 ! rtpbin.recv_rtcp_src_0 ! rtpbin.send_rtcp_src_0 ! udpsink port=2003 




Note: I can access RTP timestamps of each frame at Rx side. I can also access the SR/RR reports with RTCP packets.