FFmpeg is a free open source toolset for working with multimedia files. It contains a set of shared audio and video libraries such as libavcodec, libavformat and libavutil. Using FFmpeg, you can convert between various video and audio formats, set sample rates, capture streaming audio/video and resize video.
This article describes how to install and use FFmpeg on Debian 10 Linux.
Installing FFmpeg on Debian
The official Debian repository contains the FFmpeg package, which can be installed using the apt
package manager. At the time of writing, the current version of FFmpeg available in the Debian 10 repository is 4.1.4
.
The following steps describe how to install FFmpeg on Debian 10, first updating the package list as root or as a user with sudo privileges.
|
|
Enter the following command to install the FFmpeg package.
|
|
Verify that the installation was successful by printing the FFmpeg version.
|
|
The output should be similar to the following.
To print all available FFmpeg encoders and decoders, the following command can be used.
|
|
FFmpeg is now installed on your system and you can start using it.
The version included in the Debian repository is always behind the latest version of FFmpeg. If you want to install the latest version of FFmpeg, you will need to build the FFmpeg tools from source.
Using FFmpeg
In this section we will present some basic examples on how to use the ffmpeg
utility.
Basic conversions
When converting audio and video files with ffmpeg
, it is not necessary to specify the input and output formats. Automatically detects the input file format and guesses the output format from the file extension.
To convert video files from mp4 to webm.
|
|
Convert audio files from mp3 to ogg.
|
|
Using codecs
When converting files, use the -c
option to specify a codec. It can be the name of any supported codec/encoder, or a special value copy
that just copies the input stream.
Use the libvpx
video codec and the libvorbis
audio codec to convert video files from mp4 to webm.
|
|
Convert audio files from mp3 to ogg encoded using the libopus
codec.
|
|
Conclusion
We have shown you how to install FFmpeg on Debian 10. You can now visit the official FFmpeg documentation and learn how to use FFmpeg to convert video and audio files.