mkvinfo
Python library for probing matroska files with mkvmerge
.
Installation
mkvinfo
is available on PyPI, so you can simply use pip to install it.
Usage
from mkvinfo import MKVInfo
mkv = MKVInfo.from_file("./Big Buck Bunny, Sunflower version.mkv")
assert mkv.file_name == "Big Buck Bunny, Sunflower version.mkv"
assert mkv.container.properties.title == "Big Buck Bunny, Sunflower version"
assert mkv.container.properties.writing_application == "mkvmerge v92.0 ('Everglow') 64-bit"
for track in mkv.tracks:
print(f"{track.id} - {track.codec}")
#> 0 - AVC/H.264/MPEG-4p10
#> 1 - MP3
#> 2 - AC-3
License
Distributed under the MIT License. See LICENSE for more information.