Installing FFmpeg on Debian 12: Two Methods

FFmpeg is the multimedia open-source software that provides tools to use and edit multimedia files. The unique thing about this software package is that it is used from the command line interface. 

It is used for the conversion of multimedia files from one format to another, also editing multimedia files and streaming them over the internet using FFmpeg. 

It can be installed on different Linux distributions, however, the installation methods of FFmpeg on Debian 12 have been explained in this guide. 

What are the Two Installation Methods of FFmpeg on Debian 12?

Different installation techniques can be used for FFmpeg on Debian 12, but the two most popular of them are:

  • Using the Default Debian’s Repository
  • Using the SnapCraft

Method 1: Install FFmpeg on Debian 12 Using the Default Debian’s Repository

Default Debian’s repository contains hundreds of packages that can be installed on it with the apt package manager. FFmpeg can also be installed from Debian’s default repository by following the steps. 

Step 1: Launch the Terminal

First, open the terminal of Debian for the installation of the FFmpeg using the CTRL+ALT+T shortcut key:

Step 2: Update the Packages

For the installation of the updated version of FFmpeg on Debian 12, use the “update option of the apt package manager:

$ sudo apt update

Step 3: Show the FFmpeg Package

To display the version and other details of “FFmpeg” available in Debian’s default repository, use the “show” option of the apt command:

$ sudo apt show ffmpeg

Step 4: Install the FFmpeg on Debian 12

Use the “install” option of the apt package manager for the installation of FFmpeg:

$ sudo apt install ffmpeg -y

Step 5: Verify the Installation

To verify the installation of the FFmpeg on Debian 12, display the installed version:

$ ffmpeg --version

How to Uninstall FFmpeg on Debian 12?

To uninstall the FFmpeg on Debian 12 with all its associated files, use the “purge” option of the apt command:

$ sudo apt purge ffmpeg -y

Method 2: Install FFmpeg on Debian 12 Using the SnapCraft

Another most known installation method for the “FFmpeg” is the SnapCraft. Opened the official website to explore the FFmpeg’s snap details in the web browser:

To download and install the snap of FFmpeg from SnapCraft, install the “snapd” command utility:

$ sudo apt install snapd -y

Now use the following command for downloading and install the FFmpeg from SnapCraft:

$ sudo snap install ffmpeg

The package of FFmpeg is successfully installed and ready to use. 

What is the Basic Usage of FFmpeg on Debian 12?

The basic usage of the FFmpeg on Debian 12 has been explained in this section.

Reduce a Video Size Using the FFmpeg

To reduce a video Size using the FFmpeg with the below-mentioned command:

$ ffmpeg -i [input_video.mp4] -vcodec libx265 [output_video.mkv]

More details to reduce the video size can be explored from the mentioned blog.

Cut & Crop a Video Using the FFmpeg

Also, FFmpeg can be used to cut and crop a video by following the blog:

Convert Videos Using the FFmpeg

FFmpeg can also be used for the conversion of videos from one video format to another. To explore more about this, open the link in the web browser:

Record a Webcam Video Using the FFmpeg

Users can also use the FFmpeg to record a video using the webcam with the following command:

$ ffmpeg -f v4l2 -i /dev/video0 [output_video.mp4]

Check the Video Information Using the FFmpeg

To explore the information in the video, use the following FFmpeg command:

$ ffmpeg -i [input_video.mp4]

This is all about the installation of the FFmpeg on Debian 12. 

Conclusion

To install FFmpeg on Debian 12 either run the command “sudo apt install ffmpeg -y” or “sudo snap install ffmpeg” in the terminal. The first installation method is by using Debian’s default repository and the other one is from SnapCraft. This blog explained both methods with the step-by-step guide and also discussed the basic usage of FFmpeg on Debian 12.