January 2026
Video Grabber - Chromium MV3 Browser Extension
TypeScript, React, yt-dlp, ffmpeg.wasm, OPFS, Chrome Extension APIs
A YouTube downloader extension for friends and family that runs yt-dlp and ffmpeg entirely in the browser. No server, resumable jobs.
Visit source
Running yt-dlp from the command line isn't everyone's cup of tea, and I wanted my friends and family to be able to grab YouTube videos without it. So I built them a browser extension.
The first version ran on a VPS, which was easier to build and worse to live with. I had to run infrastructure, people had to trust my server, and the backend had to keep rotating IPs to get past bot detection, all for a job the user's own browser can do.
So I scrapped that direction completely and rebuilt it as a strict client-side Chromium Manifest V3 extension, with yt-dlp and ffmpeg running inside the browser.
The runtime
Manifest V3 is a hard place to run long media jobs. The browser can put the service worker to sleep in the middle of a job, and anything heavy has to move out of it.
The new architecture uses:
- a background service worker that coordinates jobs
- an offscreen document for the heavy WASM work
- ffmpeg.wasm for media processing
- a WASM build of yt-dlp, also offscreen, for extraction and download
- OPFS checkpoints and
chrome.storagemetadata so jobs can resume
Everything happens in the user's browser, and there's no VPS or backend anywhere.
When things break
The failure handling is the part I'm proudest of.
Media work inside an extension fails in a lot of annoying ways: network changes, tab state changes, runtime resets, permissions, storage limits, muxing errors, extraction breakage, and users who don't behave like the nice diagram in your head.
So I wrote down how the extension handles each one:
- An error taxonomy. Every runtime failure maps to a fixed error code, like
STORAGE_QUOTA_EXCEEDEDorDOWNLOAD_URL_EXPIRED. - A recovery matrix. It says what happens after each failure. If the browser kills the service worker mid-download, the job restores from its OPFS checkpoint and goes back in the queue.
- Mux guardrails. ffmpeg copies the streams first instead of re-encoding them, and rejects inputs over about 1.8 GB.
- A breakage triage runbook, for when extraction stops working.
- A support contract. It lists what the extension supports and what it won't, such as DRM-protected streams.
I also wrote an open-source distribution strategy, since I can't put this on the Chrome Web Store when it breaks most of YouTube's T&Cs.
That might sound like overkill for a family tool, but without it every failure is just "it broke" and every fix is vibes.
Why it was worth it
I liked this project because of its constraints. With MV3 I had to plan around a worker that can die mid-job, with WASM I had to watch memory and processing cost, and with OPFS I had to design how a job recovers. Then the Chrome Web Store's policy decided how I could ship it at all.
From the outside it's a small extension. Underneath I'm running heavy media work on an unreliable runtime, with resumable state and no server to fall back on, and I got all of it working.
A couple of my friends and family now use it at least once a week, which is about the best review I could ask for.