You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To load a playlist into an object from uri, file path or directly from
string, use the load/loads functions:
importm3u8playlist=m3u8.load('https://videoserver.com/playlist.m3u8') # this could also be an absolute filenameprint(playlist.segments)
print(playlist.target_duration)
# if you already have the content as string, useplaylist=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:
importm3u8playlist=m3u8.load('https://videoserver.com/playlist.m3u8')
print(playlist.dumps())
# if you want to write a file from its contentplaylist.dump('playlist.m3u8')
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.
About
Python m3u8 Parser for HTTP Live Streaming (HLS) Transmissions