Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vi/mkvparse
Simple Python matroska (mkv) reading library, also mkv2xml and xml2mkv
https://github.com/vi/mkvparse
ebml linux matroska matroska-files mkv mkv2mkv multimedia python video webm xml xml2mkv
Last synced: 6 days ago
JSON representation
Simple Python matroska (mkv) reading library, also mkv2xml and xml2mkv
- Host: GitHub
- URL: https://github.com/vi/mkvparse
- Owner: vi
- Created: 2012-02-20T14:29:28.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2022-07-04T23:50:31.000Z (over 2 years ago)
- Last Synced: 2024-11-01T10:42:16.614Z (13 days ago)
- Topics: ebml, linux, matroska, matroska-files, mkv, mkv2mkv, multimedia, python, video, webm, xml, xml2mkv
- Language: Python
- Homepage:
- Size: 88.9 KB
- Stars: 61
- Watchers: 6
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Simple easy-to-use hacky matroska parser
Define your handler class:
class MyMatroskaHandler(mkvparse.MatroskaHandler):
def tracks_available(self):
...def segment_info_available(self):
...def frame(self, track_id, timestamp, data, more_laced_blocks, duration, keyframe_flag, invisible_flag, discardable_flag):
...and `mkvparse.mkvparse(file, MyMatroskaHandler())`
Supports lacing and setting global timecode scale, subtitles (BlockGroup). Does not support cues, tags, chapters, seeking and so on. Supports resyncing when something bad is encountered in matroska stream.
Also contains example of generation of Matroska files from python
Also contains mkv2xml and xml2mkv: tools that convert Matroska files to/from XML plaintext. [Example XML file](http://vi-server.org/pub/xml2mkv_test.xml) . Example command:
$ cat test3.mkv | ./mkv2xml | ./xml2mkv | mplayer - # convert to XML and back and play
Subtitles should remain as text, binary data gets encoded to hex.
Licence=MIT