What Is an M3U8 File? HLS Playlists Explained
What an M3U8 file is
An M3U8 file is a text playlist. In HLS it is the file a player downloads first: it lists either the pieces of a video (media segments) or several other playlists (different quality levels). It is not the video itself, so opening an M3U8 file in a text editor shows lines of text and web addresses, not pictures.
The HLS specification, RFC 8216, says a Playlist is either a Media Playlist or a Master Playlist, and that both are UTF-8 text files containing URIs and descriptive tags. It also says the format is derived from the older M3U playlist format and inherits two tags from it, EXTM3U and EXTINF. The extension .m3u8 is what the RFC requires, along with .m3u, if a playlist is identified by its path: it says each Playlist file MUST be identifiable either by the path of its URI, which ends in .m3u8 or .m3u, or by the HTTP Content-Type application/vnd.apple.mpegurl or audio/mpegurl.
Media Playlist: the list of segments
A Media Playlist lists the segments of one version of the video:
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXTINF:9.009,
http://media.example.com/first.ts
#EXTINF:9.009,
http://media.example.com/second.ts
#EXTINF:3.003,
http://media.example.com/third.ts
#EXT-X-ENDLIST| Line | What the RFC says it means |
|---|---|
#EXTM3U | The format identifier tag. It must be the first line. |
#EXT-X-TARGETDURATION:10 | The maximum length of any media segment, in seconds. The tag is required in a Media Playlist. |
#EXTINF:9.009, | The duration of the media segment on the next line. |
http://…/first.ts | The URI of a media segment (here an MPEG-2 Transport Stream file). |
#EXT-X-ENDLIST | No more media segments will be added to this playlist. A live playlist leaves it out until the broadcast ends. |
Master Playlist: the list of quality levels
A Master Playlist points to several Media Playlists, one per Variant Stream. This example is adapted from the RFC:
#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=1280000,AVERAGE-BANDWIDTH=1000000
http://example.com/low.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2560000,AVERAGE-BANDWIDTH=2000000
http://example.com/mid.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=7680000,AVERAGE-BANDWIDTH=6000000
http://example.com/hi.m3u8BANDWIDTH is required on every EXT-X-STREAM-INF tag and is the peak segment bit rate in bits per second; AVERAGE-BANDWIDTH is the average. The RFC also defines optional CODECS and RESOLUTION attributes, and recommends RESOLUTION if the Variant Stream includes video. The RFC warns that an inaccurate BANDWIDTH value can cause playback stalls or prevent clients from playing the variant. A player that supports adaptive bitrate chooses between the lines; one that does not plays the first.
How to open or play an M3U8 file
- To read it: open it in any text editor.
- To play an M3U8 link in your browser: paste the address into the free HLS player. It checks whether the playlist can be reached and played, and explains failures in plain words.
- Local files: an M3U8 file saved on your computer is only a playlist. It plays only if the segment addresses inside it are web links your player can reach (or relative paths to segment files stored next to it).
- Safari and Apple devices have built-in HLS support; most other browsers need a library such as hls.js, which the HLS player on this site uses.
To check an MP4 or DASH link as well, use the online video player.
Common M3U8 problems
- The link works in a desktop player but not in a browser. Browsers need the server to send CORS headers before a web page may read the playlist and segments, and on an HTTPS page they block
http://media. - 404 on a live stream. The playlist may not exist until the encoder starts sending.
- Invalid file. The RFC says Playlists that violate its rules are invalid and clients MUST fail to parse them. It lists, for example, that playlists must be UTF-8 without a byte order mark and must not contain control characters other than carriage return and line feed.
- Wrong content type. If the file is served without a
.m3u8path or the right Content-Type, the RFC says clients SHOULD refuse to parse it.
Where M3U8 fits
M3U8 files are only the index. The wider picture is in what is HLS, and the ingest side of a live stream is covered in what is RTMP and RTMP vs SRT.
Try it with Multistream Platform. Send one RTMP or SRT stream and relay it to YouTube, Twitch, Facebook, Kick, TikTok and custom endpoints. Start on the free Starter plan (2 channels, 20 streaming hours a month) and see the pricing page for paid plans.
Sources
- RFC 8216: HTTP Live Streaming (R. Pantos and W. May, August 2017; Informational)
- Apple Developer: HTTP Live Streaming (HLS)
Platform figures were checked on October 5, 2026. Platforms change their recommendations, so confirm against the current documentation before you go live.
Frequently asked questions
Keep learning
HTTP Live Streaming explained: playlists, segments, adaptive bitrate, and how HLS differs from RTMP and SRT.
Read the guideHow an encoder publishes a stream with a server URL and key, the handshake, and RTMP vs RTMPS.
Read the guideHow the two ingest protocols differ, when to choose each and how they behave on unreliable networks.
Read the guideReady to stream everywhere?
Bring your live, hosted, and pre-recorded streams into one platform.