Skip to content

Installing ffmpeg on Windows

Why install it? If an AI project involves audio or video, it will almost certainly be used, so it is recommended to install it.

Download ffmpeg and set environment variables

ffmpeg Windows version download address

https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-6.1.1-full_build.7z

More other versions download https://www.gyan.dev/ffmpeg/builds/

After downloading and extracting, enter 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 a Path environment variable: Press and hold the Win key + Pause key (top right), and click --Advanced System Settings--Environment Variables--System Variables--find Path this line double-click in the opened window

image.png

Then click New--Browse in turn, find the directory where the 3 exe are located

image.png

Find the directory where ffmpeg.exe is located in the browse dialog box 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 down to close all opened dialog boxes.

image.png

03.gif

Verify whether the installation is successful

Open a cmd window at random, enter ffmpeg and press Enter. If the following is displayed, the installation is correct. If it prompts "ffmpeg is not an available command or...", it means that you have made a mistake when configuring the environment variables, please reconfigure.

image.png

Install ffmpeg on Mac

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