Explainer · HLS

What is M3U8 and HLS Streaming?

A beginner-friendly explainer of HLS, the streaming protocol that powers most modern video. Plus how to play and download an M3U8 file in 2026.

By the Vidora team 8 min read

If you have ever opened DevTools while watching a video and seen a flood of requests to small .ts files, you have already met HLS. The strange playlist file with the .m3u8 extension is the brain of the operation. This article explains, in plain English, what HLS is, why almost every video site uses it, and how to download an HLS video as a normal MP4 you can save offline.

1. What does .m3u8 actually mean?

An M3U8 file is a UTF-8 encoded playlist. The "M3U" comes from MPEG audio layer 3 URL (yes, like MP3) and the "8" indicates UTF-8 encoding. Despite the name, modern M3U8 files almost never reference MP3s. They reference small video segments.

Here is what a minimal M3U8 file looks like:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:9.97,
segment0.ts
#EXTINF:9.97,
segment1.ts
#EXTINF:9.97,
segment2.ts
#EXT-X-ENDLIST

That is the entire spec for a basic playlist: a header, a list of segment durations, and a list of segment URLs. The video player reads this top to bottom, fetches each segment, and plays them in order. The full HLS spec is more complex (variants, encryption, byte ranges) but the core idea is exactly that simple.

2. How HLS works in plain English

HLS stands for HTTP Live Streaming. Apple invented it in 2009 to ship video on the iPhone over standard HTTP, with no special server protocols. The trick is to chop a video into small chunks (usually 2 to 10 seconds each) and let the player download them as needed.

The key concepts are:

The genius of HLS is that it requires zero special server software. Any boring web server (nginx, S3, Cloudflare R2) can serve M3U8 + segments. This is why CDNs like Bunny.net and Cloudflare Stream love it.

3. M3U8 vs MP4: key differences

Both M3U8 and MP4 deliver video, but they work very differently:

Aspect MP4 M3U8 / HLS
Single file?Yes, one fileNo, a playlist + dozens of segments
Adaptive quality?NoYes, switches in real time
Live streaming?HardNative support
Right-click "Save as"?Often worksSaves only the playlist text file
Bandwidth efficient?Fixed qualityYes, only fetches what is needed

4. Why streaming sites use HLS instead of MP4

Three main reasons HLS dominates streaming:

  1. Adaptive bitrate: the player can downgrade from 1080p to 480p mid-video if the connection slows, without buffering. MP4 cannot do this.
  2. Live streaming: the player polls the playlist every few seconds for new segments, which makes live broadcasts trivial.
  3. CDN-friendly: small segment files cache extremely well on CDNs and reduce origin server load. Cheap and fast at scale.

For sites like Bunny.net, Cloudflare Stream, AWS IVS, and most online course platforms, HLS is the obvious choice.

5. How to play an M3U8 file

You cannot just double-click an M3U8 file and expect it to play. You need an HLS-compatible player. Here are the easiest options:

VLC Media Player (free, all platforms)

Open VLC, then File > Open Network > paste the M3U8 URL. VLC fetches the segments and plays the video. Works on Windows, macOS, Linux, iOS, Android.

mpv (free, command line)

For terminal users: mpv https://example.com/playlist.m3u8 opens the stream directly. mpv handles HLS natively.

Safari (Mac and iOS only)

Safari plays M3U8 natively. Open the playlist URL in a Safari tab and the video appears in the built-in player. No other browser does this without an extension or polyfill (hls.js).

Browser extensions

Several browser extensions add HLS playback to Chrome, Firefox, Edge. They use the open-source hls.js library under the hood.

6. How to download an M3U8 stream as a single MP4

The clean way to "save" an M3U8 video is to download every segment, then mux them into a single MP4 container. There are three ways to do this:

The browser extension way (easiest)

Install Vidora or a similar HLS-aware extension. Open the page that contains the video, click the extension icon, choose your quality, click Download. The extension fetches all segments in parallel (typically 6 at a time) and saves a clean MP4. No command line needed.

The ffmpeg way (free, command line)

If you have ffmpeg installed:

ffmpeg -i "https://example.com/playlist.m3u8" -c copy output.mp4

The -c copy flag tells ffmpeg to mux without re-encoding, which is fast and preserves quality. If the source needs auth, add -headers "Referer: https://source.com/".

The yt-dlp way

For sites where finding the M3U8 manually is painful, yt-dlp auto-detects:

yt-dlp "https://example.com/page-with-video"

It analyzes the page, finds the M3U8, downloads, and muxes. Works on hundreds of sites.

7. HLS vs DASH: which one wins?

DASH (Dynamic Adaptive Streaming over HTTP) is the other big adaptive streaming protocol. It was standardized by MPEG and is favored by Google, YouTube, and Vimeo. Key differences:

Quality, capabilities, and bandwidth efficiency are nearly identical. Most modern players support both. The only real difference is the manifest format (.m3u8 vs .mpd) and the segment container (.ts/.m4s vs .m4s).

If you are downloading content from Vimeo, you are working with DASH. From a course platform like Bunny.net, usually HLS. The download method is conceptually the same: fetch the manifest, fetch all segments, mux into MP4.

8. Frequently asked questions

Is HLS encrypted?

It can be. Plain HLS is not encrypted, but HLS supports AES-128 encryption per segment (free, self-hosted) and full DRM (Widevine, FairPlay, PlayReady) for premium content. AES-encrypted HLS can still be downloaded if you have the decryption key from the playlist. DRM-protected HLS cannot, by design.

What are .ts and .m4s files?

Segment containers. .ts (MPEG transport stream) is the original format used by HLS, designed for digital TV. .m4s (fragmented MP4) is the modern alternative used by HLS v6+ and DASH. Both contain a few seconds of video and audio.

How do I find the M3U8 URL on a website?

Open DevTools, go to the Network tab, filter by "m3u8", then play the video. The first matching request is your master playlist. Right-click and copy the URL.

Can I download a live HLS stream?

Yes, but only the segments produced so far. You will need a tool that polls the playlist continuously and accumulates segments until you stop it. ffmpeg can do this with -live_start_index.

Why does my downloaded MP4 have audio drift?

Bad muxing. If audio and video segments have different start times, naive concatenation causes drift. Use a proper muxer (ffmpeg or a library like mp4-muxer) that aligns timestamps.

About the author

RGC Digital LLC builds Vidora. We write about video tooling, streaming protocols, and the gritty details of HTTP-based delivery.

Related reading