Know which playlist you opened

An HLS master playlist lists variant streams and optional renditions such as alternate audio. A media playlist lists the segments for one stream. Both commonly use the m3u8 extension, so inspect the tags before assuming what the URL represents.

Adaptive playback requires multiple encoded renditions and a master playlist that describes their bandwidth and codecs. A single media playlist can play successfully but cannot switch quality levels by itself.

Debug in dependency order

Start with the playlist response, then follow the exact segment URLs it contains. Relative paths resolve against the playlist URL, and every playlist, key and segment must be reachable by the browser under the required cross-origin policy.

  • Confirm an HTTP 200 response
  • Use the expected HLS MIME type
  • Check CORS on playlists, keys and segments
  • Verify that the browser supports the encoded audio and video codecs

Native and scripted playback differ

Safari commonly plays HLS through native media support. Other modern browsers generally use Media Source Extensions through a JavaScript HLS engine. The two paths can expose different error messages and codec limits, so test both when broad compatibility matters.

Use browser conversion for prototypes

A browser-based FFmpeg workflow is useful for short local tests and for learning package structure. Long videos, adaptive ladders, encryption and production-scale throughput belong in a native encoding pipeline with measured bitrate, keyframe and segment settings.

Upload the playlist and every segment together, preserve their relative paths and test through HTTPS from the same kind of origin policy used in production.

Primary references

Read the specification

RFC Editor · RFC 8216HTTP Live StreamingApple DeveloperHTTP Live Streaming overview

Put the guide into practice

Open the related browser tools and test the workflow with a synthetic sample

M3U8 Video Player Video to M3U8