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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

2,247 Views
imx_learner
Contributor I

Hello,

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. 

Labels (1)
0 Kudos
Reply
1 Reply

1,928 Views
joanxie
NXP TechSupport
NXP TechSupport

pls refer to the topic as below:
H.264 RTSP Absolute TIMESTAMP - Stack Overflow 

for RTP timstamp and NTP timestamp, pls refer to the document as link mentioned:

tools.ietf.org/html/rfc3550#section-6.4.1 and tools.ietf.org/html/rfc3550#section-4

0 Kudos
Reply