Skip to content
Novus Examples
xml1.5 KB

Chapters — Matroska Chapter XML

The XML dialect `mkvmerge` and `mkvpropedit` read to write chapters into a Matroska file without re-muxing it. Timestamps are nanosecond-precision `HH:MM:SS.nnnnnnnnn`, and each ChapterAtom carries a UID that must be stable across edits — the field most hand-written generators omit, which is why re-running them renumbers every chapter.

Preview — first 44 linesxml
<?xml version="1.0" encoding="UTF-8"?>
<Chapters>
  <EditionEntry>
    <EditionUID>1</EditionUID>
    <EditionFlagDefault>1</EditionFlagDefault>
    <ChapterAtom>
      <ChapterUID>101</ChapterUID>
      <ChapterTimeStart>00:00:00.000000000</ChapterTimeStart>
      <ChapterTimeEnd>00:00:02.000000000</ChapterTimeEnd>
      <ChapterDisplay>
        <ChapterString>Cold Open</ChapterString>
        <ChapterLanguage>eng</ChapterLanguage>
      </ChapterDisplay>
    </ChapterAtom>
    <ChapterAtom>
      <ChapterUID>102</ChapterUID>
      <ChapterTimeStart>00:00:02.000000000</ChapterTimeStart>
      <ChapterTimeEnd>00:00:04.000000000</ChapterTimeEnd>
      <ChapterDisplay>
        <ChapterString>Titles</ChapterString>
        <ChapterLanguage>eng</ChapterLanguage>
      </ChapterDisplay>
    </ChapterAtom>
    <ChapterAtom>
      <ChapterUID>103</ChapterUID>
      <ChapterTimeStart>00:00:04.000000000</ChapterTimeStart>
      <ChapterTimeEnd>00:00:06.000000000</ChapterTimeEnd>
      <ChapterDisplay>
        <ChapterString>Main Segment</ChapterString>
        <ChapterLanguage>eng</ChapterLanguage>
      </ChapterDisplay>
    </ChapterAtom>
    <ChapterAtom>
      <ChapterUID>104</ChapterUID>
      <ChapterTimeStart>00:00:06.000000000</ChapterTimeStart>
      <ChapterTimeEnd>00:00:08.000000000</ChapterTimeEnd>
      <ChapterDisplay>
        <ChapterString>Credits</ChapterString>
        <ChapterLanguage>eng</ChapterLanguage>
      </ChapterDisplay>
    </ChapterAtom>
  </EditionEntry>
</Chapters>

Specifications

Format
Matroska Chapters XML
Chapters
4
Timestamp Precision
nanoseconds
Tool
mkvpropedit --chapters
Chapter Names
Cold Open / Titles / Main Segment / Credits

What is a .xml file?

XML (Extensible Markup Language) is a verbose, self-describing markup language using nested tags, attributes, and namespaces to represent structured, hierarchical data. It supports schemas, entities, and validation and underlies many document and data formats. It remains common in enterprise, publishing, and interchange contexts.

How to use this file

Use an example XML file to test parsers, namespace and schema validation, XPath queries, and protection against entity-expansion and external-entity attacks.

How to use this file for testing

“Chapters — Matroska Chapter XML” is a deterministic Novus Examples fixture for Media metadata, Video QA, Conversion testing. Video files with embedded chapters, full container tags, attached cover art and a SMPTE start timecode — each paired with a deliberately stripped twin, so you can tell a metadata reader that found nothing from one that was never given anything.

Documented properties for this file: Matroska Chapters XML. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Media fixtures are short and synthetic by design. Prefer waveform or transcript ground truth in the same group when measuring ASR, trim, upscale, or sync tools; do not assume broadcast-quality masters.

Code examples

import xml.etree.ElementTree as ET

tree = ET.parse("chapters-matroska.xml")
root = tree.getroot()
print(root.tag, [c.tag for c in root][:5])

Generated by generation/video_accessibility.py. Free for any use, no attribution required — license.