--- id: pymp4 version: "1.4.0" license: Apache-2.0 license_treatment: permissive maintenance: dormant --- # pymp4 — Python parser for MP4 boxes License: permissive · Maintenance: dormant · Downloads: 931.6K/mo ## What it is and what it does pymp4 is a Python parser and builder for MP4 box structures, the fundamental building blocks of MP4 files. It wraps the construct library to provide a declarative interface for reading and writing MP4 metadata boxes—the hierarchical structures that describe video codecs, audio properties, timing, and other file-level attributes. You use it to inspect what's inside an MP4 file at the binary level or to programmatically construct valid MP4 box data. The package is lightweight and has low install friction, depending only on construct. It targets developers who need to work with MP4 internals rather than high-level video playback or encoding. The codebase is in Beta status and has been dormant since late 2023, so it is stable for its current scope but receives no active maintenance. Use it for: - Extract codec and format metadata from MP4 files without decoding video frames. - Validate or repair MP4 box structures in automated media processing pipelines. - Build custom MP4 headers or metadata boxes for streaming or archival workflows. - Inspect ftyp (file type), moov (movie), and mdat (media data) box hierarchies for debugging. - Integrate MP4 parsing into media analysis or transcoding tools that need binary-level access. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses and builds MP4 box structures from binary data using the construct library, enabling programmatic inspection and manipulation of MP4 file metadata. Yes, if you need to parse or build MP4 box structures at the binary level and can tolerate dormant maintenance. The package is lightweight, has no known vulnerabilities, and uses a permissive license. Install only if you are comfortable with no active bug fixes or feature development; for production use, verify that its scope matches your MP4 variant and box types. ## Install pip install pymp4 uv add pymp4 poetry add pymp4 ## Installing pymp4 Before you install: Low friction installation with a single runtime dependency (construct). The package is dormant—last commit was 2023-11-30 and no release for over 1195 days—so expect no active maintenance or bug fixes. License in practice: Apache-2.0 is permissive, allowing commercial and private use with minimal restrictions; you must include a copy of the license and state significant changes. Quickstart: from pymp4.parser import Box from io import BytesIO # Parse MP4 box from binary data ftyp = Box.parse(b'\x00\x00\x00\x18ftypiso5\x00\x00\x00\x01iso5avc1') print(ftyp.type, ftyp.major_brand) # Build MP4 box from dictionary data = Box.build(dict(type=b"ftyp", major_brand="iso5", minor_version=1, compatible_brands=["iso5", "avc1"])) Verify before relying: - Whether the package handles all MP4 box types or only a subset of the specification. - Current compatibility with modern MP4 variants and encoding standards beyond what the classifiers indicate. - Whether dormancy means the package is stable and complete or abandoned and at risk of bitrot. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 931.6K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags mp4 box parser, mp4 file structure parsing, mp4 metadata extraction, binary mp4 parsing, mp4 toolkit, construct-based mp4, mp4-parsing, binary-format, media-metadata [View on SkillFed](https://skillfed.io/packages/pymp4) · [View on PyPI](https://pypi.org/project/pymp4/)