MPEG-DASH MPD(Media Presentation Description) Parser
Project description
python-mpegdash
MPEG-DASH MPD (Media Presentation Description) Parser compatible with Python 3+.
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.
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.4.1.tar.gz
(12.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
mpegdash-0.4.1-py3-none-any.whl
(11.0 kB
view details)
File details
Details for the file mpegdash-0.4.1.tar.gz.
File metadata
- Download URL: mpegdash-0.4.1.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e31d81e1f0184cc456553ef2a4a1de1c662972b8ce04b687c1854180912759e6
|
|
| MD5 |
36767d75a24dac6b054c69ffc4fd15a9
|
|
| BLAKE2b-256 |
4810fc39d56bce11d703617435a47843c7c33fa0f84635c6136279c9f73ecd5b
|
File details
Details for the file mpegdash-0.4.1-py3-none-any.whl.
File metadata
- Download URL: mpegdash-0.4.1-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
788e559b73acbf9175422548c58a4c441486c0ce0633fa10f77097bfffeaad4d
|
|
| MD5 |
d6a0816d6fb1baf4ab71985a3b04edfc
|
|
| BLAKE2b-256 |
caa07a2734a7d734d81b6627ac1c470ce388f5a80e5669d9803a5c3c179ca84f
|