Ubuntu

How to Install FFmpeg on Ubuntu 20.04 LTS

Introduction:

FFmpeg is a software that is designed to handle videos, audios, and other multimedia files of different types. A major plus point about this software is that it is absolutely free and open source. It is very widely used for video and audio editing and the conversion of videos and audios from one format to another. It supports a wide range of different multimedia formats. Another great thing about this software is that it can be used across different platforms i.e. Linux, Mac, and Windows. In this article, we will show you the method of installing FFmpeg on Ubuntu 20.04 LTS.

Method of Installing FFmpeg on Ubuntu 20.04 LTS:

Since there are no pre-requisites for this method, therefore, we will head on towards the installation of FFmpeg on Ubuntu 20.04 straightaway. Perform the steps mentioned below for achieving this goal:

Step # 1: Update your System:

Open a new terminal window in Ubuntu 20.04 by searching for it in the Activities menu. The Ubuntu 20.04 terminal has the following interface:

Before installing FFmpeg on Ubuntu 20.04, a system update is required which can be done by running the command mentioned below in your terminal:

sudo apt update

Running this command will ensure that there are no broken dependencies or packages that will have the potential to interfere in your installation process.

Once the system cache has been updated, you will witness the following output on your terminal window:

Step # 2: Run the Installation Command:

Now when you have ensured that your system has been fully updated, it is the best time to run the FFmpeg installation command in your terminal which is shown below:

sudo apt install ffmpeg

Like every other package installation, during the execution of the installation command, you will be asked to confirm whether you want to proceed with it or not. You can type “Y” in your terminal followed by pressing the Enter key for verifying your choice as shown in the following image:

After the successful installation of FFmpeg on Ubuntu 20.04, your terminal will display the output shown in the image below:

Step # 3: Check the Version of FFmpeg:

Up till this step, FFmpeg has already been installed on your system however, you can still confirm if it is there on Ubuntu 20.04 or not by checking its version. The version of any package can be checked by entering that package’s name followed by the “-version” command. It is also stated below:

ffmpeg –version

Executing this command will show you a lot of information regarding FFmpeg however, the very first line of the output will indicate its version which is highlighted in the following image:

Step # 4: Check the Installed Encoders:

Optionally, you can also check all the encoders installed along with FFmpeg by printing them on the terminal. The encoders can be printed by typing the command stated below in your Ubuntu 20.04 terminal:

ffmpeg –encoders

Running the above-mentioned command will display all the encoders of FFmpeg on your terminal as shown below:

Step # 5: Check the Installed Decoders:

Again, it is optional to check all the decoders that are installed along with FFmpeg by printing them on the terminal. The decoders can be printed by executing the command stated below in your Ubuntu 20.04 terminal:

ffmpeg –decoders

Running the above-mentioned command will display all the decoders of FFmpeg on your terminal as shown below:

Example # 1: Converting an .mp3 Audio File to .wav using FFmpeg:

For this example, we have an .mp3 file located in our Home directory as shown in the image below:

Our goal is to convert this .mp3 file to .wav file for which we will first launch the terminal and type the following command in it:

ffmpeg –i Audio.mp3 Audio.wav

Here, you can replace the first Audio with the name of your input file and the second Audio with whatever name you want to give to your output file.

After this command has been executed successfully, following output will appear on your terminal:

To verify if the conversion has taken place or not, go to your Home directory again and you will be able to see another audio file with the .wav extension along with the .mp3 file as highlighted in the image shown below:

Example # 2: Converting an .mp4 Video File to .mov using FFmpeg:

For this example, we have an .mp4 file located in our Home directory as shown in the image below:

Our goal is to convert this .mp4 file to .mov file for which we will first launch the terminal and type the following command in it:

ffmpeg –i Video.mp4 Video.mov

Here, you can replace the first Video with the name of your input file and the second Video with whatever name you want to give to your output file.

After this command has been executed successfully, following output will appear on your terminal:

To verify if the conversion has taken place or not, go to your Home directory again and you will be able to see another video file with the .mov extension along with the .mp4 file as highlighted in the image shown below:

Conclusion:

This is how you can conveniently install FFmpeg on your Ubuntu 20.04 system and can use it for video and audio editing and conversions from one format to another. It took us around 5 minutes to execute the whole installation process.

Similar Posts