MPEG-DASH MPD(Media Presentation Description) Parser
Project description
python-mpegdash
MPEG-DASH MPD(Media Presentation Description) Parser compatible with Python2.6+ and Python3
Install
$ pip install mpegdash
Test
$ python -m unittest discover
$ python3 -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')
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
mpegdash-0.2.0.tar.gz
(8.8 kB
view details)
Built Distributions
mpegdash-0.2.0-py2-none-any.whl
(10.4 kB
view details)
File details
Details for the file mpegdash-0.2.0.tar.gz
.
File metadata
- Download URL: mpegdash-0.2.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/38.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5942128e68cb7c240682bdb54e31a5cfcc89874dce109291e0310f66468f2f6 |
|
MD5 | 9e7df25e357ad304f7dc5269d70ca11a |
|
BLAKE2b-256 | 379c8fc4d32078b77746100e8b93d82c01e0e5982d96bdb3103de93cc6a1eb50 |
File details
Details for the file mpegdash-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: mpegdash-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/38.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fe2046ee43591a999967c20790be57c54231d7e57321ef7728e89bc093df250 |
|
MD5 | 8f7b308839db5a4f8946402f395a5cb1 |
|
BLAKE2b-256 | 7658cfbe11792413fceac1e0906510c500b66670fe8e40540c5aa5c738df2928 |
File details
Details for the file mpegdash-0.2.0-py2-none-any.whl
.
File metadata
- Download URL: mpegdash-0.2.0-py2-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/2.7.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9369252ceb914ce3e3d002cba82b44a63f1dc01cacd620a8269f8b662248188 |
|
MD5 | 6153ed89258f9d96daf3ecc47d31e537 |
|
BLAKE2b-256 | 780bce0b16fd51ea4b366c251714a0e77cb4b032c258d050fe3b0066570b2416 |