FFmpeg is an open-source, freely available multimedia framework, used to encode, decode, mux, demux, transcode, filter, stream and play all multimedia files that have been built on any media platform. You can compile and execute FFmpeg on any type of operating distribution such as Microsoft Windows, Linux, Mac OS, Solaris, and BSD systems. It offers different amazing features that we will implement in this article.
This article will describe how to install and use the FFmpeg multimedia framework on Debian 11 bullseye distribution. Let us start the implementation.
Prerequisites
- The Debian 11 bullseye distribution should be installed on your system.
- You need to log in with a user who has root or sudo privileges.
Installation of FFmpeg on Debian 11 Bullseye
By following the below-provided steps, you can install the FFmpeg framework on Debian 11 system:
Step 1: Update and Upgrade the list of the Debian packages
Open the command line window by searching the ‘Terminal’ application in the search bar. Before starting the installation of FFmpeg, it is recommended to update and upgrade the system apt cache by running the below-mentioned command:
$ sudo apt update && sudo apt upgrade
Step 2: Install FFmpeg on Debian 11
FFmpeg multimedia framework is available for installation in the official Debian repository. You can install this framework using the apt package manager on your system as follows:
$ sudo apt install ffmpeg
Press ‘y’ and then hit ‘Enter’ to continue the installation process. In a while, you will see that the installation of FFmpeg has been completed on your Debian 11 system.
Step 3: Verify FFmpeg installation
Once the installation is finished, you can check the installed FFmpeg version by issuing the following command:
$ ffmpeg -version
The installed FFmpeg version should display on the terminal as follows:
How to use the FFmpeg framework on Debian 11?
We will explore in this section some useful FFmpeg commands. The basic syntax of the primary FFmpeg command usage is given below:
ffmpeg [global_options] {[input_file_options] -i input_url} …{[output_file_options] output_url} …
Basic examples for using FFmpeg framework
Using FFmpeg, you can easily extract the audio or mp3 file from the mp4 video. The below-given syntax will use to extract the audio from the video file:
$ ffmpeg -i your-video.mp4 -vn audio.mp3
For example, we want to extract the audio from the sample_video.mp4 file. therefore, by running the following command you can perform this task:
$ ffmpeg -i sample_video.mp4 -vn new_audio.mp3
You will see the new mp3 file will be created in the current directory as follows:
Similarly, you can also convert the video.mp4 file to webm file by using the following command:
$ ffmpeg -i existing_videofile.mp4 new_file.webm
To explore more options and features about FFmpeg, you can get help using the following command:
$ ffmpeg -h
To display all supported formats, available encoder and decoders use the following commands:
$ ffmpeg -formats
$ ffmpeg -encoders
$ ffmpeg –decoders
Uninstall FFmpeg from Debian 11 bullseye
To uninstall the FFmpeg framework, issue the below-mentioned command:
$ sudo apt purge –remove ffmpeg
Conclusion
You learned in this article how to install and use the FFmpeg multimedia framework on Debian 11 bullseye distribution. We explored different options and useful FFmpeg commands for audio extraction from mp4 files. This is a lightweight and simple program. So, After installing the FFmpeg framework on your system, I hope you will never face any problem with file conversion.