Retrieving RTP timestamps for One-Way-Delay calculations

Sebastian Dröge sebastian at
Tue May 10 09:58:39 UTC 2022

On Mon, 2022-05-09 at 11:02 +0200, Tilak Varisetty via gstreamer-devel
> I would like to retrieve the RTP sender timestamp and compare it with
> the receiver timestamp to estimate the One-Way-Delay of the RTP
> packets. 
> [...]

There are many different ways to achieve this with RTP but it depends
on your actual setup which one can be used. Do you have control over
sender/receiver? Is it plain RTP or is there also RTCP involved? Do you
have a network clock that can be shared between sender and receiver? Do
you have an out-of-band mechanism like SDP for distributing the sender
stream configuration?

I recently wrote about some of the aspects of this whole situation and
some ways to implement it:

Also note that RTP packet timestamps on their own are useless for your
purpose. They start at an arbitrary offset that is not even necessarily
the same for different streams of the same session, and with a clock-
rate of 90000 (as is usually used for video) they will wrap around
every 13 hours.

And if the purpose is just measuring the RTT then this is something
that is measured as part of the normal RTCP SR/RR handling.

Sebastian Dröge, Centricular Ltd ·

More information about the gstreamer-devel mailing list