Implementation of a parser for MP4 in pure python.
Project description
yapyMP4
Why another one?
"Yet Another Parser in Python for Mp4"
This was implemented as a "learning exercise" and a thin (metadata reading) interface for the MP4 container format. It is not as complete as other standard tools (such as ffmpeg) but this code aspires to provide some functionality that is only available through c/c++ interfaces for manipulating and getting meta-data about parts of mp4 files.
The initial motivation is/was to be able to request and partially download mp4
files from streaming endpoints (such as youtube) while only downloading the first few bytes of metadata (in order to learn the chunk/sample offsets).
Usage:
(see also the notebook)
from src.ypapymp4 import MP4Atom
# This will throw an error if the class does not find all the expected root nodes if check_offsets_avail is set to true
root = MP4Atom.init_from_chunk('test.mp4', head_chunk_max_size = 200000,check_offsets_avail = False)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for yapymp4-0.0.2a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a15acb0470d8ff19f032f0ffa1d8b8151da2f39da9d90253faf9589db37e1b18 |
|
MD5 | 56f200d9c26b35893dde6d853c7f94d9 |
|
BLAKE2b-256 | 2a1b93ad994daa02dcc00d5e573eab48ba784cb77af4607085670e9ae0273b50 |