Originally published at ffmpeg-micro.com
fluent-ffmpeg is the go-to FFmpeg wrapper for Node.js developers. It works perfectly on your laptop. Then you deploy to AWS Lambda, Vercel, or Google Cloud Functions and everything falls apart.
FFmpeg Micro is a cloud API that runs FFmpeg commands on dedicated infrastructure, so Node.js developers can transcode video without installing binaries or managing memory limits.
Why fluent-ffmpeg Breaks in Serverless
1. No native FFmpeg in serverless runtimes
Lambda, Cloud Functions, and Vercel Functions don't ship with FFmpeg. You bundle a static build (70-100MB) or use a Lambda Layer. Both are fragile and architecture-specific.
2. Memory caps
A single 1080p transcode can consume 2-4GB of RAM. That's expensive on Lambda and impossible on fixed-memory platforms.
3. Cold starts
Loading the FFmpeg binary adds 2-5s on cold start, on top of Node.js initialization.
Comparison
| fluent-ffmpeg | FFmpeg Micro API | |
|---|---|---|
| FFmpeg binary | You install it | Managed |
| Memory | Your server's RAM | Offloaded |
| Serverless | Layers/static builds | Single HTTP call |
| Cold start | 2-5s binary loading | None |
| Deploy size | +70-100MB | 0MB |
Migration Example
Before (fluent-ffmpeg)
const ffmpeg = require('fluent-ffmpeg');
ffmpeg('input.mp4')
.outputOptions(['-c:v libx264', '-crf 23', '-preset fast'])
.output('output.mp4')
.on('end', () => console.log('Done'))
.run();
After (FFmpeg Micro)
const response = await fetch('https://api.ffmpeg-micro.com/v1/transcodes', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
inputs: [{ url: 'https://example.com/input.mp4' }],
outputFormat: 'mp4',
options: [
{ option: '-c:v', argument: 'libx264' },
{ option: '-crf', argument: '23' },
{ option: '-preset', argument: 'fast' }
]
})
});
const job = await response.json();
No binary. No memory management. Works in any runtime with fetch().
Get a free API key and run your first transcode in under five minutes.
Top comments (0)