Install FFmpeg On Ubuntu 22.04 LTS
What Is FFmpeg?
FFmpeg is a cross-platform solution to record, convert and stream audio and video. It is an open-source tool that is used to decode, encode, transcode, mux, demux, stream, filter, and play multimedia files.
In this tutorial, we will show you the easy way to install FFmpeg on Ubuntu 22.04 LTS.
Install FFmpeg On Ubuntu 22.04 LTS
First, run the following commands to upgrade and update your Ubuntu 22.04 LTS:
sudo apt update &&sudo apt upgrade
Now, it’s time to install FFmpeg on Ubuntu 22.04 LTS. FFmpeg packages are available on Ubuntu repositories by default. You can easily install it with the apt command.
sudo apt install ffmpeg
To see the version of FFmpeg installed in your system, run the following command.
ffmpeg -version
Run the following command to know the available encoders or decoders:
ffmpeg -encoders ffmpeg -decoders
How To Convert Files Using FFmpeg On Ubuntu 22.04 LTS
Run the following command to Convert a video file from mp4 to WebM:
ffmpeg -i file1name.mp4 output-file.webm
Run the following command to force the frame rate of the output file to 24 fps:
ffmpeg -i inputfilename.avi -r 24 output.avi
Run the following command to Convert an audio file from mp3 to ogg:
ffmpeg -i itsubuntu.mp3 itsubuntu.ogg
Run the following command to set the video bit rate of the output file to 64 kbit/s:
ffmpeg -i inputfilename.avi -b:v 64k -bufsize 64k output.avi
Just in case you want to remove FFmpeg from your Ubuntu, then run the following command:
sudo apt remove ffmpeg