Skip to content

Installing FFmpeg on Windows

If you are using a pre-packaged version, FFmpeg is already included and no separate installation is needed.

Why install it? If your AI project involves audio or video, you will almost certainly use it, so it is recommended to install it.

Download FFmpeg and Set Environment Variables

Download link for FFmpeg Windows version:

https://www.gyan.dev/ffmpeg/builds/#release-builds

Choose to download the ffmpeg-release-full.7z archive, which includes support for all common libraries. After downloading, extract it and navigate to the bin directory, where you will see three .exe files. Copy them to a folder with an English path, for example, I copied them to E:\sdk\ffmpeg. Then add this path to the Path environment variable.

image.png

How to Add to the Path Environment Variable: Press the Win key + Pause key (top right corner). In the window that opens, click sequentially—Advanced System SettingsEnvironment VariablesSystem Variables → double-click the Path row.

image.png

Then click NewBrowse, and locate the directory containing the three .exe files.

image.png

In the browse dialog, find the directory where ffmpeg.exe is located, then click OK.

image.png

You will now see the newly added path on the left. Click OK to close, then click OK repeatedly to close all open dialogs.

image.png

03.gif

Verify Installation

Open any Command Prompt window and type ffmpeg, then press Enter. If the output looks like the image below, the installation is successful. If you see an error like "ffmpeg is not recognized as a command...", there was an issue with the environment variable configuration; please reconfigure it.

image.png

Installing FFmpeg on Mac

  1. Open a terminal window and enter the command brew -v. If you get an error like "command not found," you need to install Homebrew.
  • To install Homebrew, run the following command in the terminal:
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
  • Confirm the installation is complete. Wait for it to finish, then run brew -v again. If a version number is displayed, Homebrew is installed successfully, and you can proceed to install FFmpeg.
  1. Continue in the terminal and run the command brew install ffmpeg. After it completes, enter the command ffmpeg. If a long string of version information is displayed, FFmpeg has been successfully installed.