models¶
Data models for parsing mkvmerge JSON output using msgspec.
This module defines structures that map to the JSON output of mkvmerge -J.
Examples
>>> from pymkv.models import MkvMergeOutput
>>> # data = msgspec.json.decode(json_bytes, type=MkvMergeOutput)
- class pymkv.models.AttachmentInfo(id: int, file_name: str | None = None, content_type: str | None = None, description: str | None = None, size: int = 0, properties: ~pymkv.models.AttachmentProperties = <factory>)¶
Bases:
StructInformation about an attachment.
- content_type : str | None¶
- description : str | None¶
- file_name : str | None¶
- id : int¶
- properties : AttachmentProperties¶
- size : int¶
-
class pymkv.models.AttachmentProperties(name: str | None =
None, description: str | None =None, mime_type: str | None =None)¶ Bases:
StructProperties of an attachment.
- description : str | None¶
- mime_type : str | None¶
- name : str | None¶
- class pymkv.models.ContainerInfo(properties: ~pymkv.models.ContainerProperties = <factory>, supported: bool = True, recognized: bool = True, type: str | None = None)¶
Bases:
StructInformation about the container.
- properties : ContainerProperties¶
- recognized : bool¶
- supported : bool¶
- type : str | None¶
-
class pymkv.models.ContainerProperties(title: str | None =
None)¶ Bases:
StructProperties of the container.
- title : str | None¶
- class pymkv.models.MkvMergeOutput(container: ~pymkv.models.ContainerInfo, file_name: str | None = None, tracks: list[~pymkv.models.TrackInfo] = <factory>, global_tags: list[~pymkv.models.TagEntry] = <factory>, track_tags: list[~pymkv.models.TagEntry] = <factory>, attachments: list[~pymkv.models.AttachmentInfo] = <factory>)¶
Bases:
StructRoot structure of mkvmerge -J output.
- attachments¶
List of attachments.
- Type:¶
list[AttachmentInfo]
- attachments : list[AttachmentInfo]¶
- container : ContainerInfo¶
- file_name : str | None¶
-
class pymkv.models.TagEntry(num_entries: int =
0, track_id: int | None =None)¶ Bases:
StructTag entry information.
- num_entries : int¶
- track_id : int | None¶
- class pymkv.models.TrackInfo(id: int, type: str, codec: str, properties: ~pymkv.models.TrackProperties = <factory>, num_entries: int | None = None, start_pts: int = 0)¶
Bases:
StructInformation about a track.
- codec : str¶
- id : int¶
- num_entries : int | None¶
- properties : TrackProperties¶
- start_pts : int¶
- type : str¶
-
class pymkv.models.TrackProperties(*, track_name: str | None =
None, language: str | None =None, language_ietf: str | None =None, default_track: bool =False, forced_track: bool =False, flag_commentary: bool =False, flag_hearing_impaired: bool =False, flag_visual_impaired: bool =False, flag_original: bool =False)¶ Bases:
StructProperties of a track as returned by mkvmerge -J.
- default_track : bool¶
- flag_commentary : bool¶
- flag_hearing_impaired : bool¶
- flag_original : bool¶
- flag_visual_impaired : bool¶
- forced_track : bool¶
- language : str | None¶
- language_ietf : str | None¶
- track_name : str | None¶