A Python wrapper for the mediainfo library, forked to support newer Python versions and provide up-to-date bindings. Current version is 6.0.2, requiring Python 3.9+. Released regularly with mediainfo dependency updates.
pip install pymediainfo-pyroforkVerified import paths — ran on the pinned version, not inferred.
Parse a media file and print general track information as dict.
Install mediainfo using system package manager (e.g., apt install mediainfo, brew install mediainfo, or download from https://mediaarea.net/en/MediaInfo).
Use `MediaInfo.parse('file.mp4')[0]` or iterate over the result if multiple files.Use `field or ''` or check for None explicitly.
Install mediainfo via system package manager or download from MediaInfo website.
Use `from pymediainfo import MediaInfo` and `MediaInfo.parse(...)`.
Use `result = MediaInfo.parse('file.mp4')` then `result.general_tracks[0]` if result is not a list; check type. For consistency, use `track = result[0] if isinstance(result, list) else result`.