Skip to content
forked from globocom/m3u8

Python m3u8 Parser for HTTP Live Streaming (HLS) Transmissions

License

Notifications You must be signed in to change notification settings

daveisfera/m3u8

This branch is 1 commit ahead of, 29 commits behind globocom/m3u8:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b3001f0 · May 23, 2024
May 14, 2024
May 23, 2024
May 23, 2024
Oct 12, 2022
May 13, 2024
May 18, 2012
May 13, 2024
May 13, 2024
Jan 13, 2022
Oct 26, 2023
May 28, 2021
May 14, 2024

Repository files navigation

image image

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

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.

About

Python m3u8 Parser for HTTP Live Streaming (HLS) Transmissions

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.8%
  • Shell 0.2%