Guides / How to download an m3u8 (HLS) video from a web page

How to download an m3u8 (HLS) video from a web page

Updated · By exoTools (exochard)

An m3u8 file is a playlist, not a video. It lists hundreds of short pieces that the player fetches one by one, so right-click and Save as gives you a few kilobytes of text. To get a real file, copy the m3u8 address from the browser's Network tab and give it to yt-dlp or ffmpeg, or use an extension that fetches the pieces and joins them for you.

Add to ChromeAdd to EdgeAdd to Firefox
Streamgrab browser popup detecting an HLS stream on a web page with quality options and a Download button.
Streamgrab reads the page's HLS master playlist, folds duplicate variants and joins the segments into one MP4 inside the browser.

Choosing between yt-dlp, ffmpeg and Streamgrab

MethodSetup requiredAuthenticated pagesOutput
yt-dlpTerminal binary + ffmpegNeeds --cookies-from-browser or custom headersSingle MP4 or MKV; handles playlists and batch scripts
ffmpegTerminal binaryNeeds manual -headers flags copied from DevToolsStream-copied MP4 with -c copy
StreamgrabBrowser extension only (no companion app)Uses the page's active browser session directlySingle MP4 verified for picture, sound and length (or .ts fallback)

Without an extension: yt-dlp or ffmpeg

  1. Find the address. Open the page, press F12, and choose the Network tab. Start the video. Type m3u8 in the filter box. The request you want is usually the master playlist, the one that lists the qualities.
  2. Copy the URL. Right-click the request and copy its address.
  3. Hand it to a downloader. With yt-dlp installed, run yt-dlp "https://example.com/video/master.m3u8". With ffmpeg, run ffmpeg -i "https://example.com/video/master.m3u8" -c copy video.mp4.

This is the most flexible route and it works in any browser. It does mean a terminal and a tool to install. Some sites also expect the request to come from the page, with its cookies or headers, and a plain command line may be refused.

With Streamgrab

  1. Start the video. Streamgrab watches the requests a page makes. Press play, and a number appears on the toolbar icon for what it found. If you installed it after the page loaded, reload the page first.
  2. Open the popup. A stream shows as an HLS stream. The popup reads the playlist and offers a Quality menu.
  3. Press Download. Streamgrab fetches the pieces, joins them, and saves one file. It converts the pieces to MP4 when it can. When it cannot, it saves a .ts file and tells you, and most players open that.

When the audio is a separate playlist, Streamgrab downloads it as well. It joins audio and video into one MP4 when both are MP4, and otherwise saves two files and says so. Playlists that use plain AES-128 encryption, where the key is a link in the playlist, are decrypted piece by piece. There is no companion app to install, and no watermark.

Free and Pro

A Pro pass adds more simultaneous downloads. The Free plan needs no account.

What it will not do

It runs in Chrome, Edge and Firefox on desktop. If a download is not working, why a video will not download goes through the causes.

Save a stream as a file

Streamgrab is free to start, with no account and no watermark. Chrome and Edge save direct files over 2 GiB to disk on Free. Firefox Free saves them to the Downloads folder.

Streamgrab runs in Chrome, Edge and Firefox on desktop.

More guides