Chrome/Firefox extension (Manifest V3) that detects HLS streams on any page, resolves segment URLs from the service worker (bypassing IP-locked playlist tokens), detects direct MP4/WebM/MKV video requests, and exports everything needed to download streams with the companion Colab notebook or local bash script.
Installing from the official stores is the easiest way to get M3U8 Detector and ensure it stays updated automatically.
- 🟢 Chrome (Brave, Vivaldi): Download from Chrome Web Store
- 🦊 Mozilla Firefox: Download from Firefox Add-ons
⚠️ Edge, Opera versions on the way — review in progress (in the meantime, you can install the Chrome version directly)
Chrome
chrome://extensions→ enable Developer mode- Load unpacked → select the
m3u8-detector/folder
Firefox
about:debugging→ This Firefox → Load Temporary Add-on- Select
manifest.jsoninsidem3u8-detector/
manifest.json Extension manifest v3
icon.svg Source SVG icon
src/
background.js Service worker — intercepts requests, resolves playlists, stores streams
content.js Injects interceptor.js into page; bridges XHR/fetch events to background
interceptor.js Runs in page MAIN world — wraps XHR and fetch to detect m3u8 URLs
panel.js Sidebar panel injected into every page (shadow DOM)
options.html Options page — pinned streams, notebook/script download, help
options.js Options page logic
notebooks/
hls-colab.ipynb Google Colab notebook — HLS + direct MP4 → Google Drive
scripts/
hls-local.sh Local bash script — HLS + direct MP4 → ~/Downloads
icons/
icon16.png … icon512.png
Click the toolbar icon to toggle the sidebar panel.
Each detected stream shows:
- Page title (yellow) and page URL (gray)
- Stream URL (blue) or "Direct video" label for MP4/WebM
- Segment resolution status →
✓ N segments readyonce resolved - Copy buttons: stream URL, page URL, cookies
- Pin — survives Clear and page navigation
- ⚙ → opens Options page
Footer:
- Save JSON — downloads
m3u8_<hostname>_<timestamp>.json← use this with Colab or hls-local.sh - Clear — clears detected streams for current tab
- Browse to the movie page — extension auto-detects and resolves segments.
- Wait for
✓ N segments ready→ click Save JSON. - Open Options → Download hls-colab.ipynb → open in Google Colab.
- Run Cell 1 → Cell 2 → Load JSON → select file → Apply → run Cell 3 & 4.
Output: MyDrive/Movies/<name>.mp4
- Open Options → Download hls-local.sh
chmod +x hls-local.sh./hls-local.sh path/to/m3u8_*.json
Requires: curl, ffmpeg, python3
Solves the IP-lock problem: some sites embed
ip_cidrin signed playlist URLs so Colab (Google datacenter IP) gets 403. The extension resolves playlists from your browser (your IP) and exports the CDN segment URLs, which are NOT IP-locked.
- PNG wrapper: TikTok CDN segments have a 1×1 PNG prepended to disguise MPEG-TS. Both the notebook and
hls-local.shdetect the\x89PNGmagic bytes and strip the wrapper up to theIENDmarker. - Shadow DOM panel:
panel.jsuses a shadow root — extension styles never bleed into the host page. - Bridge pattern:
interceptor.js(MAIN world) dispatchesCustomEvent→content.js(isolated world) →chrome.runtime.sendMessage→ background.
[
{
"pageTitle": "Toy Story 5",
"pageUrl": "https://example.com/...",
"streamUrl": "https://cdn.example.com/master.m3u8",
"streamType": "hls",
"cookies": "popUnderAdsEnabled=true",
"segmentCount": 611,
"segments": ["https://cdn.example.com/seg001.ts", "…"],
"detectedAt": "2026-09-02T10:00:00.000Z"
}
]streamType is "hls" or "direct" (for MP4/WebM detected via <video> element).
Most downloaders and AI agents are ready to go with just the exported JSON — drop the m3u8_*.json file from Save JSON into any of these and it resolves straight to a saved video:
- hls-colab.ipynb — Colab notebook, HLS + direct MP4 → Google Drive
- ytdlp-2drive.ipynb — Colab notebook, any yt-dlp-supported URL → Google Drive (EJS/PO-token solver)
- hls-local.sh — local (Mac/Linux) HLS downloader →
~/Downloads - dl-tubi.sh — local downloader for the duplicate-URL / progressive-file export case
⚠️ Disclaimer: these scripts are provided as-is for personal, educational use. You are solely responsible for how you use them and for complying with the terms of service and copyright laws applicable to any site or content you download from. The author assumes no liability for misuse.
- ARCHITECTURE.md — system design, component diagram, build & release guide
- CONTRIBUTING.md — contribution guidelines
- CHANGELOG.md — version history
HLS download knowledge (pipeline, obfuscation patterns, PNG strip, signed URLs, full-season batch) lives in the skill dl-mtv. Install it so your AI agent knows how to download what this extension detects:
npx skills add albertolicea00/agentskills --skill dl-mtv -g