Skip to main content

python-mpegdash

MPEG-DASH MPD (Media Presentation Description) Parser compatible with Python 3+.

Build Status License


Installation

$ pip install mpegdash

Test

$ python -m unittest discover

Usage

from mpegdash.parser import MPEGDASHParser

# Parse from file path
mpd_path = './tests/mpd-samples/sample-001.mpd'
mpd = MPEGDASHParser.parse(mpd_path)

# Parse from url
mpd_url = 'http://yt-dash-mse-test.commondatastorage.googleapis.com/media/motion-20120802-manifest.mpd'
mpd = MPEGDASHParser.parse(mpd_url)

# Parse from string
mpd_string = '''
<MPD xmlns="urn:mpeg:DASH:schema:MPD:2011" mediaPresentationDuration="PT0H1M52.43S" minBufferTime="PT1.5S"
profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" type="static">
  <Period duration="PT0H1M52.43S" start="PT0S">
    <AdaptationSet>
      <ContentComponent contentType="video" id="1" />
      <Representation bandwidth="4190760" codecs="avc1.640028" height="1080" id="1" mimeType="video/mp4" width="1920">
        <BaseURL>motion-20120802-89.mp4</BaseURL>
        <SegmentBase indexRange="674-981">
          <Initialization range="0-673" />
        </SegmentBase>
      </Representation>
    </AdaptationSet>
  </Period>
</MPD>
'''
mpd = MPEGDASHParser.parse(mpd_string)

# Write to xml file
MPEGDASHParser.write(mpd, './tests/mpd-samples/output.mpd')

License

This project is released under the MIT license. Please read and agree to the license before use, it can be found in the LICENSE file.

Metadata

Release files for mpegdash 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mpegdash 0.4.1
File Size Uploaded Provenance Actions
mpegdash-0.4.1.tar.gz 12.7 kB Without provenance Details for mpegdash-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mpegdash 0.4.1
File Interpreter ABI Platform Actions
mpegdash-0.4.1-py3-none-any.whl Python 3 none any Details for mpegdash-0.4.1-py3-none-any.whl

Total release size: 23.7 kB

Release files / mpegdash-0.4.1.tar.gz

Download URL mpegdash-0.4.1.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e31d81e1f0184cc456553ef2a4a1de1c662972b8ce04b687c1854180912759e6
BLAKE2b-256 checksum
How to use checksums
4810fc39d56bce11d703617435a47843c7c33fa0f84635c6136279c9f73ecd5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / mpegdash-0.4.1-py3-none-any.whl

Download URL mpegdash-0.4.1-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
788e559b73acbf9175422548c58a4c441486c0ce0633fa10f77097bfffeaad4d
BLAKE2b-256 checksum
How to use checksums
caa07a2734a7d734d81b6627ac1c470ce388f5a80e5669d9803a5c3c179ca84f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for mpegdash 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page