How To Install FFmpeg in Debian 12

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

installing FFmpeg on Debian using apt package manager

To verify the installation FFmpeg checks its version installed on Debian by executing the below command:

ffmpeg -version

Checking version of FFmpeg on Debian 12 installed through apt package manager

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:

Downloading FFmpeg tar file On Debian 12 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

Downloading FFmpeg tar file On Debian using its download link

Next, extract the FFmpeg source file using the tar command in Debian by executing:

sudo tar -xf ffmpeg-7.0.1.tar.xz

Extracting FFmpeg tar file on Debian using tar utility

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:

nasm/yasm not found or too old error on Debian

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

Installing nasm on Debian 12 to fix nasm/yasm not found or too old error on Debian

Now execute the configure file to make the build file or in other words the make file for FFmpeg:

./configure

executing the configuration file for installing FFmpeg on Debian through is tar file

Now compile the make file created when the configure file is executed:

sudo make

Creating a make file for FFmpeg installation on Debian 12 through its tar file

Next, install FFmpeg on Debian using the created make file by executing the command below:

sudo make install

Installing FFmpeg on Debian using its make file

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:

Checking version of FFmpeg on Debian installed through its tar file

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

Installing FFmpeg on Debian 12 through Snap Package manager

Now to check if FFmpeg is successfully installed on Debian list all the apps installed via Snap package manager:

sudo snap list

Listing apps installed by Snap Package manager on Debian to see if FFmpeg is installed correctly

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

Installing cmake on Debian to install ViComp a GUI version of FFmpeg

Next, I downloaded the ViComp file from GitHub:

Downloading FFmpeg GUI version ViComp zip file on Debian through GitHub

Since it was a zip file so I used the unzip utility to extract the file:

sudo unzip ViComp-main.zip

Extracting FFmpeg ViComp GUI version zip file on Debian 12

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

Building the installation file of FFmpeg GUI version ViComp on Debian

Next, I used the make utility to compose the make configuration file for installation:

make

Creating a make file for FFmpeg GUI version ViComp on Debian 12

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:

Installing the ViComp GUI version of FFmpeg on Debian using its make file

However, as soon as I launched it I got this error of import requires a version:

qrc:/main.qml: library import requires a version error while launching ViComp FFmpeg GUI version on Debian

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.

 

Index
Scroll to Top