Skip to main content

Implementation of a parser for MP4 in pure python.

Project description

yapyMP4

Open In Colab

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yapymp4-0.0.2a0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yapymp4-0.0.2a0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file yapymp4-0.0.2a0.tar.gz.

File metadata

  • Download URL: yapymp4-0.0.2a0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.28.1 setuptools/59.5.0 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.8.10

File hashes

Hashes for yapymp4-0.0.2a0.tar.gz
Algorithm Hash digest
SHA256 8f01a3a4f24d4c4586a92285b593b21491b5a9ca5dfc1ea1ac492cb41359deac
MD5 5d2c8327610e5356b206667ed856501d
BLAKE2b-256 d73d658736282bb90b47f3e1e2140d940d200b27f7cb763890d30ecfdf160a6e

See more details on using hashes here.

File details

Details for the file yapymp4-0.0.2a0-py3-none-any.whl.

File metadata

  • Download URL: yapymp4-0.0.2a0-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.28.1 setuptools/59.5.0 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.8.10

File hashes

Hashes for yapymp4-0.0.2a0-py3-none-any.whl
Algorithm Hash digest
SHA256 a15acb0470d8ff19f032f0ffa1d8b8151da2f39da9d90253faf9589db37e1b18
MD5 56f200d9c26b35893dde6d853c7f94d9
BLAKE2b-256 2a1b93ad994daa02dcc00d5e573eab48ba784cb77af4607085670e9ae0273b50

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page