Skip to content

Install ffmpeg on Windows

Why install it? If your AI project involves audio or video, you'll almost certainly need it. So, it's recommended to install it.

Download ffmpeg and Set Environment Variables

ffmpeg Windows version download address:

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

Choose to download the ffmpeg-release-full.7z package. This includes support for all common libraries. After downloading and extracting, go to the bin directory, you will see 3 exe files. Copy them to an English directory, for example, I copied them to the E:\sdk\ffmpeg folder, and then add this path to the Path environment variable.

image.png

How to add Path environment variable: Press Win+Pause key (top right), in the opened window, click in order -- Advanced system settings -- Environment Variables -- System variables -- find the Path line and double click it.

image.png

Then click New -- Browse in order, find the directory where the 3 exe files are located.

image.png

In the browse dialog box, find the directory where ffmpeg.exe is located as mentioned earlier, and then click OK.

image.png

Then you can see the newly added path on the left. Click OK to close, and click OK all the way to close all opened dialog boxes.

image.png

03.gif

Verify successful installation

Open a cmd window at random, enter ffmpeg and press Enter. If the following is displayed, it means the installation is correct. If it prompts "ffmpeg is not an available command or...", it means there is an error in configuring the environment variable. Please reconfigure.

image.png

Install ffmpeg on Mac

  1. Open a terminal window and enter the command brew -v. If an error message such as command not found or not found is displayed, you need to install brew.
  • To install brew, continue to enter 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 the execution to complete, and then re-execute brew -v. If the version number is displayed, it means brew is installed successfully and you can continue to install ffmpeg.
  1. Continue to execute the command brew install ffmpeg in the terminal. After the execution is complete, enter the command ffmpeg. If a large string of version information is output, it means that ffmpeg has been successfully installed.