Running FFmpeg on Vercel? You will hit a wall.
A serverless function is built for a quick request, not a CPU-bound video encode. Bundle FFmpeg into it and it works for a three-second clip, then times out on anything real. The fix is not a bigger function: keep it thin and call a hosted FFmpeg API that returns a finished file URL.
Four walls, and you hit them fast.
None of these are bugs you can configure away. They are what a serverless platform is, by design.
Keep the function thin. Move the encode off Vercel.
Your route handler does one cheap thing: it forwards the input and typed options to KinoPipe and returns the result. The encode runs on managed FFmpeg 9 workers, off your function's timeout and off your Vercel bill.
8.2s
p50 render for a 1080p H.264 edit
100%
success rate across 325 benchmark runs
<1s
time your Vercel function spends
FFmpeg 9 render benchmark, August 2026: cold, warm and burst phases on production recipes.
Three ways to call it from your Vercel app.
FFmpeg on Vercel, answered
Can you run FFmpeg on Vercel?
You can bundle a static FFmpeg binary into a Vercel Function and it will run for tiny, short clips. Real work breaks: serverless functions time out (10s on Hobby, up to 300s on Pro), the deployment bundle is capped at 250 MB unzipped, /tmp is the only writable path and is ephemeral, and there is no GPU. The reliable pattern is to keep your function thin and call a hosted video API for the actual encode.
Why does FFmpeg fail in a Vercel serverless function?
Four walls, usually in this order: the function times out mid-encode; ffmpeg-static adds ~80 MB toward the 250 MB bundle limit; /tmp fills up or is wiped between invocations because it is ephemeral; and cold starts plus CPU-only workers make a 1080p encode slow and expensive. A function is built for a quick request, not a long CPU-bound render.
How do I process video from a Next.js app on Vercel?
Do not run the encode in the function. From a route handler, POST the input URL and typed options to KinoPipe, then return the job or the finished file URL. The function stays under a second; the encode runs on managed FFmpeg 9 workers off your Vercel bill.
Is this only for Vercel?
No. The same limits apply to Netlify Functions, AWS Lambda and Cloudflare Workers: short timeouts, small bundles, ephemeral disk, no GPU. KinoPipe is called the same way from any of them with a single HTTP request.
How is it priced?
One credit covers one second of worker time or a fixed slice of output; the higher rounded-up total applies. The free plan includes 100 credits with no credit card, and failed jobs are refunded automatically.