Skip to content

Commit

Permalink
add Matroska v5 document
Browse files Browse the repository at this point in the history
  • Loading branch information
robUx4 committed Oct 24, 2024
1 parent 34e4037 commit 5fa462b
Show file tree
Hide file tree
Showing 9 changed files with 242 additions and 24 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ _site
*lhomme-cellar-codec*
*lhomme-cellar-tags-*
*ietf-cellar-matroska-*
*ietf-cellar-matroska5-*
*ietf-cellar-codec*
*ietf-cellar-tags-*
*ietf-cellar-chapter-codecs-*
Expand Down
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
VERSION_MATROSKA := 24
VERSION_MATROSKA5 := 01
VERSION_CODEC := 14
VERSION_TAGS := 14
VERSION_CHAPTER_CODECS := 06
Expand All @@ -9,6 +10,7 @@ STATUS_TAGS := draft-
STATUS_CHAPTER_CODECS := draft-
STATUS_CONTROL := draft-
OUTPUT_MATROSKA := $(STATUS_MATROSKA)ietf-cellar-matroska-$(VERSION_MATROSKA)
OUTPUT_MATROSKA5 := $(STATUS_MATROSKA)ietf-cellar-matroska5-$(VERSION_MATROSKA5)
OUTPUT_CODEC := $(STATUS_CODEC)ietf-cellar-codec-$(VERSION_CODEC)
OUTPUT_TAGS := $(STATUS_TAGS)ietf-cellar-tags-$(VERSION_TAGS)
OUTPUT_CHAPTER_CODECS := $(STATUS_CHAPTER_CODECS)ietf-cellar-chapter-codecs-$(VERSION_CHAPTER_CODECS)
Expand Down Expand Up @@ -41,10 +43,11 @@ MATROSKA_IANA_CSV := matroska-element-ids.csv \
matroska-chapter-codec-ids.csv \
matroska-tags-target-type-ids.csv

all: matroska codecs tags chapter_codecs control matroska_iana.xml $(MATROSKA_IANA_CSV) rfc9559.notprepped.html
all: matroska matroska5 codecs tags chapter_codecs control matroska_iana.xml $(MATROSKA_IANA_CSV) rfc9559.notprepped.html
$(info RFC rendering has been tested with mmark version 2.2.8 and xml2rfc 2.46.0, please ensure these are installed and recent enough.)

matroska: $(OUTPUT_MATROSKA).html $(OUTPUT_MATROSKA).txt $(OUTPUT_MATROSKA).xml
matroska5: $(OUTPUT_MATROSKA5).html $(OUTPUT_MATROSKA5).txt $(OUTPUT_MATROSKA5).xml
codecs: $(OUTPUT_CODEC).html $(OUTPUT_CODEC).txt $(OUTPUT_CODEC).xml
tags: $(OUTPUT_TAGS).html $(OUTPUT_TAGS).txt $(OUTPUT_TAGS).xml
chapter_codecs: $(OUTPUT_CHAPTER_CODECS).html $(OUTPUT_CHAPTER_CODECS).txt $(OUTPUT_CHAPTER_CODECS).xml
Expand Down Expand Up @@ -105,6 +108,10 @@ control_elements4rfc.md: transforms/ebml_schema2markdown4rfc.xsl control_xsd.xml
$(OUTPUT_MATROSKA).md: index_matroska.md diagram.md matroska_schema_section_header.md ebml_matroska_elements4rfc.md ordering.md notes.md chapters.md attachments.md cues.md streaming.md tags-precedence.md matroska_implement.md matroska_security.md iana_matroska_ids.md matroska_iana_ids.md matroska_iana.md iana.md rfc_backmatter_matroska.md matroska_annex.md matroska_deprecated4rfc.md
cat $^ > $@

$(OUTPUT_MATROSKA5).md: index_matroska5.md matroska5_body.md matroska5_security.md matroska5_iana.md rfc_backmatter_matroska5.md
cat $^ | sed -e "s/@BUILD_DATE@/$(shell date +'%F')/" \
-e "s/@BUILD_VERSION@/$(OUTPUT_MATROSKA5)/" > $@

$(OUTPUT_CODEC).md: index_codec.md codec_specs.md subtitles.md block_additional_mappings_intro.md block_additional_mappings/*.md codec_security.md codec_iana.md rfc_backmatter_codec.md
cat $^ | sed -e "s/@BUILD_DATE@/$(shell date +'%F')/" \
-e "s/@BUILD_VERSION@/$(OUTPUT_CODEC)/" > $@
Expand Down Expand Up @@ -162,6 +169,7 @@ website:
clean:
$(RM) -f $(OUTPUT_MATROSKA).txt $(OUTPUT_MATROSKA).html $(OUTPUT_MATROSKA).md $(OUTPUT_MATROSKA).xml ebml_matroska_elements4rfc.md matroska_tagging_registry.md matroska_deprecated4rfc.md matroska_iana.xml matroska_iana_ids.md matroska_xsd.xml matroska_iana.md
$(RM) -f $(MATROSKA_IANA_CSV)
$(RM) -f $(OUTPUT_MATROSKA5).txt $(OUTPUT_MATROSKA5).html $(OUTPUT_MATROSKA5).md $(OUTPUT_MATROSKA5).xml
$(RM) -f $(OUTPUT_CODEC).txt $(OUTPUT_CODEC).html $(OUTPUT_CODEC).md $(OUTPUT_CODEC).xml
$(RM) -f $(OUTPUT_TAGS).txt $(OUTPUT_TAGS).html $(OUTPUT_TAGS).md $(OUTPUT_TAGS).xml tags_iana_names.md
$(RM) -f $(OUTPUT_CHAPTER_CODECS).txt $(OUTPUT_CHAPTER_CODECS).html $(OUTPUT_CHAPTER_CODECS).md $(OUTPUT_CHAPTER_CODECS).xml
Expand Down
6 changes: 4 additions & 2 deletions ebml_matroska.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1472,8 +1472,10 @@ When disabled, the movie **SHOULD** skip all the content between the TimeStart a
<extension type="libmatroska" cppname="ChapterSegmentUID"/>
</element>
<element name="ChapterSkipType" path="\Segment\Chapters\EditionEntry\+ChapterAtom\ChapterSkipType" id="0x4588" type="uinteger" minver="5" maxOccurs="1">
<documentation lang="en" purpose="definition">Indicates what type of content the `ChapterAtom` contains and might be skipped. It can be used to automatically skip content based on the type.
If a `ChapterAtom` is inside a `ChapterAtom` that has a `ChapterSkipType` set, it **MUST NOT** have a `ChapterSkipType` or have a `ChapterSkipType` with the same value as it's parent `ChapterAtom`.
<documentation lang="en" purpose="definition">Indicates what type of content the `ChapterAtom` contains and might be skipped.
It can be used to automatically skip content based on the type.
If a `ChapterAtom` is inside a `ChapterAtom` that has a `ChapterSkipType` set, it
**MUST NOT** have a `ChapterSkipType` or have a `ChapterSkipType` with the same value as it's parent `ChapterAtom`.
If the `ChapterAtom` doesn't contain a `ChapterTimeEnd`, the value of the `ChapterSkipType` is only valid until the next `ChapterAtom` with a `ChapterSkipType` value or the end of the file.
</documentation>
<extension type="webmproject.org" webm="0"/>
Expand Down
64 changes: 64 additions & 0 deletions index_matroska5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
%%%
title = "Matroska Media Container v5 Additions"
abbrev = "Matroska Tags"
ipr= "trust200902"
area = "art"
submissiontype = "IETF"
workgroup = "cellar"
date = @BUILD_DATE@
keyword = ["binary","storage","matroska","ebml","v5"]

[seriesInfo]
name = "Internet-Draft"
stream = "IETF"
status = "standard"
value = "@BUILD_VERSION@"

[[author]]
initials="S."
surname="Lhomme"
fullname="Steve Lhomme"
[author.address]
email="slhomme@matroska.org"

[[author]]
initials="M."
surname="Bunkus"
fullname="Moritz Bunkus"
[author.address]
email="moritz@bunkus.org"

[[author]]
initials="D."
surname="Rice"
fullname="Dave Rice"
[author.address]
email="dave@dericed.com"
%%%

.# Abstract

This document defines the Matroska version 5 additions.

{mainmatter}

# Introduction

Matroska is a multimedia container format defined in [@!RFC9559]. It can store timestamped multimedia data
but also chapters and tags.

# Status of This Document

This document only covers version 5 of the Matroska elements and features.
Matroska versions 1 to 4 are covered in [@!RFC9559].

# Notation and Conventions

The key words "**MUST**", "**MUST NOT**",
"**REQUIRED**", "**SHALL**", "**SHALL NOT**",
"**SHOULD**", "**SHOULD NOT**",
"**RECOMMENDED**", "**NOT RECOMMENDED**",
"**MAY**", and "**OPTIONAL**" in this document are to be interpreted as
described in BCP 14 [@!RFC2119] [@!RFC8174]
when, and only when, they appear in all capitals, as shown here.

131 changes: 131 additions & 0 deletions matroska5_body.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# minver Value

All the new elements have a `minver` attribute of "5".
If they are present in a Matroska file the EBML Header **MUST** have a `DocTypeReadVersion` of 5 or more.


# Audio Emphasis

id / type / default:
: 0x52F1 / uinteger / 0

path:
: `\Segment\Tracks\TrackEntry\Audio\Emphasis`

minOccurs / maxOccurs:
: 1 / 1

minver:
: 5

definition:
: Audio emphasis applied on audio samples. The player **MUST** apply the inverse emphasis to get the proper audio samples.

restrictions:
: See (#EmphasisValues).

stream copy:
: True ([@!RFC9559, section 8])

|value|label|definition|
|:---|:---|:---|
|`0` |No emphasis | |
|`1` |CD audio |First order filter with zero point at 50 microseconds and a pole at 15 microseconds. Also found on DVD Audio and MPEG audio. |
|`2` |reserved | |
|`3` |CCIT J.17 |Defined in [@!ITU-J.17]. |
|`4` |FM 50 |FM Radio in Europe. RC Filter with a time constant of 50 microseconds. |
|`5` |FM 75 |FM Radio in the USA. RC Filter with a time constant of 75 microseconds. |
|`10` |Phono RIAA |Phono filter with time constants of t1=3180, t2=318 and t3=75 microseconds. [@!NAB1964] |
|`11` |Phono IEC N78 |Phono filter with time constants of t1=3180, t2=450 and t3=50 microseconds. |
|`12` |Phono TELDEC |Phono filter with time constants of t1=3180, t2=318 and t3=50 microseconds. |
|`13` |Phono EMI |Phono filter with time constants of t1=2500, t2=500 and t3=70 microseconds. |
|`14` |Phono Columbia LP |Phono filter with time constants of t1=1590, t2=318 and t3=100 microseconds. |
|`15` |Phono LONDON |Phono filter with time constants of t1=1590, t2=318 and t3=50 microseconds. |
|`16` |Phono NARTB |Phono filter with time constants of t1=3180, t2=318 and t3=100 microseconds. |
Table: Emphasis Values{#EmphasisValues}


# Chapter Skipping

id / type:
: 0x4588 / uinteger

path:
: `\Segment\Chapters\EditionEntry\+ChapterAtom\ChapterSkipType`

maxOccurs:
: 1

definition:
: Indicates what type of content the `ChapterAtom` contains and might be skipped.
It can be used to automatically skip content based on the type.
If a `ChapterAtom` is inside a `ChapterAtom` that has a `ChapterSkipType` set, it
**MUST NOT** have a `ChapterSkipType` or have a `ChapterSkipType` with the same value as it's parent `ChapterAtom`.
If the `ChapterAtom` doesn't contain a `ChapterTimeEnd`, the value of the `ChapterSkipType` is only valid
until the next `ChapterAtom` with a `ChapterSkipType` value or the end of the file.


restrictions:
: See (#ChapterSkipTypeValues).

|value|label|definition|
|:---|:---|:---|
|`0` |No Skipping |Content which should not be skipped. |
|`1` |Opening Credits |Credits usually found at the beginning of the content. |
|`2` |End Credits |Credits usually found at the end of the content. |
|`3` |Recap |Recap of previous episodes of the content, usually found around the beginning. |
|`4` |Next Preview |Preview of the next episode of the content, usually found around the end. It may contain spoilers the user wants to avoid. |
|`5` |Preview |Preview of the current episode of the content, usually found around the beginning. It may contain spoilers the user want to avoid. |
|`6` |Advertisement |Advertisement within the content. |
Table: ChapterSkipType Values{#ChapterSkipTypeValues}

# Chapter Edition Display

## EditionDisplay Element

id / type:
: 0x4520 / master

path:
: `\Segment\Chapters\EditionEntry\EditionDisplay`

minver:
: 5

definition:
: Contains a possible string to use for the edition display for the given languages.


## EditionString Element

id / type:
: 0x4521 / utf-8

path:
: `\Segment\Chapters\EditionEntry\EditionDisplay\EditionString`

minOccurs / maxOccurs:
: 1 / 1

minver:
: 5

definition:
: Contains the string to use as the edition name.


## EditionLanguageIETF Element

id / type:
: 0x45E4 / string

path:
: `\Segment\Chapters\EditionEntry\EditionDisplay\EditionLanguageIETF`

minver:
: 5

definition:
: One language corresponding to the EditionString,
in the form defined in [@!RFC5646]; see [@!RFC9559, section 12] on language codes.

4 changes: 4 additions & 0 deletions matroska5_iana.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# IANA Considerations

## Matroska Element IDs Registry Additions

4 changes: 4 additions & 0 deletions matroska5_security.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Security Considerations

This document inherits security considerations from the EBML [@!RFC8794] and Matroska [@!RFC9559] documents.

21 changes: 0 additions & 21 deletions rfc_backmatter_matroska.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,17 +182,6 @@
<seriesInfo name="ITU-T Recommendation" value="H.273" />
</reference>

<reference anchor="ITU-J.17" target="https://www.itu.int/rec/T-REC-J.17/en">
<front>
<title>Pre-emphasis used on sound-programme circuits</title>
<author>
<organization>ITU-T</organization>
</author>
<date day="25" month="November" year="1988"/>
</front>
<seriesInfo name="ITU-T Recommendation" value="J.17" />
</reference>

<reference anchor="JPEG" target="https://www.w3.org/Graphics/JPEG/itu-t81.pdf">
<front>
<title>INFORMATION TECHNOLOGY - DIGITAL COMPRESSION AND CODING OF CONTINUOUS-TONE STILL IMAGES - REQUIREMENTS AND GUIDELINES</title>
Expand All @@ -204,16 +193,6 @@
<seriesInfo name="ITU-T Recommendation" value="T.81" />
</reference>

<reference anchor="NAB1964" target="https://www.richardhess.com/tape/history/NAB/NAB_Disc_Standard_1964_searchable.pdf">
<front>
<title>NAB Audio Recording And Reproducing Standards For Disc Recording And Reproducing</title>
<author>
<organization>National Association of Broadcaster</organization>
</author>
<date day="1" month="February" year="1964"/>
</front>
</reference>

<reference anchor="libmatroska" target="https://github.com/Matroska-Org/libmatroska">
<front>
<title>libmatroska</title>
Expand Down
25 changes: 25 additions & 0 deletions rfc_backmatter_matroska5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@


{backmatter}

<reference anchor="ITU-J.17" target="https://www.itu.int/rec/T-REC-J.17/en">
<front>
<title>Pre-emphasis used on sound-programme circuits</title>
<author>
<organization>ITU-T</organization>
</author>
<date day="25" month="November" year="1988"/>
</front>
<seriesInfo name="ITU-T Recommendation" value="J.17" />
</reference>

<reference anchor="NAB1964" target="https://www.richardhess.com/tape/history/NAB/NAB_Disc_Standard_1964_searchable.pdf">
<front>
<title>NAB Audio Recording And Reproducing Standards For Disc Recording And Reproducing</title>
<author>
<organization>National Association of Broadcaster</organization>
</author>
<date day="1" month="February" year="1964"/>
</front>
</reference>

0 comments on commit 5fa462b

Please sign in to comment.