semvec/pypi-packages huggingface dataset:
pybenzinaparse 0.2.2
MP4 / ISO base media file format (ISO/IEC 14496-12 - MPEG-4 Part 12) file parser
License: The MIT License

#############################################
MP4 ISO Base Media File Format Parser Library
#############################################

Parses out and returns a limited set of MP4 boxes

*****
Usage
*****

Parse boxes
===========

.. code-block:: python

   import bitstring as bs

   from pybenzinaparse import Parser

   bstr = bs.ConstBitStream(filename="my.mp4")
   for box in Parser.parse(bstr):
       print box.header.type
       # Load the box content in memory
       box.load(bstr)

Check is MP4 file
=================

Reads the first box header at byte 0. Returns `False` if box header does not exist or is invalid

.. code-block:: python

   >>> pybenzinaparse.Parser.is_mp4(filename='my.mp4')
   True
   >>> pybenzinaparse.Parser.is_mp4(filename='/etc/resolv.conf')
   False