explaingit

momo707577045/m3u8-downloader

6,978JavaScriptAudience · generalComplexity · 1/5Setup · easy

TLDR

A single HTML file browser tool that downloads streaming videos by fetching all the fragments from an m3u8 playlist, stitching them together in the browser, and saving the result as a file, no software installation needed.

Mindmap

mindmap
  root((m3u8-downloader))
    What it does
      Downloads streaming video
      Single HTML file tool
      No install required
    How it works
      Reads m3u8 playlist
      Downloads all fragments
      Stitches into one file
    Features
      AES decryption support
      MP4 conversion
      Console injection bypass
    Audience
      General users
      Developers learning
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Download a streaming video from a site that uses m3u8 format by pasting the playlist URL into this tool

USE CASE 2

Save an AES-encrypted streaming video to your computer without installing any desktop software

USE CASE 3

Use the included Tampermonkey browser extension script for faster one-click downloads from streaming pages

Tech stack

JavaScriptHTML

Getting it running

Difficulty · easy Time to first run · 5min

In plain English

This is a browser-based tool for downloading videos that use a streaming format called m3u8. Many video streaming sites deliver video in this format: rather than providing one large file, they split the video into many small fragments and provide a playlist file (the .m3u8 file) that tells the player where to find each piece. This makes it harder to download the video with a simple right-click, because there is no single file to save. This tool works around that by reading the m3u8 playlist, downloading all the video fragments one by one, stitching them together in the browser, and then triggering an automatic download of the combined video file. The user opens the tool's web page, finds the m3u8 URL by looking in the browser's network inspector while the video is playing, pastes that URL into the tool, and clicks to start. No software installation is required. The tool includes support for AES decryption, which some streaming sites use to protect their video fragments. It can also convert the resulting file to the MP4 format. When a video site blocks cross-origin requests, the tool provides a button that copies injection code the user can paste into the browser console on the video's own page, bypassing the restriction. A Tampermonkey browser extension script is also available for quicker access. The entire tool is written in a single HTML file totaling about 540 lines, with roughly 300 lines of JavaScript logic. The README is written primarily in Chinese and includes step-by-step screenshots of the download process, along with a description of the underlying approach for developers who want to understand how the stitching and automatic download work.

Copy-paste prompts

Prompt 1
Explain how m3u8-downloader stitches together video fragments in the browser. Walk me through the key JavaScript steps: fetching the playlist, downloading each segment, and merging them into a single Blob for download.
Prompt 2
How does m3u8-downloader handle AES-128 encrypted video segments? Walk me through the decryption step in the single HTML file code.
Prompt 3
I want to add a progress bar to m3u8-downloader that updates as each segment downloads. Show me where in the single HTML file to add it and the JavaScript to update the display.
Prompt 4
The video site I am trying to download from blocks cross-origin requests. How does m3u8-downloader's console injection approach bypass this, and what exact code would I paste into the browser console?
Open on GitHub → Explain another repo

← momo707577045 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.