TROUBLESHOOTING · WINDOWS / LINUX / MACOS

Fix SadTalker’s FFmpeg not found error.

Get FFmpeg onto the right PATH, check that Python can find it, and verify video export before running SadTalker again.

SadTalker AI guides · Updated · 8 min read

Start with the quick fix →

The quick fix

Install the FFmpeg executable, make sure its folder is on PATH, and restart the terminal or app that launches SadTalker. PATH is the list of folders your operating system searches when a program asks for ffmpeg.

Open the same terminal you use for SadTalker, activate its environment if applicable, and run both checks:

All operating systems \u00b7 terminal
ffmpeg -version
ffprobe -version

Both commands should print version information. If either is missing, jump to your operating system below. Installing a Python package named ffmpeg does not by itself make the system executable available.

Check that this is a missing-FFmpeg error

The wording depends on the shell and the component that failed. These are representative signatures; the Linux test output appears in the evidence section.

Error signatures \u00b7 examples
Windows Command Prompt:
'ffmpeg' is not recognized as an internal or external command

Linux shell:
/bin/sh: 1: ffmpeg: not found

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

Audio loading:
`ffprobe` not found

SadTalker’s video export code invokes FFmpeg through the shell, then moves the resulting MP4. A missing executable can therefore be followed by a missing temporary MP4 error. Read the earlier terminal output before assuming your checkpoints are broken.

A DLL-loading error, permission error, unknown encoder or corrupt input file needs a different fix. If FFmpeg starts and prints a version, continue to the smoke test before changing PATH again. The upstream ffprobe report also shows that audio loading can fail before generation starts.

Windows: install FFmpeg and fix PATH

Use a Windows executable build linked from the official FFmpeg download page. The Gyan essentials ZIP includes the tools needed here. Extract the archive first; the source-code download is not a ready-to-run Windows program.

For the commands below, arrange the extracted files like this. If you keep the archive’s versioned folder, use that actual path instead.

Example Windows folder layout
C:\ffmpeg\
└── bin\
    ├── ffmpeg.exe
    ├── ffprobe.exe
    └── ffplay.exe
Windows File Explorer showing the bin folder inside a versioned FFmpeg essentials build
From our Windows setup guide: the bin folder is nested inside the extracted versioned folder. Add the full path ending in bin, not its parent. Your version number may differ.

Try it in the current terminal

Choose the block for your shell. These changes apply only to the current terminal and programs started from it.

Windows PowerShell
$env:Path = "C:\ffmpeg\bin;" + $env:Path
where.exe ffmpeg
where.exe ffprobe
ffmpeg -version
ffprobe -version
Windows Command Prompt (CMD)
set "PATH=C:\ffmpeg\bin;%PATH%"
where ffmpeg
where ffprobe
ffmpeg -version
ffprobe -version

Keep the fix after closing the terminal

  1. Search Windows for “Edit environment variables for your account”.
  2. Under User variables, select Path → Edit → New.
  3. Add the full folder containing ffmpeg.exe and ffprobe.exe, for example C: fmpegin. Preserve the existing entries.
  4. Save, close and reopen your terminal and any launcher or IDE. Restarting only the browser tab is not enough.
  5. Activate the SadTalker environment, repeat both version checks, then launch SadTalker from that terminal.

If where.exe ffmpeg lists multiple copies, the first match may be an older or broken installation. Prepend the intended folder for this session and check again. For the complete environment and WebUI setup, use our Windows installation walkthrough.

Linux: install in the environment that runs SadTalker

On Ubuntu or Debian, install the distribution package. Ubuntu lists FFmpeg in its official package catalogue.

Ubuntu / Debian \u00b7 Bash
sudo apt-get update
sudo apt-get install -y ffmpeg
command -v ffmpeg
command -v ffprobe
ffmpeg -version
ffprobe -version
Typical Ubuntu / Debian paths
/usr/bin/ffmpeg
/usr/bin/ffprobe

If the executables exist but the shell cannot find them, temporarily restore the standard binary folders, then run the checks again:

Linux \u00b7 repair PATH for this terminal
export PATH="/usr/local/bin:/usr/bin:/bin:$PATH"
hash -r
ffmpeg -version
ffprobe -version

For a custom installation, prepend its actual bin directory instead. Persist the change in the startup file your launcher uses, such as ~/.bashrc for interactive Bash. Services and containers need their own environment configuration; editing a shell startup file does not update a running service.

Using Conda instead?

The upstream installation instructions include a Conda installation option. Run it inside the existing SadTalker environment:

Conda \u00b7 Linux / macOS
conda activate sadtalker
conda install ffmpeg
command -v ffmpeg
command -v ffprobe

Replace sadtalker with your environment name. Environment binaries normally live under $CONDA_PREFIX/bin. A successful Conda solve alone does not prove the active app sees the executable.

For WSL, install FFmpeg inside the Linux distribution. For Docker, include it in the image running SadTalker; installing it on the host does not install it in the container. See our Docker setup guide. For other distributions, follow the package links on the official FFmpeg download page.

macOS: Homebrew installation and paths

If Homebrew is already installed, use its FFmpeg formula:

macOS \u00b7 Terminal
brew install ffmpeg
command -v ffmpeg
command -v ffprobe
ffmpeg -version
ffprobe -version
Typical Homebrew executable locations
Apple Silicon:
/opt/homebrew/bin/ffmpeg
/opt/homebrew/bin/ffprobe

Intel Mac:
/usr/local/bin/ffmpeg
/usr/local/bin/ffprobe

If Homebrew’s folder is missing from PATH, use the matching command below only if Homebrew exists at that location. Follow your Homebrew installation’s shell setup instructions to persist it.

Apple Silicon \u00b7 current terminal
eval "$(/opt/homebrew/bin/brew shellenv)"
Intel Mac \u00b7 current terminal
eval "$(/usr/local/bin/brew shellenv)"

Reopen your terminal or IDE, activate the SadTalker environment, and verify both tools again. This fixes FFmpeg discovery; it does not establish compatibility of every SadTalker dependency with your Mac.

Verify Python access, then create a test video

Run this from the activated Python environment used to launch SadTalker. Both entries must show a full path rather than None:

SadTalker environment \u00b7 any OS
python -c "import shutil; print('ffmpeg:', shutil.which('ffmpeg')); print('ffprobe:', shutil.which('ffprobe'))"

Next, run this single-line command in a writable folder. It creates a one-second blue video with a test tone, without downloading media or loading SadTalker models. It uses -n to avoid overwriting an existing file; choose a fresh filename if needed.

FFmpeg smoke test \u00b7 PowerShell, CMD, Bash or zsh
ffmpeg -n -hide_banner -f lavfi -i color=c=blue:s=320x240:r=25 -f lavfi -i sine=frequency=440:sample_rate=44100 -t 1 -c:v libx264 -pix_fmt yuv420p -c:a aac ffmpeg-check.mp4
Inspect the test output
ffprobe -v error -show_entries stream=codec_name,codec_type -of csv=p=0 ffmpeg-check.mp4
Expected streams
h264,video
aac,audio

Open the MP4 and confirm that it plays with a tone. An “Unknown encoder” message means FFmpeg was found but the build lacks the selected encoder; use a build with H.264 and AAC support. Check the FFmpeg command reference and ffprobe documentation for the test options.

Retry SadTalker

Restart your WebUI or run this from the SadTalker repository with its Python environment active. Replace the image and audio paths with your own files:

SadTalker \u00b7 one-line inference command
python inference.py --driven_audio "input.wav" --source_image "input.png" --result_dir "results" --size 256 --batch_size 1

Success means generation completes and the resulting MP4 plays with audio. A passing FFmpeg smoke test verifies media tooling, not the entire model pipeline. Use the demo lab for sample media and the checkpoint guide if the next error concerns missing model files.

If the terminal works but SadTalker still fails

  • Old process: fully stop and relaunch the WebUI, notebook kernel, IDE or service. Existing processes keep their old environment.
  • Different environment: repeat the Python check from the actual launcher environment. A system terminal can resolve a different executable than Conda or an extension.
  • ffprobe missing: verify both tools. A bundled imageio executable or a Python wrapper may not provide a command named ffprobe on PATH.
  • Colab runtime reset: reinstall the system package in the current runtime. Our Colab guide covers the notebook setup.
  • Different failure: if the log reports CUDA memory exhaustion, use the CUDA out-of-memory guide. PATH changes cannot increase GPU memory.

Failure capture and test scope

We tested a disposable Debian 12 Linux container: first without FFmpeg installed, then with the package installed, then with PATH deliberately hidden in a child shell. No system-wide PATH change was needed.

Captured Linux result \u00b7 29 September 2026
sh: 1: ffmpeg: not found
missing_exit=127
/usr/bin/ffmpeg
/usr/bin/ffprobe
/bin/sh: 1: ffmpeg: not found
hidden_path_exit=127
h264,video
aac,audio

Restoring /usr/bin:/bin for the test command allowed the one-second H.264/AAC video to be created and inspected. Read the full test log. This is an executable-discovery and encoding test, not a full SadTalker inference benchmark. The Windows screenshot comes from the existing setup guide; the Windows and macOS instructions were checked against documentation, not newly tested on those operating systems.

Frequently asked questions

Do I need to reinstall SadTalker?

Usually not for a missing executable. First fix the FFmpeg installation or PATH and restart the app. Reinstalling model weights does not fix executable discovery.

Will pip install ffmpeg fix this?

A Python module and the command-line program are separate things. Install an operating-system package, a Windows executable build or the Conda package, then verify ffmpeg and ffprobe by name.

Should FFmpeg go inside my SadTalker folder?

It does not need to. Put its executable directory on the PATH inherited by the SadTalker process. Keep the bin folder intact and use your actual extracted directory.

Why is my output silent or missing?

A failed audio/video merge is one possibility, but silence alone does not prove FFmpeg is missing. Check the first error in the terminal, confirm the input audio is valid, and run the smoke test.