Apr 28, 2025
Ariffud M. & Noviantika G.
6min Read
FFmpeg is an open-source, command-line tool for working with audio and video files. Many developers, content creators, and server administrators use it to convert formats, extract audio, or compress videos.
On virtual private servers (VPS), FFmpeg makes it easy to encode, stream, and manage media workflows. This is useful for resource-heavy tasks, such as hosting a video streaming server.
This guide will show you how to install FFmpeg on Linux, Windows, and macOS. By the end, you’ll have it set up on your preferred operating system and ready to handle your multimedia files.
Before installing FFmpeg, make sure your system meets these requirements:
To install FFmpeg on Linux, first open your terminal. On personal computers, simply launch the software and proceed to the first step.
Meanwhile, for VPSs, access your server via SSH with the following command in a terminal window, replacing your_vps_ip with your server’s IP address:
ssh root@your_vps_ip
Hostinger VPS customers can find their VPS IP in hPanel by navigating to the VPS overview area.

Hostinger also offers a Browser terminal feature, so you can run commands directly from your browser without using additional apps. To use it, hit the button in the top-right corner of your VPS dashboard. This will open a new tab where you can start executing commands.

Updating the package repository lets your Linux system access the latest software versions and prevents issues like missing dependencies during the FFmpeg installation.
Here’s how to update the package repository for different Linux distributions:
Debian and Ubuntu
Debian and its derivatives, like Ubuntu, use the apt package manager to refresh the package list from online repositories:
sudo apt update
Fedora and CentOS Stream
FFmpeg isn’t included in the official Fedora and CentOS Stream repositories managed by dnf. To install it, you need to add the RPM Fusion repository, which provides additional software packages:
sudo dnf -y install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm sudo dnf -y install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
After adding RPM Fusion, update the package list to include the new repository:
sudo dnf update
Arch Linux
Arch Linux uses the pacman package manager to synchronize the package database and update outdated information:
sudo pacman -Sy
Run one of these commands to install the FFmpeg package and its necessary dependencies based on your distribution:
Debian and Ubuntu
sudo apt install ffmpeg
Fedora and CentOS Stream
sudo dnf install ffmpeg
Arch Linux
sudo pacman -S ffmpeg
The above commands will also automatically configure FFmpeg, so it’s ready to use after installation.
Append the -y option for Debian and Fedora or –noconfirm for Arch Linux to skip confirmation when installing FFmpeg. For example:
sudo apt install -y ffmpeg
To check if FFmpeg was installed successfully, type the command below:
ffmpeg -version
This will display the installed FFmpeg version and details like build configurations and supported codecs. The output should look similar to this:

That’s it! You’re now ready to use FFmpeg for your media tasks.
Furthermore, to update FFmpeg to the latest version, use the appropriate command for your distribution:
sudo apt update && sudo apt upgrade # Debian and Ubuntu
sudo dnf upgrade # Fedora and CentOS Stream
sudo pacman -Syu # Arch Linux
Run these commands at least once a month to keep FFmpeg and your system packages up to date.
Learn how to compress videos without losing quality to save bandwidth and reduce disk space usage on your streaming server.
Installing FFmpeg on Windows involves downloading the required files, organizing them, and updating the PATH variable to use FFmpeg from the command prompt. Here are the steps:




C:\FFmpeg\bin
ffmpeg
If the installation succeeds, FFmpeg will display version information and configuration details.

However, if you encounter any problems:
You can install FFmpeg on macOS in several ways, including manually downloading files like on Windows. However, the easiest method is using Homebrew, a macOS package manager similar to Debian and Ubuntu’s apt.
Here’s how to set up FFmpeg with Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew --version
brew update brew upgrade
brew install ffmpeg
If you want the latest features, install the Git master version instead by adding the –HEAD flag:
brew install ffmpeg --HEAD
ffmpeg
Differences between FFmpeg’s regular and Git master versions
Here’s a quick comparison between the regular and Git master versions of FFmpeg:
| Aspect | Regular version | Git master version |
| Command | brew install ffmpeg | brew install ffmpeg –HEAD |
| Stability | Highly stable and reliable | Less stable; may contain experimental code |
| Features | Limited to the last release’s features | Includes the latest features and updates |
| Compatibility | Tested for compatibility with systems | May cause compatibility issues |
| Use case | General use, production environments | Development or testing purposes |
Choose the regular FFmpeg version for a stable and reliable experience, which is ideal for everyday use or production tasks. In contrast, select the Git master option if you want the latest features or cutting-edge tools for development and experiments.
Installing FFmpeg on Linux, Windows, and macOS is simple. You can use package managers like apt or Homebrew or manually download the required files. With FFmpeg installed, you’re ready to explore its powerful features for working with multimedia files.
For example, you can convert video formats with a simple command:
ffmpeg -i input.mp4 output.avi
Or, extract audio from a video file like this:
ffmpeg -i input.mp4 -q:a 0 -map a output.mp3
These are just a few examples of FFmpeg’s versatility. You can also use other commands to compress videos, create GIFs, and merge audio files. If you have any questions about FFmpeg, feel free to drop them in the comments below!
FFmpeg works on Linux, Windows, and macOS. Make sure you have at least 100 MB of free storage for installation and dependencies. We also suggest a system with a dual-core CPU and 2 GB of RAM for reliable performance, especially when handling large video and audio files.
Run the following command in the terminal (Linux and macOS) or the command prompt (Windows) to see if you’ve successfully installed FFmpeg:
Linux. ffmpeg –version
Windows/macOS. ffmpeg
Yes, you can uninstall FFmpeg if you no longer need it with:
Linux. sudo apt remove ffmpeg
Windows. Delete the FFmpeg folder and remove its PATH entry from the system variables.
macOS. brew uninstall ffmpeg
All of the tutorial content on this website is subject to Hostinger's rigorous editorial standards and values.