Skip to content

Installing FFmpeg on Windows

Why install it? If your AI project involves audio or video, you'll almost certainly need it. Therefore, 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 archive. This includes support for all common libraries. After downloading, extract it and go to the bin directory. You'll see three .exe files. Copy them to an English directory, for example, E:\sdk\ffmpeg. Then, add this path to the Path environment variable.

image.png

How to add the Path environment variable: Press the Win key + Pause key (top right corner). In the opened window, click on: Advanced system settings -> Environment Variables -> System variables -> Find the Path row and double-click it.

image.png

Then, click New -> Browse, find the directory where the three .exe files are located.

image.png

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

image.png

Then, you'll 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 any cmd window and enter ffmpeg, press Enter. If the following is displayed, it means the installation is correct. If it says "ffmpeg is not a recognized command or...", it means you made a mistake when configuring the environment variables. Please reconfigure.

image.png

Installing FFmpeg on Mac

  1. Open a terminal window and enter the command brew -v. If you see an error message like "command not found", you need to install brew.

    • To install brew, enter the following command in the terminal:
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
  • Verify that the installation is complete. Wait for the execution to finish, then re-run brew -v. If the version number is displayed, it means brew is installed successfully and you can continue installing FFmpeg.
  1. Continue executing the command brew install ffmpeg in the terminal. After the execution is complete, enter the command ffmpeg. If a long string of version information is output, it means FFmpeg has been installed successfully.