Dev.to
7/18/2026

How to Use FFmpeg with Bun
Short summary
A practical guide to using FFmpeg with Bun covering three approaches: native subprocess via Bun.spawn (fast but requires binary on every machine), ffmpeg.wasm (no binary needed but 10-20x slower and memory-constrained), and a cloud API via fetch (no dependencies but offloads processing). Each path includes code examples and tradeoff analysis for local scripts, serverless, and production use cases.
- •Bun.spawn calls native FFmpeg directly — fast but requires binary management and breaks in serverless
- •ffmpeg.wasm runs without a binary but is 10-20x slower and crashes on large files
- •Cloud API via fetch is dependency-free but involves third-party service costs and latency
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



