Registry / serialization / pymediainfo-pyrofork

pymediainfo-pyrofork

JSON →
library6.0.2pypypi✓ verified 87d ago

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-pyrofork
INSTALL
IMPORT
SIG · PYMEDIAINFO-PYROFO
P
pymediainfo-pyrofork
serializationpythonv6.0.2
Install
1.6s avg
Import
152ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v6.0.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.156s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.148s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MediaInfo
from pymediainfo import MediaInfo
from pymediainfo import MediaInfoParser
MediaInfoParser was renamed to MediaInfo in a previous version.

Parse a media file and print general track information as dict.

from pymediainfo import MediaInfo media_info = MediaInfo.parse('video.mp4') print(media_info.general_tracks[0].to_data())
Debug
Known issues
breakingThe mediainfo CLI tool must be installed separately on the system. Python-only install may fail at runtime with "FileNotFoundError".
fix
Install mediainfo using system package manager (e.g., apt install mediainfo, brew install mediainfo, or download from https://mediaarea.net/en/MediaInfo).
affects: all
deprecatedThe old `MediaInfo.parse` returned a `MediaInfo` object; now it returns a `MediaInfoList` if multiple files are parsed. Access single file results with indexing.
fix
Use `MediaInfo.parse('file.mp4')[0]` or iterate over the result if multiple files.
affects: >=6.0
gotchaEmpty fields in mediainfo output are returned as None, not empty string. Comparisons may fail if expecting string.
fix
Use `field or ''` or check for None explicitly.
affects: all
Errors
Common errors & fixes
FileNotFoundError: [Errno 2] No such file or directory: 'mediainfo'
mediainfo CLI not installed on system PATH.
fix
Install mediainfo via system package manager or download from MediaInfo website.
AttributeError: module 'pymediainfo' has no attribute 'MediaInfoParser'
Using deprecated class name.
fix
Use `from pymediainfo import MediaInfo` and `MediaInfo.parse(...)`.
TypeError: 'MediaInfoList' object is not subscriptable
Old code accessing result as single object, but new version returns list for single file (can be subscripted). This error may appear if the returned type is not a list but a single object; actually in this case it's subscriptable, but if an older script treats it as a single object, it will fail.
fix
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`.
Upgrade
Version history
6.0.2latest on PyPI · released Oct 8, 2024
Audit
Dependencies
pymediainfooptionalThis is a fork; the original package may conflict if installed simultaneously
Agent activity
5 hits · last 30 days
node
4
Resources
pymediainfo-pyrofork — pip install pymediainfo-pyrofork · libregistry