M3U8 / HLS Playlist Parser

Parse and inspect HLS .m3u8 playlist files — segment list, bandwidths, keys

Ad placeholder (leaderboard)

Inspect any HLS playlist without a player

An M3U8 parser breaks down an HLS playlist so you can see exactly what a video player would: the quality variants, the segment list, encryption, and timing tags. It is useful for debugging streaming setups, verifying an encoder’s output, or auditing a stream’s structure — all locally.

How it works

The parser follows the HLS specification (RFC 8216). It first confirms the #EXTM3U header, then decides the playlist type: if any #EXT-X-STREAM-INF tag is present it is a master playlist, otherwise a media playlist.

For master playlists it reads each #EXT-X-STREAM-INF attribute list — BANDWIDTH, RESOLUTION, CODECS, FRAME-RATE — pairing it with the URI on the following line, and also lists #EXT-X-MEDIA alternate audio and subtitle renditions. For media playlists it walks the tags in order, attaching each #EXTINF duration, #EXT-X-BYTERANGE, and #EXT-X-DISCONTINUITY to the segment URI that follows, and reads #EXT-X-VERSION, #EXT-X-TARGETDURATION, #EXT-X-KEY, and #EXT-X-ENDLIST. Attribute lists are split with a quote-aware regex so commas inside quoted CODECS values are not mistaken for separators.

Tips and notes

  • Variant streams are sorted by bandwidth (highest first) so the top entry is the best-quality rendition.
  • A missing #EXT-X-ENDLIST means the playlist is live; players would re-fetch it on the target-duration interval.
  • The #EXT-X-KEY method tells you the encryption scheme — NONE, AES-128, or SAMPLE-AES. The key URI is where the player fetches the decryption key.
  • The parser works on local text only, so it cannot follow relative segment URIs to a server; it reports them exactly as written.
Ad placeholder (rectangle)