FFmpeg is an open-source multimedia application used for streaming, basic video editing, format conversion, and fetching metadata for multimedia files. It’s a command line tool which makes it a suitable choice for the Debian user having sound knowledge of using its CLI. On Debian 12 there are three ways to install FFmpeg and this blog post will discuss all of them in detail.
1: Through Debian Default Package Manager
Most of the applications on Debian can be installed through its default app installer So in the case of FFmpeg execute the below command:
sudo apt-get install ffmpeg
To verify the installation FFmpeg checks its version installed on Debian by executing the below command:
ffmpeg -version
2: Through The FFmpeg Source File
The installation of applications on Debian 12 through the source file generally comes with their latest or considerably newer versions as compared to installation through other package managers. To install FFmpeg using its source file you need to first download the FFmpeg source file from its official website:
Alternatively, you can download the source file using the Debian 12 terminal using its download link along with wget utility:
wget https://ffmpeg.org/releases/ffmpeg-7.0.1.tar.xz
Next, extract the FFmpeg source file using the tar command in Debian by executing:
sudo tar -xf ffmpeg-7.0.1.tar.xz
Once the source file is extracted the next step is to configure the files to create a make file. While executing the configure file you might get the error of nasm/yasm not found or too old as in the image below:
To fix the nasm/yasm not found or too old error simply execute the command below that installs yasm on Debian 12:
sudo apt-get install yasm
Now execute the configure file to make the build file or in other words the make file for FFmpeg:
./configure
Now compile the make file created when the configure file is executed:
sudo make
Next, install FFmpeg on Debian using the created make file by executing the command below:
sudo make install
Once the FFmpeg is installed on Debian reboot the system to apply the changes and then check the version of FFmpeg:
ffmpeg -version
Here you can see that the version of FFmpeg installed via source file on Debian 12 is 7.0.1 while in the previous method, it was 5.1 which is an older version:
3: Through Snap Package Manager
The third and last method for installation of FFmpeg on Debian is by using the Snap package installer. To install it simply execute:
sudo snap install ffmpeg
Now to check if FFmpeg is successfully installed on Debian list all the apps installed via Snap package manager:
sudo snap list
4: Through GitHub (GUI) (Unsuccessful)
There is another method that I have tried for FFmpeg GUI installation but got stuck on the errors while launching its GUI application named ViComp. For that first I have installed cmake utility:
sudo apt install cmake
Next, I downloaded the ViComp file from GitHub:
Since it was a zip file so I used the unzip utility to extract the file:
sudo unzip ViComp-main.zip
Next, I created a directory named FFMPEG_GUI in my Downloads directory where the file for ViComp file will be built. Next, I have changed my permissions to read write, and execute for both the created directory and the extracted directory. Next, I installed the gcc compiler which will be used while building the file for ViComp:
sudo apt install gcc
Next, I encountered various errors for qt so first I installed qtbase5:
sudo apt install qtbase5-dev
Along with qt based I installed qtdeclarative5-dev on Debian:
sudo apt install qtdeclarative5-dev
Now I used the cmake utility to create a build file of FFmpeg GUI by executing the below command:
cmake -S /home/arnold/Downloads/ViComp-main -B /home/arnold/Downloads/FFMPEG_GUI
Next, I used the make utility to compose the make configuration file for installation:
make
Now I installed the make file for ViComp a GUI for FFmpeg:
sudo make install
Now here in the image below you can see that it is successfully installed:
However, as soon as I launched it I got this error of import requires a version:
The purpose of sharing this all is that if anyone comes across installing this GUI version for FFmpeg then he/she should not waste an awful amount of time in carrying out the whole process or at least try to fix this error on the launch.
Conclusion
On Debian, FFmpeg can be installed in three ways which include using its apt package installer, Snap package manager, or source file for FFmpeg. The recommended way to install FFmpeg on Debian 12 is using its source file as it comes with its latest version as compared to the other two methods.