July 8, 2025
Tutorials

How to Install FFmpeg in Debian 12

How to Install FFmpeg in Debian 12

FFmpeg is a multimedia framework, a valuable solution for any authors or developers who need to manipulate multimedia files. It enables decoding, encoding, transcoding, muxing, demixing, streaming, filtering, and playing pretty much anything that humans and machines have created. It’s easy to install FFmpeg on Debian 12 via the default Debian repository or Snapcraft. The steps include updating your list of packages and using the install command so the appropriate packages can be downloaded, as well as verifying that the installation was successful.

This article will explain how to install FFmpeg on Debian 12 in several ways.

Table of Content

How to Install FFmpeg in Debian 12

To install FFmpeg on Debian, use the Default Debian repository (apt package manager tools) or the Snap package manager and source code method. We can install FFmpeg through the following methods:

Method 1: Using the Default Debian Repository

The easiest way to install FFmpeg on Debian 12 is via the official Debian repository. We will install FFmpeg on Debian 12:

Step 1: Update Package Lists

First, refresh the repository lists for the most recent packages that are located in the repository:

sudo apt update
sudo apt update

Step 2: Install FFmpeg

This method will guarantee that you install FFmpeg along with all its dependent packages handled by your package manager. Let’s install FFmpeg using the apt:

sudo apt install ffmpeg -y
sudo apt install ffmpeg -y

Step 3: Verify Installation

So you can confirm it by checking the version of the installed FFmpeg:

ffmpeg -version
ffmpeg -version

That is all from this section.

Method 2: Using SnapCraft

Users who would prefer using FFmpeg as a snap package without needing to install it from a source can take advantage of SnapCraft. This is handy if you want a version of FFmpeg that perhaps is not found by default in the Debian repository.

Now, we install FFmpeg on Debian 12:

Step 1: Install Snapd

First of all, install Snapd if not already installed in the system:

sudo apt install snapd -y
sudo apt install snapd -y

Step 2: Install FFmpeg

It is a powerful tool that can be used to play, edit, and record multimedia files. The tool allows for the conversion of multimedia files, the transcode of multimedia files, and other multimedia tasks via the command line. After the installation of Snapd, the next step is to install FFmpeg from SnapCraft:

sudo snap install ffmpeg
sudo snap install ffmpeg

Method 3: Compiling from Source

For the power users who will want to build FFmpeg themselves with these options or be on the cutting edge, you can alternatively compile FFmpeg from source. Jump into our guide to install FFmpeg on Debian 12:

Step 1: Install Dependencies:

Before installing FFmpeg you have to make sure that all the dependent packages are available on your system:

sudo apt install apt-transport-https lsb-release ca-certificates build-essential git wget
sudo apt install apt-transport-https lsb-release ca-certificates build-essential git wget

Step 2: Clone FFmpeg Source

After that, check out the FFmpeg source code from the repository below:

git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg

Step 3: Compile FFmpeg

Step into the freshly cloned directory and build FFmpeg:

cd ffmpeg
./configure --disable-x86asm
./configure --disable-x86asm

Note: To resolve the nasm or yasm not found or too old error issue below sudo apt install yasm command on Debian 12, as it will install yasm on Debian 12.

Now let’s finish the configuration to install the ffmpeg on the Debian 12:

make
make

In the end, we can install the ffmpeg tool using a simple make install command like so:

sudo make install
sudo make install

Those are the main methods of installing FFmpeg on the Debian system.

How To Uninstall FFmpeg in Debian 12?

For removing FFmpeg from Debian 12, this is what you can do:

Method 1: Using the APT Package Manager

First off, in case you have access to the APT package manager, you can surely install it using it. APT is the default way to remove packages in Debian. Let’s remove FFmpeg using APT:

sudo apt purge ffmpeg -y
sudo apt purge ffmpeg -y

The above line will remove FFmpeg and its configuration files.

Now, to remove the dependent files, you can use this command:

sudo apt autoremove -y
sudo apt autoremove -y

Method 2: Using Snap Package Manager

If you were using Snap to install FFmpeg, use a new command to uninstall it:

sudo snap remove ffmpeg
sudo snap remove ffmpeg

It removes the snap package from the operating system.

Method 3: Compiling from Source

For those who have installed FFmpeg from the sources, the removal is a bit manual. Once you have changed to the directory where you originally built FFmpeg, you can use the make tool to uninstall it:

sudo make uninstall

Then to clean out all the remaining files you can just delete the FFmpeg directory:

sudo rm -r ffmpeg
sudo rm -r ffmpeg

After executing these methods, you should have successfully removed FFmpeg from your Debian 12.

Conclusion

To install FFmpeg on Debian 12, use the default Debian repository or the Snap package system. For the default (repository) method, open the terminal and run sudo apt update to update package lists. Then, you can install FFmpeg with sudo apt install ffmpeg -y and to verify the installation you can use ffmpeg –version. On the other hand, for the Snap, install snapd with sudo apt install snapd -y and then install FFmpeg with sudo snap install FFmpeg. Either method will result in you having FFmpeg installed on Debian 12.

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video