Guides

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

Updated

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.

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

7 days of Pro, free, no card.

What it will not do

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

Questions

What is an m3u8 file?
It is an HLS playlist: a text file that lists the short video pieces a player fetches in order. Saving the m3u8 file itself does not save the video.
How do I download an m3u8 video with yt-dlp?
Find the m3u8 address in the Network tab of the browser developer tools, then run yt-dlp followed by the address in quotes. ffmpeg can do it too, with ffmpeg -i followed by the address and -c copy.
How many HLS downloads are free in Streamgrab?
The free plan allows HLS and DASH streams up to 720p, one at a time. Direct MP4 and WebM files are not limited. Pro removes the quality cap and runs three at once.
Does Streamgrab download DRM-protected streams?
No. A stream that is protected by DRM is refused.

Save a stream as a file

Streamgrab is free to start, with no account and no watermark. Direct MP4 and WebM files are never limited.

Streamgrab runs in Chrome, Microsoft Edge and Firefox on desktop. Download only what you have the right to keep. Streamgrab is an independent product.

More guides