Explainer

What Is an M3U8 File? HLS and DASH Streaming Explained Simply

Why online videos are split into hundreds of small pieces, what .m3u8 and .mpd files are, how adaptive bitrate works and how a stream becomes a single MP4.

The problem streaming solves

Imagine a 10-minute HD video stored as one 200 MB file. A viewer on slow mobile data would wait a long time before anything plays. A viewer on fibre would get no better quality than the file offers. And if someone skips to minute 8, the player either downloads everything before it or needs special server support to jump ahead.

Adaptive streaming fixes all three problems. The video is encoded at several quality levels, and each version is cut into short segments, usually 2 to 10 seconds each. A small text file, the playlist or manifest, tells the player where every segment is. The player then fetches segments one at a time and can change quality between them as your connection speeds up or slows down.

HLS and the .m3u8 file

HLS (HTTP Live Streaming) was created by Apple and is now the most widely used streaming format on the web. Its playlists are plain text files ending in .m3u8. There are two kinds:

The master playlist

This lists the available quality levels (called variants or renditions) with their resolution and bandwidth:

#EXT-X-STREAM-INF:BANDWIDTH=2500000,RESOLUTION=1280x720
720p/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=5000000,RESOLUTION=1920x1080
1080p/index.m3u8

The media playlist

Each variant has its own playlist listing the actual segments, with their durations:

#EXTINF:6.0,
segment_000.ts
#EXTINF:6.0,
segment_001.ts

Segments are usually MPEG-TS files (.ts) or fragmented MP4 (.m4s). Each one is useless on its own. They make sense only when played in order.

DASH and the .mpd file

MPEG-DASH is an open international standard that works the same way. Its manifest is an XML file ending in .mpd. DASH often keeps audio and video in separate streams, which the player combines during playback. YouTube, among others, uses DASH-style delivery.

Adaptive bitrate in action

When you press play, the player usually starts with a lower-quality variant so playback begins quickly. It measures how fast segments download. If there's spare bandwidth it switches up to 720p or 1080p for the next segments. If your train goes into a tunnel it drops down again instead of stopping to buffer. That's why a video sometimes looks soft for a moment and then sharpens.

Why you can't “save” a streamed video normally

With a streamed video there is no single file to right-click. The <video> element on the page often points to a blob: address, which is a temporary object inside your browser's memory that only exists while the page is open. The real data arrives as a stream of segments that the player assembles on the fly.

To keep such a video you have to:

  1. find the playlist (.m3u8 or .mpd) that the player requested;
  2. pick the variant you want, usually the highest quality;
  3. download every segment in order;
  4. join them and wrap them in a standard container such as MP4.

Step 1 is usually the hard part, and it's where our extractor helps. It searches the page source and scripts for playlist addresses, and its bookmarklet reads the list of files the live page has requested, so a playlist started by a video player shows up labelled HLS or DASH. Steps 2–4 are then one command in the free tool FFmpeg, which fetches and joins the segments without re-encoding:

ffmpeg -i "https://example.com/stream/master.m3u8" -c copy video.mp4

VLC media player can also open the address directly (Media → Open Network Stream) if you only want to watch or test it. Streams protected with DRM can't be saved this way, and you should only save streams you have the right to keep.

Remuxing vs re-encoding

These two terms are often confused:

RemuxingRe-encoding
What happensAudio and video are copied into a new containerVideo is decoded and compressed again
QualityIdentical to the sourceSome loss, depending on settings
SpeedVery fast, limited only by download speedSlow, needs heavy CPU work

Joining HLS segments into an MP4 is remuxing, which is why it's quick and lossless.

A word on encryption and DRM

HLS supports two kinds of protection. AES-128 encryption is sometimes used simply to stop casual hot-linking. DRM systems such as Widevine, FairPlay and PlayReady protect commercial films and series. DRM-protected streams cannot and should not be downloaded. Getting around DRM is against the law in many countries, including under India's Copyright Act and the US DMCA.

Quick answers

Can I open an .m3u8 file directly?

Yes. VLC media player can open the URL of an HLS playlist (Media → Open Network Stream) and play it. Saving it still requires the segments to be joined.

Why does my downloaded MP4 have no sound?

Some streams, especially DASH, deliver audio as a separate track. A good tool merges both tracks. If yours didn't, look for a separate audio playlist and combine the two with FFmpeg.

Is a live stream different?

Live HLS playlists keep growing as new segments are published. Saving one records from the moment you start until you stop.