Most online video clippers and social media downloaders follow the same playbook: force users to create an account, queue their video on an expensive cloud GPU instance, slap a watermark on the output, and charge $19/month once they cut more than three clips.
I wanted to see how far we could push modern browser APIsβspecifically WebAssembly (ffmpeg.wasm), Web Worker Thread Pools, HTTP Range Chunking, and HTML5 Canvas Compositingβto build a 100% free, zero-server-cost alternative that runs entirely on the user's device.
The result is Download Reels & Multi-Reel Clipper Studio β a privacy-first web app hosted on GitHub Pages that lets creators download videos and slice long videos into multiple vertical Shorts/Reels simultaneously across their CPU cores.
Here is how the architecture works under the hood.
ποΈ 1. Solving the SharedArrayBuffer Problem on GitHub Pages
If you have ever tried running @ffmpeg/ffmpeg in a static browser environment like GitHub Pages, you have likely hit this infamous error:
ReferenceError: SharedArrayBuffer is not defined
Multi-threaded WebAssembly (@ffmpeg/core-mt) requires strict Cross-Origin Isolation headers (Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp). However, turning on strict COEP often breaks cross-origin <video> previews and CDN media streams that don't send CORP headers.
Our Solution: Multi-Worker Single-Threaded Pool (@ffmpeg/core-st)
Instead of relying on a single multi-threaded WASM instance that requires SharedArrayBuffer, we built a Web Worker Pool (js/clipper-worker.js) where each Web Worker boots an isolated single-threaded @ffmpeg/core-st@0.11.1 instance:
// Size the pool based on hardware CPU cores (up to 6 parallel workers)
const hwCores = navigator.hardwareConcurrency || 4;
const desiredWorkers = Math.min(6, Math.max(2, hwCores - 1));
When a creator queues 5 timestamp clips in the YouTube Video Cutter & Multi-Reel Splitter, the main thread dispatches all 5 segments across the worker pool in parallel. Each CPU core slices its own clip simultaneously without needing SharedArrayBuffer!
β‘ 2. 4Γ Faster Downloads with Parallel HTTP Range Chunking & moov Prefix Truncation
Before FFmpeg can cut a clip in the browser, it needs the source video buffer in memory. Downloading a 45-minute podcast over a single HTTP stream just to cut a 30-second clip at 01:15 β 01:45 is a massive waste of bandwidth.
We solved this in two ways inside js/converter.js:
-
Parallel
RangeRequests: We send aHEADrequest to inspectAccept-Ranges: bytesandContent-Length, then split the download into 4 concurrentRange: bytes=start-endstreams. -
Smart
moovPrefix Truncation: For web-optimized MP4s (faststart, where themoovatom sits at the start of the file), if the user's latest clip ends at02:00of a30:00video, we estimate the byte offset with a safety margin and only fetch the first ~12% of the file!
// Estimate prefix byte ceiling when cutting early segments of a long MP4
if (maxEndTimeSec > 0 && durationSec > 0 && totalBytes > 5 * 1024 * 1024) {
const ratio = Math.min(1, (maxEndTimeSec * 1.35 + 15) / durationSec);
if (ratio < 0.85) {
targetBytes = Math.max(2 * 1024 * 1024, Math.ceil(totalBytes * ratio));
}
}
π― 3. Instant Keyframe Seeking (-ss Before -i)
A common mistake when using FFmpeg to trim videos is placing -ss after -i, which forces FFmpeg to decode every frame from 00:00:00 up to your start timestamp.
By placing -ss <start> before -i and using -t <duration> with stream copy (-c copy), cutting a 30-second clip takes less than 200ms in WebAssembly:
ffmpeg -ss 45.00 -i source.mp4 -t 30.00 -c copy -avoid_negative_ts make_zero reel_1.mp4
If the user enables our 1st-Second Viral Hook Banner or Custom Logo Watermark, we composite the overlay onto a high-DPI HTML5 <canvas>, export a transparent PNG into WASM virtual memory (FS.writeFile), and apply FFmpeg's overlay filter only when requested.
π Try the Live Tools (100% Free, No Signup, Open Source)
We broke the platform into dedicated, fast-loading tools for each workflow:
- π¬ Download Reels & Multi-Reel Clipper Studio (Main App) β All-in-one video saver, batch queue, and multi-reel splitter.
- βοΈ YouTube Video Cutter & Convert YouTube to Shorts β Cut YouTube videos by timestamp into multiple Shorts & Reels simultaneously with 1st-second hook banners and ZIP export.
- π΅ YouTube to MP3 320kbps Audio Converter β Extract studio-grade 320kbps / 192kbps MP3 audio or lossless WAV directly in your browser via WebAssembly.
- πΈ Instagram Reel Downloader (1080p HD MP4) β Save public Instagram Reels and audio tracks in original 1080p MP4 quality.
- π± TikTok Video Downloader Without Watermark β Download clean, unwatermarked TikTok MP4 videos and original sounds.
β Check Out the Code on GitHub
The entire frontend, Web Worker pool, and Cloudflare CORS proxy worker are open source. Feel free to star the repo, open feature requests, or fork it for your own media tools:
download-reels
/
download-reels.github.io
Download Your Favourite Videos and Musics From Instagram, Youtube, Facebook , Tiktok and Other Platforms
Download Reels β Universal Video Downloader & YouTube to MP3
The clean, ad-free, high-speed open-source alternative to SaveFrom.net. Download Instagram Reels, TikTok without watermarks, YouTube Shorts, X/Twitter, and convert to 320kbps MP3 directly in your browser.
π Live Web Utility: https://download-reels.github.io/
π‘ Why This Project Was Created
For over fifteen years, SaveFrom.net was one of the most visited websites on the internet, relied on daily by hundreds of millions of students, editors, educators, journalists, and everyday internet users to save educational clips, archive memories, and download audio.
With SaveFrom.net shutting down, a massive void was left in the web ecosystem. In its place, the search results have been overrun by predatory download portals filled with:
- Intrusive and deceptive advertising: Aggressive pop-unders, fake "virus detected" alerts, and unwanted notifications.
- Paywalls & Artificial Throttling: Demanding subscription fees or forcing users to wait 30 seconds in artificial queues toβ¦
What browser-side media features would you like to see next (e.g., WebGPU Whisper auto-captions or 9:16 face-tracking crop)? Let me know in the comments!
Top comments (0)