// the find
globocom/m3u8
Python m3u8 Parser for HTTP Live Streaming (HLS) Transmissions
A pure Python parser (and writer) for M3U8/HLS playlists, maintained by Globo — the Brazilian broadcaster that actually streams live TV with it. Good fit for anyone building a video pipeline who needs to read, inspect, or rewrite manifests without hand-rolling an HLS tag parser.
Tag coverage is unusually deep — it handles the fiddly low-latency HLS tags (EXT-X-PART, EXT-X-PRELOAD-HINT, EXT-X-SKIP, EXT-X-RENDITION-REPORT) and ad-insertion markers (SCTE-35, CUE-OUT/IN/SPAN) that most hobby parsers skip entirely. load/dump is symmetric, so you can parse a manifest, mutate segments or attributes, and dump back to valid m3u8 text instead of just read-only access. It's been running in production at a major broadcaster for over a decade, which is a better correctness signal than star count for something this spec-heavy. CI runs ruff plus a real test suite, and contributions are gated on tests, which keeps the parser from rotting.
It's a parser, not a client — there's no segment downloading, buffering, or live-playlist polling built in, so you're writing that loop yourself even though HLS almost always means polling a live manifest on a timer. httpclient.py is synchronous only, no asyncio support, which is awkward if your consumer is already async. No visible type hints or py.typed marker in the source layout, so editor autocomplete on the returned Playlist/Segment objects will be weak. Last push was January 2025, and spec compliance for brand-new tags will lag until someone files a PR — fine for a mature parser, but don't expect day-one support for whatever HLS adds next.