Re: [Cellar] Rationale Numbers for timestamps

Jerome Martinez <jerome@mediaarea.net> Wed, 27 July 2016 04:14 UTC

Return-Path: <jerome@mediaarea.net>
X-Original-To: cellar@ietfa.amsl.com
Delivered-To: cellar@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9560E12D504 for <cellar@ietfa.amsl.com>; Tue, 26 Jul 2016 21:14:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.621
X-Spam-Level:
X-Spam-Status: No, score=-2.621 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hy7TOOcFVMBP for <cellar@ietfa.amsl.com>; Tue, 26 Jul 2016 21:14:06 -0700 (PDT)
Received: from 9.mo69.mail-out.ovh.net (9.mo69.mail-out.ovh.net [46.105.56.78]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EACFD12B01D for <cellar@ietf.org>; Tue, 26 Jul 2016 21:14:05 -0700 (PDT)
Received: from player789.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo69.mail-out.ovh.net (Postfix) with ESMTP id EDCEEFFA30D for <cellar@ietf.org>; Wed, 27 Jul 2016 06:14:03 +0200 (CEST)
Received: from [192.168.11.23] (i125-201-111-186.s41.a026.ap.plala.or.jp [125.201.111.186]) (Authenticated sender: zen@mediaarea.net) by player789.ha.ovh.net (Postfix) with ESMTPSA id 589D3260070 for <cellar@ietf.org>; Wed, 27 Jul 2016 06:14:01 +0200 (CEST)
To: cellar@ietf.org
References: <CAOXsMFKNXNcvRzsYkQw23dz=5e6A4TGbq=rO=3KW8rokLUOeEQ@mail.gmail.com>
From: Jerome Martinez <jerome@mediaarea.net>
Message-ID: <3363d485-83af-d46b-3bca-3b0359ca9bb2@mediaarea.net>
Date: Wed, 27 Jul 2016 13:13:58 +0900
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0
MIME-Version: 1.0
In-Reply-To: <CAOXsMFKNXNcvRzsYkQw23dz=5e6A4TGbq=rO=3KW8rokLUOeEQ@mail.gmail.com>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Ovh-Tracer-Id: 3822148712494796945
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeeltddrieeggdejfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecu
Archived-At: <https://mailarchive.ietf.org/arch/msg/cellar/Dp_DKUV2vZbjsbBSfw6BZKKaGcE>
Subject: Re: [Cellar] Rationale Numbers for timestamps
X-BeenThere: cellar@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Codec Encoding for LossLess Archiving and Realtime transmission <cellar.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cellar>, <mailto:cellar-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cellar/>
List-Post: <mailto:cellar@ietf.org>
List-Help: <mailto:cellar-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cellar>, <mailto:cellar-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 27 Jul 2016 04:14:08 -0000

On 27/07/2016 04:35, Steve Lhomme wrote:
> As the topic often resurfaces maybe it's time we discuss it in the
> context of CELLAR.
>
> There have been talks about ways to do it in the Matroska mailing
> before in this thread:
> https://lists.matroska.org/pipermail/matroska-devel/2012-October/004294.html
> https://lists.matroska.org/pipermail/matroska-devel/2012-October/004295.html
> https://lists.matroska.org/pipermail/matroska-devel/2012-October/004296.html
> https://lists.matroska.org/pipermail/matroska-devel/2012-October/004299.html
>
> An element to handle it was added (still in specdata.xml but commented)
> https://lists.matroska.org/pipermail/matroska-devel/2012-September/004289.html
> and later removed
> https://lists.matroska.org/pipermail/matroska-devel/2012-December/004317.html
>
> So far there was nothing conclusive but it seems it's not possible to
> do it properly in a backward compatible way.
>
> The constraints are simple:
> - backward compatible, so the 16 bits timestamp value in the
> (Simple)Block must remain unchanged. This value is multiplied by the
> scale (global and/or per track) to get the actual timestamp.
> - There could be some acceptable rounding between the two coexisting systems.
> - The rounding should happen in the current system, the rationale
> should always be exact (provided the source is exact)
> - A lot of Matroska elements are based on the timestamp scales. So
> they may be adjusted accordingly
> - We must minimize the elements where the same information is found
> twice. Basically only scale elements should be added. Maybe some
> elements for the Cluster timestamp might be added as well if
> necessary.
> - because of the 16 bits range per Cluster differences between a
> rationale system and the ns system must be tight.
> - we still want Clusters to be 4-5s long to minimize the scope of
> errors and buffering before playback. It may also correspond to some
> GOP values.
> - sample accuracy for audio would be good.
>
> Let the math begin.

Rationale Numbers for timestamps are usually for US style fixed 
framerate, so I think my answer in a previous email still applies.
https://mailarchive.ietf.org/arch/msg/cellar/WQCExNvAZy4goibE3_chnFB1w0c
Please comment about which need would not be fulfilled with this proposal.

Copy/paste:

I don't like the idea to have an incompatible change with such feature,
because this is not a "must have" for 99% of people, and Matroska "v5"
will not be adopted with that.
I think that we can have a workaround for having additional 0.99% happy
without the need of a break in compatibility:
- lot of people want to know the exact frame rate of a fixed frame rate
stream, people muxing from tapes know that the frame rate is fixed
(hardware limitation) so can set this element in the header. putting
frame rate info in the header with numerator and denominator is enough
for doing the difference between 30000/1001 and 29970/1000, and the
current millisecond timestamp is enough (a demuxer aware of the
framerate element can "correct" the timecode from e.g. 0.033s to
1001/30000 second; an old player just play the file with 1 ms
precision). We could add some rules in case a timecode does not fit the
frame rate (e.g. if timecode is 0.031, frame rate info is considered not
applicable)
- people having variable frame rate with very precise timestamp need to
know it before starting the muxing and can use a Timecodescale element
of 1 (so precision of 1 nanosecond, usually enough when there is no
fixed frame rate).
Which real life scenario can not deal with such workaround?


Compared to the concerns in:
https://lists.matroska.org/pipermail/matroska-devel/2012-October/004294.html
It is per track so it resolves most concern
For PCM, the corresponding video framerate is sometimes used and it 
would not be resolved correctly, right (i.e. at 30000/1001 fps, there 
are sometimes 1601 samples and sometimes 1602 samples and it is not 
possible to do the difference with the 16-bit timestamp having the 
millisecond precision)
Note that my proposal is similar to the one in the mail having criticism 
about TimecodeScaleDenominator (proposal of TrackTimeBaseNumerator and 
TrackTimeBaseDenominator)

If there is some issues with this idea, please say it so I stop to bug 
you with this idea.