FFmpeg runs natively on Vercel's Fluid compute without modifications.
See route.ts for sample usage based on ffmpeg-static
package from npm.
Note, that you need to declare the binary to be included in your function.
Since FFmpeg takes full advantaged of available cores, we recommend increasing CPU/RAM with a configuration like this. Because Vercel's cost increases linearly with CPU availability, this increases performance, yet can be essentially cost-neutral for a CPU-bound workload like FFmpeg.
[vercel.json]
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"functions": {
"app/convert/route.ts": {
"memory": 3009
}
}
}