Skip to content

Support reading/extracting existing chapters from MKV files #125

Description

@xMohnad

Is your enhancement request related to a problem? Please describe.
pymkv2 can add chapters to MKV files, but it cannot read chapters that already exist in a file.

Describe the solution you'd like

Add support for parsing and exposing chapter data from MKV files.

Implementation steps

  • Detect chapters in MKV files
  • Parse chapter data
  • Convert it to the Chapter object
  • Populate "MKVFile.chapters_obj" on load
  • Add tests for files with and without chapters

Additional context

Example:

mkvextract chapters "foo.mkv"

This shows chapters in XML, but:

from pymkv import MKVFile

mkv = MKVFile("foo.mkv")
print(mkv.chapters_obj)  # None

Expected: "chapters_obj" should contain the parsed chapters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions