LogoM3U8 To MP4
📅 2026-10-18⏱️ 6 min readStreaming Basics

What Is an M3U8 File? The M3U8 Format Explained in One Read

It's not a video file — it's a "table of contents." This article walks through the internals of M3U8, how it relates to TS segments, and where you'll actually run into it.

You've probably seen one already — you just didn't recognize it

If you've ever tried to save a video from a web page, you may have hit this wall: no "Save video as" in the right-click menu, browser extensions come up empty — yet open DevTools, search for m3u8 in the Network tab, and a handful of URLs pop right out. Sites like this are almost always built on HLS streaming, and M3U8 is the front door.

An M3U8 file is the playlist of the HLS (HTTP Live Streaming) protocol. It's plain text, usually just a few KB. It holds no picture and no sound — it records exactly one thing: how many pieces the video was cut into, where each piece lives, and how long each one runs. The player reads this "table of contents" first, then fetches the actual video data piece by piece.

Quick note on the 8 in the name: it means the file is UTF-8 encoded. Its predecessor M3U only understood Latin characters, and back when IPTV channel lists started mixing in Chinese or Japanese names, mojibake was everywhere — hence the UTF-8 version. Today, when people say M3U8, they almost always mean an HLS playlist.

Open an M3U8 file: what's actually inside

Since it's plain text, Notepad or VS Code opens it just fine. A typical video-on-demand M3U8 looks like this:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXTINF:9.009,
segment000.ts
#EXTINF:9.009,
segment001.ts
#EXTINF:8.341,
segment002.ts
#EXT-X-ENDLIST

Lines starting with # are tags; the rest are segment addresses. #EXTINF gives the duration of the segment that follows, and relative paths are resolved against the location of the M3U8 file itself. A few tags are worth knowing:

  • #EXT-X-ENDLIST: if it's there, this is VOD — the list won't change anymore. Without it, you're likely watching a live stream, and the player will come back every few seconds to refresh the list.
  • #EXT-X-TARGETDURATION: declares the maximum segment duration, which the player uses to plan its buffering.
  • #EXT-X-KEY: means the stream is encrypted, most commonly with AES-128 — you need the key before anything plays.
  • #EXT-X-STREAM-INF: means this is a master playlist pointing to several sub-playlists at different bitrates. Quality switching is exactly this.

The kind that lists segments directly is a "media playlist." There's another layer above it — the "master playlist" — and it looks like this:

#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=800000,RESOLUTION=640x360
360p/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1400000,RESOLUTION=842x480
480p/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2800000,RESOLUTION=1280x720
720p/index.m3u8

It doesn't list segments; it lists several sub-playlists at different resolutions and bitrates. The player opens this master index, measures your connection speed, picks a suitable sub-playlist, and starts pulling segments from there. When you switch quality on a video site, you're literally switching sub-playlists. That's why analyzing an M3U8 by hand often means peeling two layers: what you get first is a table of contents of tables of contents. Seeing no .ts in it doesn't mean the link is broken.

M3U8 and TS segments: the table of contents vs. the book

The actual video data lives in TS (MPEG-TS) segments, usually 2 to 10 seconds each. Cut up an hour-long show and you get hundreds or even thousands of little files. Why not just hand over one whole video file? Three reasons:

  • Play while downloading: the player needs the first two or three segments to start — no waiting for the full file.
  • Surviving flaky networks: if one segment fails, you retry just that one; nothing else is lost.
  • Adaptive bitrate: the same content is cut into multiple resolution and bitrate versions. Good connection gets 1080p, a bad one drops to 480p automatically, and you barely notice the switch.

This also clears up a common confusion: why "downloading an M3U8" with some tools gives you a pile of fragments instead of one video. It's fragmented on the server to begin with — the downloader simply fetches the segments listed in the playlist as-is. Merging them is a separate step.

Where you'll run into M3U8

  • Video sites and long-form platforms: the vast majority distribute with HLS or DASH, and M3U8 is the standard for the former.
  • Live streaming: platform streams and IPTV set-top box channel lists are almost all M3U8 links.
  • Online courses: to make scraping harder, course videos usually go through HLS, and are often encrypted on top.
  • Self-hosted sites: serving longer videos over HLS is far gentler on your server bandwidth than throwing one big MP4 at visitors.

So you've got an M3U8 link — now what?

Depends on what you want. Just want a quick look? Paste the link into the M3U8 player on this site and it plays right away, no software needed. Want to keep it locally or drop it into an editor? Use an M3U8 to MP4 converter to merge the segments into one complete MP4 file.

Two caveats: encrypted streams only convert if you can get the key, and if you hit 401 or 403 errors, hotlink protection is the usual suspect. Also, plenty of M3U8 links carry time-limited signatures and expire after a few hours — that's normal, just grab a fresh one.

Live links deserve their own paragraph. A VOD M3U8 ends with #EXT-X-ENDLIST, so a downloader knows where to stop. A live playlist is a rolling window: new segments keep getting appended at the tail while old ones drop off the front. There's no such thing as "downloading a live stream in one go" — you can only record it while it plays, until you hit stop yourself. If you want to keep a stream, you have to record from the beginning; join halfway and the earlier part is gone for good.

One last persistent myth: renaming an M3U8 file to .mp4 does not turn it into a video. It's still that same few-KB text file. The right way is to download the segments with a tool and merge them into a real MP4.