From 0ca64262fef6c0ea968730c4c5fd899f1c222ef2 Mon Sep 17 00:00:00 2001 From: Harald Alvestrand Date: Wed, 2 Oct 2024 23:22:45 +0200 Subject: [PATCH] Separate concerns on offset calculation --- draft-alvestrand-avtcore-abs-capture-time.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/draft-alvestrand-avtcore-abs-capture-time.md b/draft-alvestrand-avtcore-abs-capture-time.md index 2e2e8bd..5888344 100644 --- a/draft-alvestrand-avtcore-abs-capture-time.md +++ b/draft-alvestrand-avtcore-abs-capture-time.md @@ -174,9 +174,8 @@ the clock used for the capture timestamp and the clock used for RTP Sender Repor An intermediate system MAY compute the outgoing capture clock offset as follows: - Start with the "estimated capture clock offset" from the incoming packet -- Add half the estimated round trip time between the sender and the intermediate system -- Add the time between the arrival of the packet and the queueing of the packet for transmission -- Add the estimated time that will be spent before the packet will be sent +- Add the estimated offset between the sender's NTP clock and the intermediate's NTP clock +(see [](#offset)) This should give a reasonable estimate of the offset between the capture system's clock and the NTP timestamps sent in SR blocks by the intermediate system. @@ -198,6 +197,17 @@ it belongs to the capture system. If the CSRC list is empty, then the receiver MUST treat the SSRC as if it belongs to the capture system. Mixers SHOULD put the most prominent CSRC as the first CSRC in a packet's CSRC list. +#### Estimating the NTP clock offset {#offset} + +The NTP clock offset can be calculated from an SR packet in the following way: + +- Take the arrival time of an SR packet, in the receiver's NTP clock +- Subtract the NTP timestamp from the SR packet +- Add half the estimated RTT between the sender and the receiver + +The resulting number should be a reasonable approximation of the offset between the +two clocks. + #### Timestamp interpolation