How to Download and Install FFMPEG in Debian 12 – LinuxWays
FFmpeg is a command line tool used for audio and video converting applications and is available on various operating systems, including Debian 12. It provides free access to multiple audio and video libraries that help in the manipulation of multimedia content. Moreover, having a rich set of features gives the users the privilege of performing a variety of tasks like converting the formats of an audio and video file or editing the audio and video file.
How to Download and Install Ffmpeg on Debian 12
FFmpeg is an open-source software that allows the community of developers and users to improve the functionality of the tool by making changes in the source code. To install FFmpeg on Debian 12 there are various methods, but before that, there are some prerequisites that are necessary for a smooth installation process.
Prerequisite for Installing the FFmpeg on Debian 12
Before installing any software or application, there are some libraries, or any other tool required that facilitates the installation process of the respective application. So in the case of FFmpeg execute the below-mentioned command to install the necessary tools:
sudo apt install apt-transport-https lsb-release ca-certificates build-essential git wget
Once the necessary tools have been installed, to install FFmpeg on Debian 12 there are various methods:
Method 1: Through Default Package Manager
One of the most easiest and most straightforward ways to install FFmpeg on Debian 12 is by using its default package manager. Though the version of the application might be a little old if you do not have any preference regarding the version, then just execute:
sudo apt install ffmpeg -y
Now once the installation is completed, verify it by checking the version of FFmpeg installed on Debian 12 and for that execute:
Further, if you are using FFmpeg for the first time then it is advisable to check the commands associated with this tool and for that execute:
Removing FFmpeg through apt
To remove this command line tool if installed using the default package manager then just execute:
sudo apt remove ffmpeg -y
Method 2: Through Snap Package Manager
Another way to get FFmpeg installed on Debian 12 is by using the snap package manager which is just like the default one. However, it comes with an active community comprising developers and users who help each other in case of any query or issues. To install FFmpeg on Debian 12 using the snap package, adhere to the following steps:
Step 1: Install Snapcraft
By default, the snap package manager is not installed on Debian 12, so the user has to install it by himself and for that execute:
sudo apt install snapd -y
Step 2: Install FFmpeg on Debian 12
Once the snap package manager is installed install the FFmpeg on Debian 12 by executing:
Step 2: Reboot the System and Verify
Once the installation is completed, restart the Debian 12 to apply the changes in the system and afterward verify the installation by checking the version installed:
Remove FFmpeg Through Snap Package
To remove this command line tool if installed using the snap package manager then just execute:
Method 3: Through the source file
If you are looking to install the latest version of FFmpeg, then the best possible way is to get the latest version source file from its official website. The benefit of having the latest version is that it may have some new features and relatively fewer bugs than its previous versions. So, to install FFmpeg on Debian 12 using its source file here are some steps that are to be followed:
Step 1: Install the Necessary Build Tools
To install FFmpeg on Debian 12 through its source file it is necessary to have some build tools installed on the system which are required to configure the source file. Here is the detail for the packages that we have to install:
- build-essential: This package contains the essential tools for building most other packages from a source like C/C++ compiler, libc, and make.
- nasm: This package provides the Netwide Assembler, a portable 80×86 assembler.
- yasm: This package provides the Yasm Modular Assembler, a complete rewrite of the NASM assembler.
- ibx264-dev: This package provides the development files for libx264, which is a library that encodes video streams into the H.264/MPEG-4 AVC format.
- libx265-dev: This package provides the development files for libx265, which is a library that encodes video streams into the H.265/HEVC format.
- ibvpx-dev: It provides the development files for libvpx which is a library that encodes and decodes video in the VP8 and VP9 formats.
- libmp3lame-dev: This package provides the development files for libmp3lame which is a library that encodes audio into the MP3 format.
- ibopus-dev: This package provides the development files for libopus that encode audio into the Opus format.
So now to install these packages on Debian 12 by executing:
sudo apt install build-essential nasm yasm libx264-dev libx265-dev libvpx-dev libmp3lame-dev libopus-dev
Step 2: Create FFmpeg Directory
Now create the directory for the FFmpeg tool and then navigate to that directory:
Step 3: Download and Extract the Source File
Now download the source file for FFmpeg in the directory created in the previous step, either by copying the download link or by directly downloading the file from the official website:
wget https://ffmpeg.org/releases/ffmpeg-6.0.1.tar.xz
Once the file is successfully downloaded, extract it using the tar command in the same directory:
tar -xf ffmpeg-6.0.1.tar.xz
Step 4: Configure and Install the Source File
Now navigate to the extracted folder of the source file and then configure the file by executing:
The configuration process might take up to several minutes and once the configuration is completed install the source file using the make tool for that execute:
Step 5: Reboot and Verify the Installation
Once the installation is completed, reboot the system and then verify the installation of FFmpeg tool by executing:
Removing FFmpeg Installed Through the Source File
Now to remove the tool completely from Debian 12 if installed through the source file there are some steps that are to be followed:
Step 1: Reconfigure the Extracted File
Navigate to the directory where the source file was extracted and then configure its files again by executing:
Step 2: Uninstall FFmpeg from Debian 12
After the configuration is done, uninstall the tool by using the make tool and for that just execute:
Now to remove the tool completely from the system delete its files:
Conclusion
FFmpeg is an audio and video manipulation tool that is available on various operating systems, including Debian 12. The FFmpeg can be installed on Debian 12 in various ways: through source file, snap package, and its default package manager.