Re: [Cellar] On the multiplicity of Info elements

"Sebastian G. <bastik>" <bastik.public.mailinglist@gmx.de> Mon, 04 January 2016 18:59 UTC

Return-Path: <bastik.public.mailinglist@gmx.de>
X-Original-To: cellar@ietfa.amsl.com
Delivered-To: cellar@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 40F0E1A3BA3 for <cellar@ietfa.amsl.com>; Mon, 4 Jan 2016 10:59:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.1
X-Spam-Level:
X-Spam-Status: No, score=0.1 tagged_above=-999 required=5 tests=[BAYES_50=0.8, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham
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 lZeDUVy1TKSZ for <cellar@ietfa.amsl.com>; Mon, 4 Jan 2016 10:59:30 -0800 (PST)
Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 178B11A1B76 for <cellar@ietf.org>; Mon, 4 Jan 2016 10:59:29 -0800 (PST)
Received: from [192.168.2.129] ([188.100.175.162]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0M5cMq-1a0aTX33Bw-00xbPJ for <cellar@ietf.org>; Mon, 04 Jan 2016 19:59:27 +0100
To: cellar@ietf.org
References: <CAHUoETLC4dQQ7=TOuTXZ3aDjKCCJgz2s-8Gb33MoSAP3hgRQiQ@mail.gmail.com> <BEA72D66-EA3D-4CF0-987D-836E95287F39@dericed.com> <20151230091811.GA19636@bunkus.org> <CAOXsMFLCbe-W=h+tQpdRa8Nh0jz=xdbZTXEmoXsgQTbA=4OPCQ@mail.gmail.com> <C0E5EBA2-2A56-46F9-A049-629EFB11F280@dericed.com> <CAOXsMF+gc0d2LEisfHm0jnjDGQKcYquEMBt7FnZ_uuSNF=C0iw@mail.gmail.com>
From: "Sebastian G. <bastik>" <bastik.public.mailinglist@gmx.de>
Openpgp: id=BFE90DE515B6F548CDE298939902921C2B944DAE
X-Enigmail-Draft-Status: N1110
Message-ID: <568AC10F.9030303@gmx.de>
Date: Mon, 04 Jan 2016 19:59:27 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0
MIME-Version: 1.0
In-Reply-To: <CAOXsMF+gc0d2LEisfHm0jnjDGQKcYquEMBt7FnZ_uuSNF=C0iw@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
X-Provags-ID: V03:K0:hfQVva8ifB9+cqzc623Stbjqm0A6DhzFiH5yzuSoCCSpWAfGhNe QwH+VZ9/3fVrqcpM7M8vW7c3zrBP23RT0OMtIXwaSGEp805VxnfQk8p18RJbjiUJClf4Hx+ 0M3ksJmARDMLyaZJpiJVK6EEm7ZAZk88rg1m6c+hZNWVDqN/zO9oSbNTjR2IucsEaOpBlKI id23LidOsHGODHpaY/JRQ==
X-UI-Out-Filterresults: notjunk:1;V01:K0:g/+RI/MwIy4=:Wz5JooX4oi8+hnpQoFl2e6 w1OTywC8J5a+Hdn+PF6Ymvh41DXRgSfrjEnY9K/HXhk5BxPgoH/mY77euj89nz+TGMs7o3asG KS35Q0/IsLTcUnUXc6qAbaHNZSl5rXQh9KGuTSNDwrhd375Qrem/Y/0YjwXgIlGEpcc5pqZ6i ZL3wYhO2CsX5RzgLqDggm919C/QLwJevuqx06fAAem0/1xph3XCSjlivIVSQsj1URP8qBNUuV ItcwWWbfaS4JrUtA8d7r9ZJfYhvw08qDxKN4o1Sl4TAWjrStPqGla6wTEy8wvoI8Rgp/D08C9 BW61i4caAe4nVpbJWjPzI/ersSX/DYnK+gSfywOMKzz4h3CtfLX0uAIAaciMVHy8UWh/fXR4O M37+RuozXAAzefoL+3HweAj6ESDJhlWTasRtsSinTgyk74mp7qcBSSM/ngjc3kVH9n+i3TZcf 40LXek2j7n5O10XybB5EQRNJGTcoOVuoCTlh8F0dP22sIUWn0ENlT1eeehUyMWcEob6LFoUxM SiU9nU+4fdxUdHWyomuJiUoet0wp89FSt5f8fl+Kq6/Wo7lHyJsuuYnpXDT1xwfgxZMylppAU 6CeEJv48tK2zHlfNoYbvwry9VjYI76dODDlIZ1rRhL/T82rO7SAu7xfnaNI/qwHBWMTn/hehe +WKnmq9TseUdk5lwlkgAn1bKyjJOQ/v20kRgCBaIYEIG189CK9Z8QG/hYVViLbB/aRjaSpT3Y ANiotn65ZALfYAMTGZmjTmve40S2WlxeG1m+Kvnnt8Xmnoxp4yVls2EPPZld0Q8qnoLT0UhZ7 wqea0/O
Archived-At: <http://mailarchive.ietf.org/arch/msg/cellar/8InoDRkWNk8dW4OxqGTZvuskKC8>
Subject: Re: [Cellar] On the multiplicity of Info elements
X-BeenThere: cellar@ietf.org
X-Mailman-Version: 2.1.15
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: Mon, 04 Jan 2016 18:59:32 -0000

04.01.2016, 08:11 Steve Lhomme:
> 2016-01-03 16:53 GMT+01:00 Dave Rice <dave@dericed.com>:
>> 
>>> On Jan 2, 2016, at 3:47 AM, Steve Lhomme <slhomme@matroska.org>
>>> wrote:
>>> 
>>> 2015-12-30 10:18 GMT+01:00 Moritz Bunkus <moritz@bunkus.org>:
>>>> Hey,
>>>> 
>>>> I only remember the discussion around Tracks being multiple,
>>>> not particularly for the other ones. Our intent way back when
>>>> was to allow muxers to write multiple instances of _the same
>>>> information_ in different places in order to make the file more
>>>> resilient against damage or incomplete downloads with protocols
>>>> like BitTorrent.
>>> 
>>> Yes, that's the idea for the Track Info as it's vital to the
>>> usability of the file, as well as the Segment Info. I'm not sure
>>> it's used in practice though. Since the goal of CELLAR is
>>> archiving solutions it may still make sense.
>> 
>> Perhaps to declare that an Element may be repeated but must be
>> repeated identically should be a new EBML Element Attributes, so
>> there can be a distinction between the repeatability Segment/Info
>> and the repeatability of SimpleBlock.
> 
> That might be good. After all not elements make sense as repeated 
> ones. For example in Matroska you don't want a Cluster (timestamped 
> data) to be repeated.
> 
>>>> The same reasoning could be applied to Info. Both elements are 
>>>> absolutely crucial to playback; the other level 1 elements safe
>>>> for the clusters simply aren’t.
>> 
>> But what should happen when the read finds differences in
>> repeated-but-should-be-identical elements?
> 
> Good question. Maybe repeated elements should have a CRC ? If a CRC
> is wrong (or not found) the parser could look for a copy.

I like the CRC idea for repeated elements, but it still does not define
how players should behave if they encounter two elements, even with
valid CRCs, not matching each other.

There would have to be a recommendation. "Use always the first
occurrence of an element." or "If an element occurs repeated and its
values differ, the last occurrence is the one that should be used."

Obviously tools that create such files are violating the specifications
since it should not be allowed to create repeated elements with
differing values. On the other hand should it be hard to break playback.
I prefer uniform behavior among players.

>> For a scenario of two differing Info Elements, VLC and FFmpeg use
>> different Info Elements. Which use is correct? Since the use of
>> repeated-identical elements is resilience a deviation between the
>> two could be expected, so we should suggest how the reader should
>> respond.
> 
> It was designed for recovery tools. It may not be good to change 
> players for such cases. It would make them more complex. (unless an 
> elegant/easy solution is found).

For differences due to transmission errors a CRC for repeated elements
seems a good solution.

Players have to do something with repeated elements. I don't know what
they do, but there should be a recommended way they should handle such
cases. If a player breaks, that is OK, as long as the file was violating
the specs. A player should behave in an expected way.

>>>>> SeekHead, Info, Cluster, Tracks, and Tags are multiple.
>>>> 
>>>> SeekHead and Cluster must be multiple. SeekHead in order to
>>>> allow moving a SeekHead to the end of the file while still
>>>> referencing it from the start (so that normal players will
>>>> still find it quickly). Cluster for obvious reasons.
>>>> 
>>>>> And Cues, Attachments, and Chapters are non-multiple.
>>>> 
>>>> I have no idea why Tags is multiple and these three aren't.
>>>> 
>>>> To me the following would make sense:
>>>> 
>>>> - Info, Tracks – multiple but only if each instance contains
>>>> the same information
>>>> 
>>>> - SeekHead, Cluster – multiple without restrictions
>>>> 
>>>> - Attachments, Chapters, Cues, Tags – single
>> 
>> I can understand Attachments and Tags being multiple as it could
>> allow attachments or tags to be added to a file without having to
>> re-write too many bytes.
> 
> Yes. But then there should be a way for the player to know about
> these beforehand. Good players scan Matroska files beforehand anyway
> (unless it's live streaming).
> 

I agree with having a mechanism for players to know about them beforehand.

--
Sebastian