r/SideProject • u/pocopepe • 2d ago
dead ffmpeg.wasm? built a replacement with webgpu implementaiton
ffmpeg.wasm's core binary is about 60MB and needs COOP/COEP headers just to boot, which is a delightful thing to discover after you've already deployed somewhere that isn't your local dev server and everything quietly stops working. I hit that one too many times, and instead of filing an issue like a normal person I spent a chunk of my summer building my own version instead.
So now there's wasmpeg. Same idea, FFmpeg compiled to WASM, except it's 3.2MB gzipped instead of a small moon, and it loads without any cross-origin isolation headers at all. Decode video frame by frame, scale with any FFmpeg filtergraph, probe metadata without decoding the whole file, transcode to the usual formats. Runs in browsers and in Node.
I'm working on WebGPU-accelerated scaling next, CPU fallback when it's not available, which is the part I keep almost-finishing.
It's a one-person project and still young, so there are gaps. I'm tracking correctness against real FFmpeg output as I go, currently in the low-mid 90s%, which I'm choosing to read as "pretty good" rather than "27 open bugs waiting to happen." It's on npm as @wasmpeg/core already.
If you've ever fought with ffmpeg.wasm's setup, or just like watching someone reinvent a decades-old C library one weekend at a time, I'd genuinely appreciate people trying it or telling me what's broken: https://github.com/wasmpeg/wasmpeg
1
u/phenxdesign 23h ago
Hi, great project, but I think you should work on an online demo (you can host it in github pages for free) and a video encoder based on this would be great but i don't know if that's feasible