Re: [AVTCORE] Leap seconds

David Singer <singer@apple.com> Thu, 15 September 2011 16:41 UTC

Return-Path: <singer@apple.com>
X-Original-To: avt@ietfa.amsl.com
Delivered-To: avt@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 556B721F87D3 for <avt@ietfa.amsl.com>; Thu, 15 Sep 2011 09:41:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.252
X-Spam-Level:
X-Spam-Status: No, score=-106.252 tagged_above=-999 required=5 tests=[AWL=-0.254, BAYES_00=-2.599, HTML_MESSAGE=0.001, J_CHICKENPOX_44=0.6, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CH5o09XiNkCl for <avt@ietfa.amsl.com>; Thu, 15 Sep 2011 09:41:29 -0700 (PDT)
Received: from mail-out.apple.com (bramley.apple.com [17.151.62.49]) by ietfa.amsl.com (Postfix) with ESMTP id 5AFC721F8484 for <avt@ietf.org>; Thu, 15 Sep 2011 09:41:29 -0700 (PDT)
MIME-version: 1.0
Content-type: multipart/alternative; boundary="Boundary_(ID_BGN3TK+8RNYUR/hIf762hQ)"
Received: from relay16.apple.com ([17.128.113.55]) by mail-out.apple.com (Oracle Communications Messaging Exchange Server 7u4-20.01 64bit (built Nov 21 2010)) with ESMTP id <0LRK004R1P4BZO80@mail-out.apple.com> for avt@ietf.org; Thu, 15 Sep 2011 09:43:23 -0700 (PDT)
X-AuditID: 11807137-b7bddae0000031a0-ef-4e722ca5662c
Received: from singda.apple.com (singda.apple.com [17.197.32.11]) by relay16.apple.com (Apple SCV relay) with SMTP id 71.C3.12704.5AC227E4; Thu, 15 Sep 2011 09:49:41 -0700 (PDT)
From: David Singer <singer@apple.com>
In-reply-to: <CALw1_Q05fXDmTFapSaH1NRCsp2eWdemNus40gXsFwsx4HbR34Q@mail.gmail.com>
Date: Thu, 15 Sep 2011 09:43:22 -0700
Message-id: <0F41102E-7F7A-4D69-B22D-6BFC3215D6C0@apple.com>
References: <CALw1_Q0qK1WDc_KjEneOWrqr+jfVsqdwFYpF=ht-tS4SSNp8nQ@mail.gmail.com> <71C9EC0544D1F64D8B7D91EDCC6220200A2D0340@NABSREX027324.NAB.ORG> <alpine.BSF.2.00.1109141110001.25117@hsa.packetdesign.com> <CALw1_Q2L5z1bdVaENm7ky-epWjmxD326FLQ7THrObO_KMfdXfw@mail.gmail.com> <78481CCB-7A70-4BC4-91DC-A707301F22A5@apple.com> <CALw1_Q2VFe3d52ufVp2wSeNCHiwqgnhLh39dQTWYa52jWLaV+g@mail.gmail.com> <8EF3B729-407D-4A6F-9B5C-9E6833F2478B@apple.com> <CALw1_Q05fXDmTFapSaH1NRCsp2eWdemNus40gXsFwsx4HbR34Q@mail.gmail.com>
To: Kevin Gross <kevin.gross@avanw.com>
X-Mailer: Apple Mail (2.1084)
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrLLMWRmVeSWpSXmKPExsUieFSBW3epTpGfwco7UhaPdkxntnjZs5Ld 4sWqOSwWLw61szmweFy+4u3x7+p2Zo8lS34yedw4dYoxgCWKyyYlNSezLLVI3y6BK6N3xWSm glVuFUdOrGNrYPxj3cXIwSEhYCKx6Y5lFyMnkCkmceHeerYuRi4OIYHNjBINa9cwgiSEBZQl bm26xgxi8woYSizd1M4OYjMLuEnMnLyPDcRmE1CVeDDnGFg9p0CgxLfvPWBxFqD4psOroOoj JC7NO8UIMcdGYt3S98wQy/4ySyxrmw22QERAXeLRrodMEMfJSjQty5jAyDcLyepZSFZD2NoS yxa+Zp4F1MEsoCMxeSEjqjCE/fH8EaYFjGyrGAWLUnMSKw3N9BILCnJS9ZLzczcxggK5odB8 B+P2v3KHGAU4GJV4eANkivyEWBPLiitzDzFKcDArifAqSQKFeFMSK6tSi/Lji0pzUosPMUpz sCiJ8xr8KfQTEkhPLEnNTk0tSC2CyTJxcEo1MEY8Z96S3vCjZnqmH29BqMTZPB2d8K2Ks30E BJxP3lvm+aSsXbdU3uv8/664Y8Gs07feSjWX8Dsx16Tyu1RmW1xi4bPK4yY8c0Md277uSuqf rex+zJMlVeGChfO+qHS/e413I1wmqMftseyp2nSiT23Lkxt9U24Un/738VaL706Gh//8vWdv UWIpzkg01GIuKk4EAEaQu6NgAgAA
Cc: Stephen Casner <casner@acm.org>, "Allison, Art" <AAllison@nab.org>, avt@ietf.org
Subject: Re: [AVTCORE] Leap seconds
X-BeenThere: avt@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Audio/Video Transport Core Maintenance <avt.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/avt>, <mailto:avt-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/avt>
List-Post: <mailto:avt@ietf.org>
List-Help: <mailto:avt-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/avt>, <mailto:avt-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 15 Sep 2011 16:41:30 -0000

On Sep 14, 2011, at 17:47 , Kevin Gross wrote:

> As is hinted there, UTC as a timebase can be made to work but it is tricky and deserves to be documented. Senders and receivers especially need to be aware of leap seconds when mapping wallclock to the media clock. This requires a level of integration between the NTP agent and the media player.
> 
> Receivers that are unaware of leap seconds will slew a second ahead of others when there's a leap second while streams are running. This is is likely to result in ongoing buffer underruns at the receiver until the stream is restarted.

Only if they calculate the NTP 'seconds since' by calculating from a calendar date and time. The number of seconds-since doesn't change (the length of a second is fairly precisely defined).  "X seconds since the zero-time" is precise; calculating that from "13:45:23 on september 10th 2011" means you have to know not only the length of a day in seconds, but what leap second adjustments to make.

> Alternatively applications can agree (through SDP?) to use a TAI timebase (e.g. IEEE 1588) and avoid the complexity and potential implementation errors leap seconds introduce.
> 
> This all only applies to receivers that use NTP to determine playout time.

, and that map between calendar date+time and seconds counts.

> Most RTP receivers now use local data arrival time to determine playout time.

Yes, true; receive data, de-jitter, play (taking into account re-ordering issues).

> The IDMS proposal (https://datatracker.ietf.org/doc/draft-brandenburg-avt-rtcp-for-idms/) relies on NTP timestamps. It would seem to be necessary to address the leap second issue as part of the IDMS project.

Only if calendar date+time mapping comes into play, I think.

> 
> Kevin
> 
> On Wed, Sep 14, 2011 at 4:18 PM, David Singer <singer@apple.com> wrote:
> OK, I am not an expert, but 1305 does say:
> 
> The insertion of leap seconds in UTC and subsequently
> into NTP does not affect the UTC or NTP oscillator, only the conversion
> to conventional civil UTC time.
> 
> 
> On Sep 14, 2011, at 12:54 , Kevin Gross wrote:
> 
>> RFC 5905 indicates that the 64-bit NTP timestamps used by the NTP protocol are a bit more complex than that. Specifically, these NTP timestamps have discontinuities around leap seconds. RFC 3550 does not spell it out exactly but I assume the 64-bit NTP timestamp in the RTCP sender report sould behave according to the definition in RFC 5905.
>> 
>> Kevin
> 

David Singer
Multimedia and Software Standards, Apple Inc.