12 error fixes for ffmpeg in Node.js, Python, serverless and n8n, from spawn ffmpeg ENOENT to moov atom not found: why each happens, the local fix, and the same job on ReelSDK at $0.02 per compute minute.

Fix FFmpeg errors without installing ffmpeg

Search the table for your exact error and run the local fix, or skip the binary: ReelSDK runs your args on ffmpeg 8.1, your first $0.50 is free, and failed jobs cost nothing.

Updated

Pages

Every error

Find your error by its exact text.

Every error
PageError textCause and fix
Error: Cannot find module '@ffmpeg/core'Error: Cannot find module '@ffmpeg/core'@ffmpeg/ffmpeg 0.11 loads its WebAssembly core from a package it does not install. Add @ffmpeg/core@0.11.0, or skip WebAssembly in Node.
Error: spawn ffmpeg ENOENTError: spawn ffmpeg ENOENTNode cannot find an ffmpeg program on PATH. Install it, spawn the ffmpeg-static path, or send the same args to an API.
ffmpeg exited with code 1: Conversion failed!Error: ffmpeg exited with code 1: Conversion failed!fluent-ffmpeg reports only ffmpeg's exit code and last line. The real cause is in stderr: print it, or use -v error to see it alone.
FileNotFoundError: No such file or directory: 'ffmpeg'FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'Python asked the OS for a program called ffmpeg and found none on its PATH. Install it, use imageio-ffmpeg, or call ffmpeg over HTTP.
FUNCTION_INVOCATION_TIMEOUTFUNCTION_INVOCATION_TIMEOUTVercel stopped the function at its max duration, 300 s on Hobby. Raise maxDuration, speed up ffmpeg, or return early with a webhook.
height not divisible by 2height not divisible by 2 (720x405)libx264 refuses a 4:2:0 frame with an odd width or height. Scale with -2, round odd sources to even, or send the args to an API.
moov atom not foundmoov atom not foundThe MP4's index is missing, usually because the file was cut off. Re-fetch it, repair it with untrunc, or move the moov first.
Non-monotonous DTS in output streamNon-monotonous DTS in output stream 0:0Packets reach the muxer with timestamps that go backwards, often from joining unlike clips with -c copy. Re-encode with the concat filter.
ReferenceError: SharedArrayBuffer is not definedReferenceError: SharedArrayBuffer is not definedThe multithreaded ffmpeg.wasm core needs a cross-origin isolated page. Send COOP and COEP headers, or load the single-thread core.
Too many packets buffered for output streamToo many packets buffered for output stream 0:0.ffmpeg ran out of muxing queue while it waited for a stream that starts late. Raise -max_muxing_queue_size, or run it on ffmpeg 8.1.
Unknown encoder 'libx264'Unknown encoder 'libx264'Your ffmpeg build has no x264 inside. Use libopenh264, install a GPL build, or send the same args to an API that has libx264.
Unrecognized node type: n8n-nodes-base.executeCommandUnrecognized node type: n8n-nodes-base.executeCommandn8n 2.0 stopped loading the Execute Command node. Re-enable it with NODES_EXCLUDE, or call ffmpeg from an HTTP Request node.

How each fix is checked

Every page covers an error we reproduced in Node.js, a serverless function, Docker, n8n or ffmpeg.wasm. It shows the exact error text, where it shows up and why it happens, then two fixes: the local fix for your own setup and the API fix.

For each page we triggered the error, ran the local fix, and ran the API fix on POST /v1/ffmpeg. The output file of that run is linked on the page, so you can check it yourself.

When to skip the binary

Shipping ffmpeg inside serverless functions and slim containers is where most of these errors come from: there is no binary on the PATH, a static build blows the bundle size, and long encodes hit run time limits.

The API fix sends your args to POST /v1/ffmpeg instead. Each job runs ffmpeg 8.1 on a fresh machine with no shell, takes input files up to 500 MB each and 1 GB per job, and runs up to 10 minutes. Use ?wait= for up to 300 s or a signed webhook, and download the output within 7 days.

FAQ

Questions, answered

Why does ffmpeg work on my laptop but fail on the server?

Your laptop has the binary on the PATH and no limits on bundle size or run time. A serverless function, slim container, n8n or ffmpeg.wasm may lack the binary, cap the bundle size, stop long runs, or run another ffmpeg version.

Will the API give me the same output as my local ffmpeg?

The API runs your args on ffmpeg 8.1 on a fresh machine per job. A local install of the same version behaves the same way; older or differently built versions can differ in flags and output.

What does the API fix cost?

$0.02 per compute minute, billed per second with a 1-second minimum. There is no subscription, top-ups start at $5, and your first $0.50 is free.

What happens when my ffmpeg args fail on the API?

Args that break a rule, such as a URL or a refused filter, get a 400 INVALID_REQUEST that names the arg before any job starts. If ffmpeg itself fails, the job fails with HTTP 422 and FFMPEG_FAILED, with ffmpeg's last error line as the message. Failed jobs cost nothing, so debugging does not burn credit.

Do I have to change my ffmpeg args for the API?

Usually only the file names. List each input under inputs with its URL and each file you want back under outputs, then use those names in args. Network URLs and absolute paths inside args are refused (the bundled fonts aside), because ffmpeg runs with no shell and no network, and so are options outside the allowlist, such as HLS output or two-pass encoding.

Can I run the API fix from a serverless function?

Yes. The function sends one HTTP request and the encode runs on ReelSDK. Add ?wait= to get the result within 300 s, or pass a webhook_url with ?wait=0 and return right away.

Sources, checked November 2026

Ready to build?

Ship video from your app today

Your first $0.50 is free, and one key covers every endpoint.

Moonlit lake with a lit cabin under the mountains