Skip to content

Commit

Permalink
simplify the ChapterTimeEnd section for nested ordered chapters
Browse files Browse the repository at this point in the history
It MUST be set on the lowest nested chapters and SHOULD NOT be set in parent chapters.
  • Loading branch information
robUx4 committed Feb 6, 2022
1 parent 53fccf3 commit 1ac1749
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 21 deletions.
24 changes: 4 additions & 20 deletions chapters.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,27 +136,11 @@ If the `Parent Chapter` of a `Nested Chapter` has a `ChapterTimeEnd`, the `Chapt

### Nested Chapters in Ordered Chapters

Consider some chapters in a Ordered Chapter edition:
The `ChapterTimeEnd` of the lowest level of `Nested Chapters` **MUST** be set for Ordered Chapters.

* Chapter 1: start 10s
* Chapter 1.1: start 10s
* Chapter 1.1.1: start 10s / end 30s
* Chapter 1.1.2: start 45s / end 50s
* Chapter 1.2: start 40s / end 45s

A `Matroska Player` should play the content from 10s to 30s (1.1.1), then 45s to 50s (1.1.2),
then 40s to 45s (1.2).

If Chapter 1.1 had a `ChapterTimeEnd` it should include the content that is actually
played, so it should be "50s". So when the `Parent Chapter` `ChapterTimeEnd` is set,
it **MUST** use the highest `ChapterTimeEnd` value of its direct `Nested Chapters`.

But if the `Matroska Player` doesn't read the lower `Nested Chapters`,
it would actually play "10s" to "50s" which is not what is expected.
So the `ChapterTimeEnd` of the lowest level of `Nested Chapters` **MUST** be used for playback.

In the `ChapterTimeEnd` value of a `Parent Chapter` is useless for playback.
When used with Ordered Chapters, the `ChapterTimeEnd` is **NOT RECOMMENDED** in `Parent Chapters`.
When used with Ordered Chapters, the `ChapterTimeEnd` value of a `Parent Chapter` is useless for playback
as the proper playback sections are described in its `Nested Chapters`.
The `ChapterTimeEnd` **SHOULD NOT** be set in `Parent Chapters` and **MUST** be ignored for playback.

### ChapterFlagHidden

Expand Down
2 changes: 1 addition & 1 deletion ebml_matroska.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,7 @@ Use for WebVTT cue identifier storage [@!WebVTT].</documentation>
The value **MUST** be greater than or equal to the `ChapterTimeStart` of the same `ChapterAtom`.</documentation>
<documentation lang="en" purpose="usage notes">The `ChapterTimeEnd` timestamp value being excluded, it **MUST** take in account the duration of
the last frame it includes, especially for the `ChapterAtom` using the last frames of the `Segment`.</documentation>
<implementation_note note_attribute="minOccurs">ChapterTimeEnd **MUST** be set (minOccurs=1) the Edition is an ordered edition; see (#editionflagordered)</implementation_note>
<implementation_note note_attribute="minOccurs">ChapterTimeEnd **MUST** be set (minOccurs=1) if the Edition is an ordered edition; see (#editionflagordered), unless it's a `Parent Chapter`; see (#nested-chapters)</implementation_note>
<extension type="webmproject.org" webm="1"/>
</element>
<element name="ChapterFlagHidden" path="\Segment\Chapters\EditionEntry\+ChapterAtom\ChapterFlagHidden" id="0x98" type="uinteger" range="0-1" default="0" minOccurs="1" maxOccurs="1">
Expand Down

0 comments on commit 1ac1749

Please sign in to comment.