When you download FFmpeg directly from an official build (e.g., a ZIP file), you need to manually add the bin folder to your system's Path environment variable. This ensures that the FFmpeg tools (ffmpeg, ffprobe, etc.) can be accessed globally from any terminal or command line.
Below are detailed steps for Windows, macOS, and Linux:
-
Extract FFmpeg:
- Download the FFmpeg ZIP file from the official FFmpeg website.
- Extract it to a folder, such as
C:\ffmpeg\(or any location of your choice).
-
Locate the
binDirectory:- Inside the extracted folder, navigate to the
bindirectory, e.g.,C:\ffmpeg\bin.
- Inside the extracted folder, navigate to the
-
Add to Environment Variables:
- Press
Win + R, typesysdm.cpl, and hit Enter to open System Properties. - Go to the Advanced tab and click on Environment Variables.
- In the "System variables" section, find and select the variable named Path. Click Edit.
- Click New and add the full path to the FFmpeg
bindirectory (e.g.,C:\ffmpeg\bin). - Click OK to save and close all dialogs.
- Press
-
Verify:
- Open a Command Prompt or PowerShell and type:
ffmpeg -version
- If FFmpeg is correctly added, you'll see the version information.
- Open a Command Prompt or PowerShell and type:
-
Download FFmpeg:
- Extract the FFmpeg build (e.g., using
taror double-click to unzip).
- Extract the FFmpeg build (e.g., using
-
Move the
binDirectory:- Optionally, place the FFmpeg folder in
/usr/local/or another preferred directory. For example:sudo mv ffmpeg /usr/local/ffmpeg
- Optionally, place the FFmpeg folder in
-
Add to
Path:- Open a terminal and edit your shell configuration file (
.zshrcfor Zsh or.bashrcfor Bash):nano ~/.zshrc - Add the following line:
export PATH="/usr/local/ffmpeg/bin:$PATH"
- Save and exit (
Ctrl + O,Ctrl + Xin nano).
- Open a terminal and edit your shell configuration file (
-
Reload Configuration:
- Reload the shell configuration:
source ~/.zshrc
- Reload the shell configuration:
-
Verify:
- Run the command:
ffmpeg -version
- FFmpeg version details should appear.
- Run the command:
-
Download and Extract:
- Download the FFmpeg build and extract it:
tar -xvf ffmpeg-release.tar.gz
- Download the FFmpeg build and extract it:
-
Move the
binDirectory:- Move FFmpeg to a suitable location, such as
/usr/local/ffmpeg:sudo mv ffmpeg /usr/local/ffmpeg
- Move FFmpeg to a suitable location, such as
-
Add to
Path:- Open your shell configuration file (
~/.bashrc,~/.profile, or~/.zshrc):nano ~/.bashrc - Add the following line:
export PATH="/usr/local/ffmpeg/bin:$PATH"
- Open your shell configuration file (
-
Reload Configuration:
- Reload the shell configuration:
source ~/.bashrc
- Reload the shell configuration:
-
Verify:
- Run:
ffmpeg -version
- FFmpeg should display its version information.
- Run:
By adding FFmpeg's bin folder to the Path environment variable, you make the FFmpeg tools available globally on your system.
This process is necessary when you download and extract FFmpeg manually, as opposed to installing it via package managers.
Follow the platform-specific steps to ensure FFmpeg runs seamlessly from any terminal or command line.