FFmpeg is an open-source and free cross-platform solution for streaming audio, video, recording and conversion. It can be used to convert media files to from one format to another and set sample rates, capture streaming audio/video, and resize videos. In this tutorial, we will show you how to install FFmpeg on Debian 10.
Before starting installation, you must have a non-root user account on your server with sudo privileges.
Installing FFmpeg on Debian
The FFmpeg package is included in standard Debian repositories and can be installed using
apt package manager. Currently, at the time of writing this article, the version of FFmpeg is
4.1.4 available in the Debian 10 repositories.
Perform the following steps to install FFmpeg on Debian 10:
1. Update the package index list:
First, you should update the package index list of your system
sudo apt update
2. Install FFmpeg
To install FFmpeg run the following command:
sudo apt install ffmpeg
3. Verify the FFmpeg installation
Once the installation complete, you can verify the installation by checking it’s version:
It should show output like the following:
ffmpeg version 4.1.4-1~deb10u1 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 8 (Debian 8.3.0-6)
Usually, Debian repositories does not have latest version, if you want to install the latest version of FFmpeg you’ll need to build the FFmpeg tools from source.
Following are the few basic examples for using the ffmpeg utility. While you convert the audio and video files using ffmpeg it will consider the files format itself.
To convert an audio .amr file to .mp3 run the following command:
ffmpeg -i filename1.amr filename2.mp3
Convert a video file from mp4 to webm:
ffmpeg -i input_file.mp4 output_filename.webm
You can specify the codecs by using the -c option. It can be a name of any supported decoder/encoder or a special value copy that simply copies the input stream.
Convert a video file from mp4 to webm using the libvpx video codec and libvorbis audio codec:
ffmpeg -i input.mp4 -c:v libvpx -c:a libvorbis output.webm
Convert an audio file from mp3 to ogg encoded with the libopus codec.
ffmpeg -i input.mp3 -c:a libopus output.ogg
You have learned how to install FFmpeg on Debian 10 system. To know more about convert and your video and audio files visit the official FFmpeg Documentation page
If you have any question of feedback, leave a comment below.