---
title: What Is an M3U8 File? HLS Playlists Explained
description: Learn what is M3U8, how an M3U8 file powers HLS playlists, and how M3U8 streams deliver adaptive video across devices.
---

[Content Delivery Network Blog](https://blog.blazingcdn.com/en-us)

# [What Is an M3U8 File? HLS Playlists Explained](https://blog.blazingcdn.com/en-us/what-is-an-m3u8-file-hls-playlists-explained)

 Written by [BlazingCDN](https://blog.blazingcdn.com/en-us/author/blazingcdn) | Sep 30, 2026, 7:32:01 AM

An M3U8 file is a UTF-8 encoded plain-text playlist used by HTTP Live Streaming (HLS), the adaptive streaming protocol standardized as RFC 8216. It contains no video itself. It lists the addresses of short media segments, typically 2 to 10 seconds each, or points to other playlists at different bitrates. A player fetches all of these over ordinary HTTP.

In practice, answering "what is M3U8" means describing two file roles. A master playlist, which the current HLS draft calls a multivariant playlist, advertises the available renditions. A media playlist lists the segments for one rendition. Each one is a few hundred bytes to a few kilobytes of text that controls every request the player makes.

## **What Is an M3U8 File and How Does an HLS Playlist Work?**

The player first requests the master playlist and reads each EXT-X-STREAM-INF entry. Each entry declares a bandwidth, a resolution and a codec string. The player picks a rendition from its throughput estimate and requests that rendition's media playlist. It then fetches segments sequentially. It re-evaluates the rendition choice after every segment, and that repeated choice is the whole mechanism behind adaptive bitrate.

A minimal master playlist looks like this:

> #EXTM3U
> 
> #EXT-X-STREAM-INF:BANDWIDTH=5000000,RESOLUTION=1920x1080,CODECS="avc1.640028,mp4a.40.2"
> 
> 1080p/index.m3u8
> 
> #EXT-X-STREAM-INF:BANDWIDTH=1400000,RESOLUTION=854x480,CODECS="avc1.4d401e,mp4a.40.2"
> 
> 480p/index.m3u8

And one of its media playlists:

> #EXTM3U
> 
> #EXT-X-VERSION:7
> 
> #EXT-X-TARGETDURATION:6
> 
> #EXT-X-MEDIA-SEQUENCE:2680
> 
> #EXT-X-MAP:URI="init.mp4"
> 
> #EXTINF:6.000,
> 
> seg2680.m4s
> 
> #EXTINF:6.000,
> 
> seg2681.m4s

### Live vs. VOD M3U8 streams

A video-on-demand (VOD) media playlist is complete and ends with EXT-X-ENDLIST. A player reads it once. A live playlist has no end tag and works as a sliding window. The encoder appends segments and advances EXT-X-MEDIA-SEQUENCE. The player reloads the playlist about once per target duration, which for a 6-second target works out to 10 reloads per minute per viewer, per rendition.

| Tag | Playlist type | What it controls |
| --- | --- | --- |
| EXT-X-STREAM-INF | Master | Rendition bandwidth, resolution and codecs used for ABR selection |
| EXT-X-TARGETDURATION | Media | Maximum segment length and the live reload interval |
| EXT-X-MEDIA-SEQUENCE | Media | Sequence number of the first listed segment, which lets the player detect stale playlists |
| EXT-X-MAP | Media | Initialization segment for fragmented MP4 (fMP4) and CMAF |
| EXT-X-ENDLIST | Media | Marks the playlist as complete (VOD) and stops reloads |

For delivery, EXT-X-TARGETDURATION matters most, because it sets both segment size and how often every live viewer returns to the playlist.

## **Where M3U8 Streams Sit in the Delivery Stack**

An encoder or packager writes playlists and segments to an origin, and a CDN fronts both. The two object types behave in opposite ways. Segments are immutable and heavy. Playlists are tiny, mutable and requested constantly, so a single cache rule for both is always wrong for one of them.

In HTTP Live Streaming (HLS), standardized as RFC 8216 in 2017, a live media playlist is re-fetched roughly once per target duration, typically every 6 seconds, while each segment is fetched once and never changes. That asymmetry is why CDN caching for M3U8 streams splits in two: live playlists get a TTL of about half the target duration, and segments are cached for hours or days.

Request collapsing matters just as much. Without it, a spike of 50,000 viewers can turn every playlist expiry into a burst of simultaneous origin fetches. Pairing short playlist TTLs with long segment TTLs is straightforward on a CDN with [**per-path cache rules for HLS playlist and segment delivery**](https://blazingcdn.com/features/).

## **M3U8 vs. M3U, MPD and Segment Files**

**M3U8 vs. M3U:** M3U is the older Winamp-era playlist format with no fixed encoding. M3U8 is the same syntax, but the encoding is required to be UTF-8. HLS adds dozens of EXT-X tags on top of that syntax.

**M3U8 vs. MPD:** An MPD is the XML manifest for MPEG-DASH. It plays the same role as an HLS playlist but uses a different grammar. Because both can reference the same CMAF fMP4 segments, one set of segments can serve both manifests.

**M3U8 vs. TS or M4S:** The .ts (MPEG-2 Transport Stream) and .m4s (fMP4) files are the actual audio and video. The M3U8 file only sequences them.

## **How to Open and Test an M3U8 File**

VLC plays a playlist address through its network stream option. Safari plays HLS natively. Chromium and Firefox pages typically use a JavaScript player such as hls.js on top of Media Source Extensions. For inspection, ffprobe reports renditions and codecs, and Apple's mediastreamvalidator flags spec violations.

Then check the response headers:

- Content-Type should be application/vnd.apple.mpegurl.
- Cache-Control should differ between playlists and segments.
- Access-Control-Allow-Origin must be present when a browser player loads the stream cross-origin.
- On a live playlist, the Age header should never exceed the target duration.

## **Common Misconceptions About HLS Playlists**

"Downloading the M3U8 downloads the video." It downloads a text file of pointers, and the segments must be fetched and remuxed separately. "HLS means .ts segments." fMP4 segments have been supported since 2016 and are now the default for CMAF workflows. "Long playlist TTLs save origin load." They also freeze live streams: a playlist cached for 60 seconds is 10 segments stale.

## **FAQ: M3U8 File and HLS Playlist Questions**

### How do I open an M3U8 file?

Open an M3U8 file by loading its HTTP address in a player, not by opening the saved text. VLC's network stream option, Safari, and any web page using hls.js will play it. Opening a local copy only works if the segment paths inside it still resolve, which relative paths usually do not once the file is moved.

### How do I convert an M3U8 stream to MP4?

Convert an M3U8 stream to MP4 by remuxing it with ffmpeg in stream-copy mode, using the playlist address as the input. Stream copy avoids re-encoding, so the conversion runs at network speed and keeps the original quality. Encrypted streams using EXT-X-KEY need the key to be reachable, and DRM-protected streams cannot be converted this way.

### Is an M3U8 file the same as HLS?

No. An M3U8 file is the playlist format, and HLS is the full streaming protocol that uses it. HLS also defines the segment formats, encryption, rendition switching and live reload behavior. You can find M3U8 files outside HLS, such as music playlists, but every HLS stream is described by at least one M3U8 playlist.

### Why does my M3U8 live stream freeze or loop?

A live M3U8 stream usually freezes or loops because the player is receiving a stale media playlist. The cause is often a CDN or proxy caching the playlist longer than the target duration. Check the Age header and whether EXT-X-MEDIA-SEQUENCE advances between reloads. If it does not advance, shorten the playlist TTL to about half the target duration.

### What MIME type should an M3U8 file use?

RFC 8216 specifies application/vnd.apple.mpegurl for M3U8 files, and audio/mpegurl is accepted as a legacy alternative. A wrong type such as text/plain or application/octet-stream can make some players and smart-TV clients reject the stream outright. Segments should be served as video/mp2t for Transport Stream or video/mp4 for fMP4.

## **Audit Your Live Playlist Freshness This Week**

Pick one live HLS stream you operate and request its media playlist twice through the CDN, 3 seconds apart. Record the Age header, the Cache-Control value and EXT-X-MEDIA-SEQUENCE for both responses. If Age ever exceeds the target duration, or the sequence number does not move, your viewers are watching stale edges. Next, split cache hit ratio in your logs by file extension. Playlists near a 50 percent hit ratio with segments above 95 percent is a healthy baseline. Anything else is your next ticket.

[View full post](https://blog.blazingcdn.com/en-us/what-is-an-m3u8-file-hls-playlists-explained)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "BlazingCDN"
  },
  "dateModified" : "2026-09-30T07:32:02.171Z",
  "datePublished" : "2026-09-30T07:32:01Z",
  "headline" : "What Is an M3U8 File? HLS Playlists Explained",
  "image" : {
    "@type" : "ImageObject",
    "height" : 768,
    "url" : "https://143144902.fs1.hubspotusercontent-eu1.net/hubfs/143144902/Gemini-Blog/image-Sep-30-2026-07-30-22-7673-AM.jpeg",
    "width" : 1408
  },
  "mainEntityOfPage" : "https://blog.blazingcdn.com/en-us/what-is-an-m3u8-file-hls-playlists-explained",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60.0,
      "url" : "https://143144902.fs1.hubspotusercontent-eu1.net/hubfs/143144902/Logo%20b-3.png",
      "width" : 245.85367
    },
    "name" : "CDN Blog"
  }
}
```