Skip to content

Python m3u8 Parser for HTTP Live Streaming (HLS) Transmissions

License

Notifications You must be signed in to change notification settings

openwurl/openm3u8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

613 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openm3u8

openm3u8 is a Python library for parsing .m3u8 files, which are used as HTTP Live Streaming (HLS) playlists.

This project is a fork of m3u8 and is maintained by Wurl.

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 openm3u8

playlist = openm3u8.load('http://videoserver.com/playlist.m3u8')
print(playlist.segments)
print(playlist.target_duration)

# if you already have the content as string, use

playlist = openm3u8.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 openm3u8

playlist = openm3u8.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

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.

About

Python m3u8 Parser for HTTP Live Streaming (HLS) Transmissions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 84