--- id: m3u8 version: "6.0.0" license: MIT license_treatment: permissive maintenance: dormant --- # m3u8 — Python m3u8 parser License: permissive · Maintenance: dormant · Downloads: 1.6M/mo ## What it is and what it does m3u8 is a Python parser for m3u8 playlist files, the manifest format used by HTTP Live Streaming (HLS). It reads m3u8 content from URLs, file paths, or strings and exposes the parsed structure as Python objects—segments, duration, media sequences, encryption keys, and dozens of other HLS tags. You can also serialize playlists back to m3u8 text format, making it useful for reading, modifying, and regenerating HLS manifests. The package supports a large set of m3u8 tags defined in RFC 8216 and related HLS specifications, including basic playback metadata (#EXT-X-TARGETDURATION, #EXTINF), encryption (#EXT-X-KEY), adaptive streaming (#EXT-X-STREAM-INF), and newer extensions like partial segments (#EXT-X-PART) and content steering. Its only runtime dependency is backports-datetime-fromisoformat, and it requires Python 3.7 or later. Use it for: - Parse HLS manifests from a video streaming server to extract segment URLs and playback metadata for custom player logic - Modify an existing m3u8 playlist (e.g., update encryption keys or segment paths) and write it back to a file - Extract timing and duration information from live or on-demand HLS streams for analytics or scheduling - Build tooling to validate or audit m3u8 playlists for compliance with HLS specifications ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses and generates m3u8 playlist files (HLS manifests) according to RFC 8216, supporting a comprehensive set of m3u8 tags and allowing you to load playlists from URLs, files, or strings and serialize them back to text. Yes, if you need to work with m3u8 playlists. The package is stable, permissively licensed, has low install friction, and covers a comprehensive set of HLS tags. Maintenance is dormant but not abandoned; the last release was 2024-08-07 and the repository shows recent activity. No known vulnerabilities. ## Install pip install m3u8 uv add m3u8 poetry add m3u8 ## Installing m3u8 Before you install: Low install friction; depends only on backports-datetime-fromisoformat. Maintenance is dormant (737 days since last release), though the repository remains active with a recent commit on 2025-01-31 and 2276 stars. License in practice: MIT license is permissive; you can use this package freely in commercial and private projects with minimal restrictions. Quickstart: import m3u8 # Load from URL or file playlist = m3u8.load('http://videoserver.com/playlist.m3u8') print(playlist.segments) print(playlist.target_duration) # Or load from string playlist = m3u8.loads('#EXTM3U\n#EXT-X-VERSION:3\n#EXTINF:10.0,\nsegment.ts') # Dump back to file playlist.dump('output.m3u8') Verify before relying: - Whether the package handles all modern HLS extensions beyond RFC 8216 in practice, or if some listed tags have incomplete implementation - Performance characteristics when parsing large or deeply nested playlists ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 1.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags m3u8 playlist parser, HLS manifest parsing, m3u8 file reader, HTTP live streaming parser, playlist format converter, hls, streaming, media-format [View on SkillFed](https://skillfed.io/packages/m3u8) · [View on PyPI](https://pypi.org/project/m3u8/)