Install FFmpeg On Ubuntu 18.04 LTS

In this tutorial, we are going to install FFmpeg on Ubuntu 18.04 LTS. FFmpeg is an open source tool which is used for trans-coding multimedia files. ffmpeg is a very fast video and audio converter and can convert between arbitrary sample rates and resize video on the fly with a high quality poly-phase filter.

Install FFmpeg On Ubuntu 18.04 LTS

Steps 1:

FFmpeg is already available on official Ubuntu repositories. There might be the different version available in the repository other than in official link. Let’s check out the method to to install FFmpeg 3.x version on Ubuntu 18.04.

At first update your system:

sudo apt update

Now, Install FFmpeg in Ubuntu by running following command.

sudo apt install ffmpeg

To see the version of FFmpeg installed in your system, run the following command.

ffmpeg -version</s

In order to list out all  available FFmpeg’s encoders and decoders type:

ffmpeg -encoders
ffmpeg -decoders

Steps 2:

In this method, we will install FFmpeg version 4.x on Ubuntu 18.04. Sad thing is that it is not available in official repository of the Ubuntu so we will be using third party PPA. Let’s add PPA first by running following command.

sudo add-apt-repository ppa:jonathonf/ffmpeg-4

Execute the following command to install FFmpeg version 4.x on Ubuntu 18.04 LTS.

sudo apt install ffmpeg

Check the version.

ffmpeg -version

How To Convert Using FFmpeg

To Convert a video file from mp4 to webm:

ffmpeg -i file1.mp4 output-file.webm

To force the frame rate of the output file to 24 fps:

ffmpeg -i input.avi -r 24 output.avi

To Convert an audio file from mp3 to ogg:

ffmpeg -i omgfoss.mp3 itsubuntu.ogg

To set the video bit-rate of the output file to 64 kbit/s:

ffmpeg -i input.avi -b:v 64k -bufsize 64k output.avi

Let us know if there is any errors in this tutorial post. Don’t forget to share if you like this post.

READ More Relevant Stuff:  How To Migrate Settings And Data From Ubuntu To Another Ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *