m3u8 6.0.0
pip install m3u8
Latest version
Released:
Python m3u8 parser
Navigation
Verified details
These details have been verified by PyPIMaintainers
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT
- Author: Globo.com
- Requires: Python >=3.7
Project description
m3u8
Python m3u8 parser.
Documentation
Loading a playlist
To load a playlist into an object from uri, file path or directly from
string, use the load/loads
functions:
import m3u8
playlist = m3u8.load('http://videoserver.com/playlist.m3u8') # this could also be an absolute filename
print(playlist.segments)
print(playlist.target_duration)
# if you already have the content as string, use
playlist = m3u8.loads('#EXTM3U8 ... etc ... ')
Dumping a playlist
To dump a playlist from an object to the console or a file, use the
dump/dumps
functions:
import m3u8
playlist = m3u8.load('http://videoserver.com/playlist.m3u8')
print(playlist.dumps())
# if you want to write a file from its content
playlist.dump('playlist.m3u8')
Supported tags
- #EXT-X-TARGETDURATION
- #EXT-X-MEDIA-SEQUENCE
- #EXT-X-DISCONTINUITY-SEQUENCE
- #EXT-X-PROGRAM-DATE-TIME
- #EXT-X-MEDIA
- #EXT-X-PLAYLIST-TYPE
- #EXT-X-KEY
- #EXT-X-STREAM-INF
- #EXT-X-VERSION
- #EXT-X-ALLOW-CACHE
- #EXT-X-ENDLIST
- #EXTINF
- #EXT-X-I-FRAMES-ONLY
- #EXT-X-BITRATE
- #EXT-X-BYTERANGE
- #EXT-X-I-FRAME-STREAM-INF
- #EXT-X-IMAGES-ONLY
- #EXT-X-IMAGE-STREAM-INF
- #EXT-X-TILES
- #EXT-X-DISCONTINUITY
- #EXT-X-CUE-OUT
- #EXT-X-CUE-OUT-CONT
- #EXT-X-CUE-IN
- #EXT-X-CUE-SPAN
- #EXT-OATCLS-SCTE35
- #EXT-X-INDEPENDENT-SEGMENTS
- #EXT-X-MAP
- #EXT-X-START
- #EXT-X-SERVER-CONTROL
- #EXT-X-PART-INF
- #EXT-X-PART
- #EXT-X-RENDITION-REPORT
- #EXT-X-SKIP
- #EXT-X-SESSION-DATA
- #EXT-X-PRELOAD-HINT
- #EXT-X-SESSION-KEY
- #EXT-X-DATERANGE
- #EXT-X-GAP
- #EXT-X-CONTENT-STEERING
Frequently Asked Questions
Running Tests
$ ./runtests
Contributing
All contributions are welcome, but we will merge a pull request if, and only if, it
- Has tests
- Follows the code conventions
If you plan to implement a new feature or something that will take more than a few minutes, please open an issue to make sure we don't work on the same thing.
Project details
Verified details
These details have been verified by PyPIMaintainers
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT
- Author: Globo.com
- Requires: Python >=3.7
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file m3u8-6.0.0.tar.gz
.
File metadata
- Download URL: m3u8-6.0.0.tar.gz
- Upload date:
- Size: 42.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/41.2.0 requests-toolbelt/0.10.1 tqdm/4.64.1 CPython/2.7.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ade990a1667d7a653bcaf9413b16c3eb5cd618982ff46aaff57fe6d9fa9c0fd |
|
MD5 | af97e769de7d9b128f214d190c084b54 |
|
BLAKE2b-256 | 9ba573697aaa99bb32b610adc1f11d46a0c0c370351292e9b271755084a145e6 |
File details
Details for the file m3u8-6.0.0-py3-none-any.whl
.
File metadata
- Download URL: m3u8-6.0.0-py3-none-any.whl
- Upload date:
- Size: 24.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/41.2.0 requests-toolbelt/0.10.1 tqdm/4.64.1 CPython/2.7.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 566d0748739c552dad10f8c87150078de6a0ec25071fa48e6968e96fc6dcba5d |
|
MD5 | 52e59184a825de8e24abcc03f63f90d6 |
|
BLAKE2b-256 | f83150f3c38b38ff28635ff9c4a4afefddccc5f1b57457b539bdbdf75ce18669 |