FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg' means Python found no ffmpeg on its PATH. Install it, use the binary in imageio-ffmpeg, or post the job to ReelSDK at $0.02 per compute minute.

FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'

We reproduced it on Python 3.13 with ffmpeg off PATH: subprocess failed before ffmpeg printed a line. ReelSDK ran the same 720x1280 scale in about 8 seconds with no binary; imageio-ffmpeg's bundled one took about 12.

ErrorsUpdated

Python 3.13, subprocess.run, ffmpeg off PATH, Debian 13
Traceback (most recent call last):
  File "/home/user/app/convert.py", line 3, in <module>
    subprocess.run(["ffmpeg", "-y", "-i", "in.mp4", "-vf", "scale=720:-2", "out.mp4"], check=True)
  File "/usr/local/lib/python3.13/subprocess.py", line 554, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/local/lib/python3.13/subprocess.py", line 1039, in __init__
  File "/usr/local/lib/python3.13/subprocess.py", line 1991, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'

Source: Python subprocess docs, checked November 2026.

Where it shows up

The moment Python tries to start ffmpeg

Your code starts ffmpeg by name, and the Python process has no ffmpeg on its PATH. We ran subprocess.run(["ffmpeg", ...], check=True) on Python 3.13 with ffmpeg off PATH and got FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg' from _execute_child in subprocess.py, before ffmpeg could print a line.

Wrappers fail the same way, because they start the same binary. ffmpeg-python raised the identical error. pydub first warns Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work, then fails on ffprobe, which it calls first to read the file. On Windows, Python names the same failure [WinError 2] The system cannot find the file specified; we ran Linux only.

Why it happens

Errno 2 means no program by that name on PATH

subprocess asks the operating system to start a program called ffmpeg, and the OS looks for it in each directory on the PATH of the Python process. Errno 2 is ENOENT: no file by that name in any of them. Your arguments and input are not the problem; ffmpeg never started.

Your shell and your app can have different PATHs. A service, a scheduled job or a container can start Python without the directory your ffmpeg lives in, or on a machine where it was never installed. shutil.which("ffmpeg") shows what Python sees: None with ffmpeg off PATH, /usr/bin/ffmpeg with it.

Causes and fixes

Where ffmpeg goes missing in Python, and the fix

Where ffmpeg goes missing in Python, and the fix
SetupWhat you seeFix
subprocess.run with ffmpeg off PATHFileNotFoundError: [Errno 2] ... 'ffmpeg'Install ffmpeg, or pass a full path
ffmpeg-pythonThe same FileNotFoundErrorInstall ffmpeg
pydubA RuntimeWarning, then FileNotFoundError for ffprobeInstall ffmpeg with ffprobe
pydub on Python 3.13ModuleNotFoundError: No module named 'pyaudioop'pip install audioop-lts
pip install ffmpegStill not found: no binary insideUninstall it, use a real install
No system packages allowedNothing to install withimageio-ffmpeg, or the API

Source: Python subprocess docs, checked November 2026.

The local fix

Install ffmpeg, or let pip bring a binary

Check from inside the failing process first, then install ffmpeg where that process runs. On Debian or Ubuntu that is apt-get install ffmpeg, which on Debian 13 brings ffmpeg 7.1. Note that pip install ffmpeg does not help: it installs an unrelated Python package named ffmpeg, with no binary inside.

If you can't install system packages, pip install imageio-ffmpeg brings one file: a recent ffmpeg build with libx264, about 173 MB. With its path in place of "ffmpeg", our script scaled an 11-second clip in about 12 seconds, still with no ffmpeg on PATH. It has no ffprobe, so pydub still needs a full install.

check.py
import shutil

print(shutil.which("ffmpeg"))
# None: this Python process cannot see ffmpeg
# /usr/bin/ffmpeg: it can
install.sh
# Debian or Ubuntu: ffmpeg and ffprobe
apt-get update && apt-get install -y ffmpeg

# or a pip-installed ffmpeg binary, no system package needed
pip install imageio-ffmpeg==0.8.1
fix.py
import subprocess
import time

import imageio_ffmpeg

ffmpeg = imageio_ffmpeg.get_ffmpeg_exe()
print(ffmpeg)

started = time.perf_counter()
subprocess.run([ffmpeg, "-y", "-i", "clip.mp4", "-vf", "scale=720:-2", "out.mp4"], check=True, capture_output=True)
print(f"done in {(time.perf_counter() - started) * 1000:.0f} ms")

Skip the binary

Or call ffmpeg over HTTP

POST /v1/ffmpeg runs ffmpeg 8.1 on a fresh machine per job, so your Python process only needs an HTTP client. The same scale came back as a 720x1280 out.mp4 about 8 seconds after the request.

Compute is $0.02 per minute, billed per second, so that job cost well under a cent. From Python, post the same JSON body with any HTTP client and read the links in job.outputs.

terminalTry it
curl "https://api.reelsdk.com/v1/ffmpeg?wait=60" \
  -H "Authorization: Bearer $REELSDK_KEY" \
  --json '{
    "inputs": {
      "in.mp4": "https://api.reelsdk.com/f/lib/demo/clip.mp4"
    },
    "args": ["-y", "-i", "in.mp4", "-vf", "scale=720:-2", "out.mp4"],
    "outputs": ["out.mp4"]
  }'
The same scale=720:-2 on the API: 720x1280 out, with no binary installed.Input: clip.mp4

pydub on Python 3.13

Python 3.13 removed 19 legacy modules, audioop among them, and pydub imports audioop at startup. On Python 3.13 it fails with ModuleNotFoundError: No module named 'pyaudioop' before it even looks for ffmpeg. pip install audioop-lts brings the module back; after that you get the ffmpeg and ffprobe errors above until both are installed.

FAQ

Questions, answered

Why does ffmpeg work in my terminal but not in Python?

The Python process has a different PATH from your shell. Print shutil.which("ffmpeg") from inside the failing code: None means Python can't see it. Install ffmpeg where the code runs, or pass the full path from which ffmpeg in your shell.

Does pip install ffmpeg fix it?

No. That installs an unrelated Python package named ffmpeg, with no binary inside, and shutil.which still returned None for us. pip install imageio-ffmpeg does bring a binary, which you call through get_ffmpeg_exe().

Is the imageio-ffmpeg binary enough for production?

For ffmpeg itself, yes: it ships a recent ffmpeg build with libx264, about 173 MB. It has no ffprobe, so tools that need ffprobe, such as pydub, still need a full install.

What does the error look like on Windows?

FileNotFoundError: [WinError 2] The system cannot find the file specified, which is Windows' text for error 2. We ran Linux only; the cause and the fixes are the same.

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