Re: [AVT] RTP/RTCP Timestamp and transmission time

Magnus Westerlund <magnus.westerlund@ericsson.com> Thu, 18 September 2003 10:46 UTC

Received: from optimus.ietf.org (ietf.org [132.151.1.19] (may be forged)) by ietf.org (8.9.1a/8.9.1a) with ESMTP id GAA06234 for <avt-archive@odin.ietf.org>; Thu, 18 Sep 2003 06:46:31 -0400 (EDT)
Received: from localhost.localdomain ([127.0.0.1] helo=www1.ietf.org) by optimus.ietf.org with esmtp (Exim 4.20) id 19zwIc-0008QF-3m for avt-archive@odin.ietf.org; Thu, 18 Sep 2003 06:46:10 -0400
Received: (from exim@localhost) by www1.ietf.org (8.12.8/8.12.8/Submit) id h8IAkAnE032369 for avt-archive@odin.ietf.org; Thu, 18 Sep 2003 06:46:10 -0400
Received: from localhost.localdomain ([127.0.0.1] helo=www1.ietf.org) by optimus.ietf.org with esmtp (Exim 4.20) id 19zwIV-0008PX-WF; Thu, 18 Sep 2003 06:46:04 -0400
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org) by optimus.ietf.org with esmtp (Exim 4.20) id 19zwHu-0008NZ-Sx for avt@optimus.ietf.org; Thu, 18 Sep 2003 06:45:26 -0400
Received: from ietf-mx (ietf-mx.ietf.org [132.151.6.1]) by ietf.org (8.9.1a/8.9.1a) with ESMTP id GAA06162 for <avt@ietf.org>; Thu, 18 Sep 2003 06:45:17 -0400 (EDT)
Received: from ietf-mx ([132.151.6.1]) by ietf-mx with esmtp (Exim 4.12) id 19zwHq-00041n-00 for avt@ietf.org; Thu, 18 Sep 2003 06:45:22 -0400
Received: from albatross-ext.wise.edt.ericsson.se ([193.180.251.49]) by ietf-mx with esmtp (Exim 4.12) id 19zwHq-00041k-00 for avt@ietf.org; Thu, 18 Sep 2003 06:45:22 -0400
Received: from esealnt611.al.sw.ericsson.se ([153.88.254.121]) by albatross-ext.wise.edt.ericsson.se (8.12.9/8.12.9/WIREfire-1.7) with ESMTP id h8IAjMAv016747; Thu, 18 Sep 2003 12:45:22 +0200 (MEST)
Received: from ericsson.com (research-nnng7k.ki.sw.ericsson.se [147.214.34.132]) by esealnt611.al.sw.ericsson.se with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2655.55) id SZF0PVJZ; Thu, 18 Sep 2003 12:45:37 +0200
Message-ID: <3F698CBF.9000205@ericsson.com>
Date: Thu, 18 Sep 2003 12:45:19 +0200
X-Sybari-Space: 00000000 00000000 00000000 00000000
From: Magnus Westerlund <magnus.westerlund@ericsson.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Lorenzo Polidori <lorenzo@blt.it>
CC: avt@ietf.org
Subject: Re: [AVT] RTP/RTCP Timestamp and transmission time
References: <3F4F1DDF0072671F@vsmtp3.tin.it> (added by postmaster@virgilio.it)
In-Reply-To: <3F4F1DDF0072671F@vsmtp3.tin.it> (added by postmaster@virgilio.it)
Content-Type: text/plain; charset="us-ascii"; format="flowed"
Content-Transfer-Encoding: 7bit
Content-Transfer-Encoding: 7bit
Sender: avt-admin@ietf.org
Errors-To: avt-admin@ietf.org
X-BeenThere: avt@ietf.org
X-Mailman-Version: 2.0.12
Precedence: bulk
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/avt>, <mailto:avt-request@ietf.org?subject=unsubscribe>
List-Id: Audio/Video Transport Working Group <avt.ietf.org>
List-Post: <mailto:avt@ietf.org>
List-Help: <mailto:avt-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/avt>, <mailto:avt-request@ietf.org?subject=subscribe>
Content-Transfer-Encoding: 7bit

Hi Lorenzo,

See comments below.

Lorenzo Polidori wrote:

> Colin Perkins wrote:
> 
> 
>>The RTP timestamp is NOT calculated from the NTP timestamp, but 
>>represents a sampling of the media clock. 
> 
> 
> Ok, thank you. But can you explain the exact meaning of the following
> fragment of RFC 3550, section 6.4.1:
> "Note that in most cases this timestamp [RTP timestamp of an SR-RTCP packet]
> will not be equal to the RTP timestamp in any adjacent data packet. Rather,
> it MUST be calculated from the corresponding NTP timestamp using the
> relationship between the RTP timestamp counter and real time as maintained
> by periodically checking the wallclock time at a sampling instant".
> 
> Now, I have an MPEG2 Elementary Stream (ES), stored on disk, to be
> transmitted over RTP. From Elementary Stream I can get and convert MPEG time
> code & temporal reference to a 90 kHz RTP timestamp, as in RFC 2250. So, I
> put this RTP timestamp in RTP data packet header: this timestamp is computed
> from the MPEG2 time code stored on disk, so it isn't correlated to the
> system wallclock current time. If I get RTP timestamp of SR-RTCP packet
> sampling the wallclock current time, what's the correlation between RTP
> timestamp on RTP data packet and RTP timestamp on RTCP packet?
> 

But what you do is that when you start the RTP session you sample the 
wall clock time and create an random TS for that instant. This TS and 
wall clock mapping is then set in the RTP stack to be used to calculate 
RTCP SR packets. When you start transmitting the first RTP packet you 
determine the correct TS offset at the beginning. From that point you 
can put the initial TS offset to the calculated TS from the MPEG streams 
start point.

Wall clock: 0---------10--------20--------30
TS        : x---y
+MPEG TS  :     0----------90000------1800000
=send TS  :

where X is the initial random TS. Y is the point of starting 
transmission. Y = X+ wallclock_since_start* TS_rate.

That way the timestamp in the RTCP will be synchronized with the media 
TS. For multiple different streams one must simple ensure that all TS 
are mapped in synch to the wall clock time.

cheers


Magnus Westerlund

Multimedia Technologies, Ericsson Research EAB/TVA/A
----------------------------------------------------------------------
Ericsson AB                | Phone +46 8 4048287
Torshamsgatan 23           | Fax   +46 8 7575550
S-164 80 Stockholm, Sweden | mailto: magnus.westerlund@ericsson.com


_______________________________________________
Audio/Video Transport Working Group
avt@ietf.org
https://www1.ietf.org/mailman/listinfo/avt