Subject: [Cellar] Matroska: Which comes first, CRC or Timecode?

From: Ashley Blewer <[email-masked]>
Date: Thu, 10 Aug 2017 11:23:50 -0400

Hi,

I want to follow up on-list about an issue arising in this PR
<https://github.com/Matroska-Org/matroska-specification/pull/157>
clarifying language in the ordered guidelines of Matroska. (And trying to
keep the PR scoped to mostly small grammar/structure errors!)

The original last line seems to contract other statements made in the
specification.

The last line, originally, was:

As each `BlockGroup` and `SimpleBlock` of a `Cluster` Element needs the
Cluster `Timecode`, the `Timecode` Element MUST occur as the first Child
Element within the `Cluster` Element.

But, as Dave Rice brought up, a Cluster with a CRC-32 element expects the
CRC-32 to be first, not Timecode.

Moritz said:

"I think that Timecode being the first element is just a recommendation,
not a requirement. The intention is that the Timecode is found before the
first Element that needs it (BlockGroup or SimpleBlock). Therefore placing
the CRC32 Element first wouldn't do any harm."

Does anyone have any opinions on this? Should CRC always come first if
present, and Timecode should always come first, but second to CRC? Other
solutions?

For now, I updated the PR with Dave's advice...

The Timecode Element MUST occur as in storage order before any SimpleBlock,
BlockGroup, or EncryptedBlock within the Cluster Element

Thanks,

Ashley

---

From: Dave Rice <[email-masked]>
Date: Thu, 10 Aug 2017 11:32:20 -0400

> On Aug 10, 2017, at 11:23 AM, Ashley Blewer <[email-masked]> wrote:
> 
> Hi,
> 
> I want to follow up on-list about an issue arising in this PR <https://github.com/Matroska-Org/matroska-specification/pull/157> clarifying language in the ordered guidelines of Matroska. (And trying to keep the PR scoped to mostly small grammar/structure errors!)
> 
> The original last line seems to contract other statements made in the specification. 
> 
> As each `BlockGroup` and `SimpleBlock` of a `Cluster` Element needs the Cluster `Timecode`, the `Timecode` Element MUST occur as the first Child Element within the `Cluster` Element.
> 
> But, as Dave Rice brought up, a Cluster with a CRC-32 element expects the CRC-32 to be first, not Timecode.
> 
> Moritz said:
> 
> "I think that Timecode being the first element is just a recommendation, not a requirement. The intention is that the Timecode is found before the first Element that needs it (BlockGroup or SimpleBlock). Therefore placing the CRC32 Element first wouldn't do any harm."
> 
> Does anyone have any opinions on this? Should CRC always come first if present, and Timecode should always come first, but second to CRC? Other solutions?
> 
> The Timecode Element MUST occur as in storage order before any SimpleBlock, BlockGroup, or EncryptedBlock within the Cluster Element

FWIW, ffmpeg writes CRC-32 before Timecode (correct via EBML spec, incorrect via current Matroska spec).
<Cluster>
	<CRC-32/>
	<Timecode/>
	<SimpleBlock>...</SimpleBlock>
</Cluster>

Dave Rice

---

From: Jerome Martinez <[email-masked]>
Date: Thu, 10 Aug 2017 17:46:35 +0200

Le 10/08/2017 à 17:23, Ashley Blewer a écrit :
> The Timecode Element MUST occur as in storage order before any 
> SimpleBlock, BlockGroup, or EncryptedBlock within the Cluster Element

IMHO CRC is general purpose, so "must be first" must be obeyed in priority.
I would be less limiting the list of blocks after Timecode, something 
like "The Timecode Element MUST occur as in storage order before any 
element specific to the Cluster Element" (i.e. all nested in the Cluster 
element in the specs).

---

From: Tessa Fallon <[email-masked]>
Date: Thu, 10 Aug 2017 15:14:09 -0400

Should this be out to a vote?

On Aug 10, 2017 11:46, "Jerome Martinez" <[email-masked]> wrote:

> I would be less limiting the list of blocks after Timecode, something like
> "The Timecode Element MUST occur as in storage order before any element
> specific to the Cluster Element" (i.e. all nested in the Cluster element in
> the specs).
>
> _______________________________________________
> Cellar mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/cellar
>
>

---

From: Ashley Blewer <[email-masked]>
Date: Thu, 10 Aug 2017 16:12:41 -0400

Hmm... not well-versed on the voting, but I don't think so. I think it's
just a matter of opinions interpreting the existing specs and considering
how it has been generally interpreted.

---

From: Dave Rice <[email-masked]>
Date: Thu, 10 Aug 2017 16:25:57 -0400

I don't think anyone is advocating for Timecode before CRC-32, so maybe a vote is not necessary.
Dave

> On Aug 10, 2017, at 4:12 PM, Ashley Blewer <[email-masked]> wrote:
> 
> Hmm... not well-versed on the voting, but I don't think so. I think it's just a matter of opinions interpreting the existing specs and considering how it has been generally interpreted. 
> 
> On Thu, Aug 10, 2017 at 3:14 PM, Tessa Fallon <[email-masked] <mailto:[email-masked]>> wrote:
> On Aug 10, 2017 11:46, "Jerome Martinez" <[email-masked] <mailto:[email-masked]>> wrote:
> I would be less limiting the list of blocks after Timecode, something like "The Timecode Element MUST occur as in storage order before any element specific to the Cluster Element" (i.e. all nested in the Cluster element in the specs).
> 
> [email-masked] <mailto:[email-masked]>
> https://www.ietf.org/mailman/listinfo/cellar <https://www.ietf.org/mailman/listinfo/cellar>
> 
> 
> [email-masked] <mailto:[email-masked]>
> https://www.ietf.org/mailman/listinfo/cellar <https://www.ietf.org/mailman/listinfo/cellar>
> 
>

---

From: Tessa Fallon <[email-masked]>
Date: Fri, 11 Aug 2017 02:03:08 -0400

Ok. I was confused by the PR issue.
Please remember that conversations on Github should be in sync with
conversations on the list. We do not want two separate conversation streams

On Aug 10, 2017 16:26, "Dave Rice" <[email-masked]> wrote:

I don't think anyone is advocating for Timecode before CRC-32, so maybe a
vote is not necessary.
Dave

---

From: Moritz Bunkus <[email-masked]>
Date: Fri, 11 Aug 2017 08:15:14 +0200

Hey,

as the main discussion seems to take place here, I'll repeat what I've
written on Github:

The intention behind making `Timecode` the first element is that the
Timecode is found before the first Element that needs it (BlockGroup or
SimpleBlock). Therefore placing the CRC32 Element first wouldn't do any
harm. The `Timecode Element` doesn't have to be the first overall, it just
has to come before any of {BlockGroup, SimpleBlock, EncryptedBlock}.

Therefore I agree with Dave; no one seems to be arguing in favor of placing
`Timecode` before `CRC32`; hence no vote seems to be required. We're all in
polite agreement and just have to figure out the exact wording.

Kind regards,
mosu

---

From: Tessa Fallon <[email-masked]>
Date: Fri, 11 Aug 2017 02:29:06 -0400

Ok, that is fine with me; just checking in.

On Aug 11, 2017 02:15, "Moritz Bunkus" <[email-masked]> wrote:

Hey,

Kind regards,
mosu

---

From: Ashley Blewer <[email-masked]>
Date: Sun, 13 Aug 2017 15:32:25 -0400

I updated the PR with Dave's recommended wording and we seem to have
consensus there. I would like this PR to be again considered for review!