Skip to content
quangshuynhPublic

About

Open-source, privacy-first browser extension for detecting, downloading, and organizing web media, with HLS/DASH support and batch downloads.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

MediaGrab logo

MediaGrab

Find the video, audio, images, subtitles and unencrypted streams on a web page, and save the ones you are allowed to save.
Free and open source. No account, no tracking, no limits.

The MediaGrab popup listing the videos and subtitles found on a page   Choosing the quality and audio track of HLS and DASH streams in the popup

MediaGrab is a Manifest V3 browser extension for Chrome, Edge and Brave. It reads the current page, lists the media it finds with what is actually known about each item (format, resolution, duration, size), and downloads what you pick through the browser's own download manager. Everything happens on your device: MediaGrab has no server, sends nothing anywhere and asks for website access only when you want automatic detection on a site.

It does not bypass DRM, paywalls, logins or any other access restriction. Encrypted and DRM-protected media is recognised and explained, never downloaded. It does not work on every website either: what it does with YouTube, Skool classrooms, embedded players and streams, and how far each has been checked, is in the compatibility matrix.

Contents

Features

Area What MediaGrab does Status
Detection on request Clicking the toolbar button scans the current page once (activeTab), with no standing website access Supported
Automatic detection On sites you allow, watches pages as they change: lazy-loaded images, players added later, single-page-app navigation, frames Supported
Network detection Notices media and stream manifests that players request in the background, reading only response type, size and suggested file name Supported
Page content <video>, <audio>, <source>, <img>, srcset, <picture>, lazy-loading attributes, <track>, media links, <embed>/<object>, Open Graph media Supported
Classification Deterministic: content type, type attribute, file extension, element; duplicates merged; ad and thumbnail detection; "Unknown" instead of guesses Supported
Direct downloads Browser download manager, queue with a concurrency limit, pause, resume, cancel, automatic retries, duplicate-name handling, safe file names Supported
Players and embeds Video players on the page, in shadow DOM and in frames (YouTube, Vimeo, Loom, Wistia and others), with title, thumbnail, duration and a link to the video Supported (recognition)
Page and player status One status per page and per player, from "Stream detected" to "Official download required", with what to do next Supported
Diagnostics Why media was or was not found, with a report to share that contains no page addresses, titles or other page content Supported
HLS and DASH Quality, audio track and subtitle selection; segments assembled into one MP4 file on disk without re-encoding or holding it in memory Supported (VOD, unencrypted)
Separate audio and video Joined into one MP4 file without re-encoding when both are fragmented MP4, or MPEG-TS with H.264 and AAC Supported (details)
Encrypted, DRM, live Recognised, labelled and explained Never downloaded / live: not in this version
Official download tools Platforms that allow downloads only through their own tools are named, with a link to them (YouTube Studio for your own uploads) Supported
Popup Search, category filters, sorting, preview, details, copy links, hide items, light and dark themes Supported
Manager page Library of detected media with grouping, multi-select and batch download; download queue; history; settings Supported
Creator tools Source tracking, attribution (creator and licence only when the page states them), tags, projects, file name templates, CSV / JSON / Markdown export Supported
Settings Import, export and reset; per-site allow and block lists; retention controls; one-click data clearing Supported
Firefox Same code base, built for Firefox's Manifest V3 Planned (roadmap)

The manager page with detected media grouped by type, and a preview with details

Install

MediaGrab is not in an extension store yet. Install it from a release package:

  1. Download mediagrab-<version>-chrome.zip (Chrome, Brave) or mediagrab-<version>-edge.zip (Edge) from the latest release.
  2. Extract the ZIP into a folder you will keep (the browser loads the extension from that folder every time it starts).
  3. Open chrome://extensions (Brave: brave://extensions, Edge: edge://extensions).
  4. Turn on Developer mode (top right in Chrome and Brave, left sidebar in Edge).
  5. Click Load unpacked.
  6. Select the extracted folder. MediaGrab appears in the extensions menu; pin it to the toolbar for one-click access.

The only install warning is "Manage your downloads". See docs/installation.md for updating, removing and building the package yourself.

Using MediaGrab

  • Scan a page: click the MediaGrab button. The popup lists what it found, most useful items first; the tabs above the list filter by category.
  • Download: use the download button on an item, or the menu (⋯) for Download as…, preview, details, copying the media or page link, opening the source page, and hiding items.
  • Streams: pick a quality (and audio track or subtitles where the stream offers them), then download. Progress shows segment by segment, and the result is one MP4 file whenever the stream's codecs allow it.
  • Players: the status at the top of the popup sums up the page, and each player says what is possible: download the stream it plays, start playback and scan again, allow its site, or use the platform's own download tool.
  • Diagnostics: Diagnostics in the popup explains what was found and filtered, which frames MediaGrab can read, and what to try next. Copy report and Save report give a summary you can share in an issue.
  • Detect automatically: choose Detect automatically here in the popup, and the browser asks you to allow that one site. To detect media on every website without allowing sites one by one, turn on Allow access to all websites under Settings → Site access. It is off until you turn it on, and you can turn it off or remove single sites there at any time.
  • Manage: the manager page (layout icon in the popup) has the full library, the download queue, history, the media inventory and settings.

Several players on one page, each with its own status: a stream ready to download, a player waiting for playback, a Loom embed asking for site access and a YouTube embed pointing to YouTube Studio   The diagnostics panel with the page status, detector and site access state, what was found and filtered, and buttons to copy or save the report

The download queue with two downloads in progress, one waiting, and finished downloads

More screenshots, all taken from the real extension by npm run screenshots: history, media inventory, settings, file names, site access, first scan without site access, a course lesson with a stream, a YouTube lesson, audio, images, protected media, empty page and dark theme.

Supported media

Category Formats
Video MP4, M4V, WebM, MOV, MKV, AVI, MPEG, OGV, 3GP, WMV, FLV, MPEG-TS (.m2ts, .mts)
Audio MP3, AAC, M4A/M4B, WAV, FLAC, Ogg, Opus, WebA, WMA, AIFF, MKA, AMR, MIDI
Images JPEG, PNG, APNG, WebP, AVIF, GIF, SVG, BMP, ICO, TIFF, HEIC/HEIF, JPEG XL
Subtitles WebVTT, SRT, TTML/DFXP, ASS/SSA
Streams HLS (.m3u8: MPEG-TS and fragmented MP4 segments, byte ranges, alternative audio and WebVTT subtitles) and DASH (.mpd: SegmentTemplate with or without SegmentTimeline, SegmentList, single-file representations)

Recognised but not downloaded, each with an explanation in the popup: encrypted or DRM-protected streams (HLS EXT-X-KEY, DASH ContentProtection), live streams, multi-period DASH, Adobe HDS and Microsoft Smooth Streaming, players fed through Media Source Extensions (blob: URLs) when no manifest is visible, and fragmented playback without a manifest. MediaGrab tells detected apart from downloadable and never presents a manifest as if it were the video. Details: docs/formats.md and docs/streaming.md.

Privacy

  • No account, telemetry, analytics, ads or remote code. MediaGrab only requests addresses the page itself uses: the media you download or preview, the manifest of a stream it shows you (to list its qualities), and, if you leave thumbnails on, the page's own preview images.
  • Installs with access to no website. Reading a page needs your click (activeTab) or a site you allowed; you can revoke access at any time.
  • Reads four response headers for network detection (type, length, range, suggested file name). Never cookies, credentials or request bodies.
  • History stores links with credentials and signed parameters removed, and file locations relative to your download folder. Private windows are off by default. Everything can be cleared in one step.

Full details: PRIVACY.md. Security reports: SECURITY.md.

Performance

Measured in real Chromium with npm run perf on a page with 600 images, 40 videos and 2,000 links (medians of ten runs; method and all numbers in docs/performance.md):

  • Installed without site access, MediaGrab runs no code in pages and has no measurable effect on load time.
  • With automatic detection, it used about 41 ms of the page's main thread in total, in slices of at most 8 ms, and added 0.8 MB to the page's memory.
  • The popup shows its first results about 130 ms after opening; a scan on click finds the page's media in about a third of a second.

Building and testing

Requires Node.js 20.19 or later (the project pins 24 in .nvmrc).

npm ci                  # install dependencies
npm run dev             # development build with live reload (Chrome)
npm run build           # production build in .output/chrome-mv3
npm run build:edge      # production build for Edge
npm run package         # release ZIPs for Chrome and Edge in .output/, then verifies them
npm run verify:package  # checks the release ZIPs and SHA256SUMS.txt again
npm run check           # typecheck, lint, formatting and unit tests
npm run test:e2e        # end-to-end tests in real Chromium (builds first)
npm run test:package    # installs the release ZIP in a clean profile and updates it

The end-to-end tests load the real extension into the Chromium build that Playwright installs (npx playwright install chromium), drive the real popup, download real files from a local fixture site and verify them byte for byte. See docs/development.md and docs/testing.md.

Architecture

web page                 service worker                    extension pages
┌──────────────┐  report  ┌──────────────────────────┐ port ┌───────────────────┐
│ detector.js  │ ───────▶ │ detection → tab store    │ ◀──▶ │ popup, manager    │
│ (DOM scan,   │          │ classification, dedupe   │      │ (React)           │
│  observers)  │          │ download queue           │      └───────────────────┘
└──────────────┘          │ webRequest (read only)   │ msg  ┌───────────────────┐
                          └──────────────────────────┘ ◀──▶ │ offscreen document│
                                    │ chrome.downloads      │ HLS/DASH assembly │
                                    ▼                       │ into OPFS         │
                              your download folder          └───────────────────┘

Built with TypeScript (strict), React, WXT and Vite, Tailwind CSS, Lucide icons, Zod for validating every message, Vitest and Playwright. Browser APIs are reached through a thin platform layer so the core logic is plain, testable TypeScript. Read docs/architecture.md for the module layout, the permission model, state handling across service-worker restarts and the reasons behind each choice.

Documentation

Contributing

Issues and pull requests are welcome. Please read CONTRIBUTING.md first; it explains the project's limits (no DRM or access-control circumvention, no site-specific extractors that defeat restrictions) and how to run the checks.

Only download media you have the right to save. A file being reachable does not make it free to reuse: check the source and its licence. MediaGrab records the creator and licence only when the page states them.

Licence

MIT. The fixture media in tests/fixtures is generated for this project and dedicated to the public domain (CC0).

About

Open-source, privacy-first browser extension for detecting, downloading, and organizing web media, with HLS/DASH support and batch downloads.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages