In this article, we will have explained the necessary steps to install and configure FFmpeg on Ubuntu 20.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with
sudo privileges. All the commands in this tutorial should be run as a non-root user.
FFmpeg is a free and open-source program for managing multimedia files. This program consists of various audio and video libraries such as libavcodec, libavformat, and libavutil. With this FFmpeg, you can convert multimedia files, adjust bitrate, change video size, and so on.
Install FFmpeg on Ubuntu 20.04
Step 1. First, before you start installing any package on your Ubuntu server, we always recommend making sure that all system packages are updated.
sudo apt update sudo apt upgrade
Step 2. Install FFmpeg on Ubuntu system.
Run the following command in the Terminal to install FFmpeg:
sudo apt install ffmpeg
Once the process completes, FFmpeg should now be installed on your system. You can verify that it’s installed and check the version number with this command:
$ ffmpeg -version ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
Step 3. FFmpeg Basic Commands.
Here is the list of the FFmpeg basic command options used with
ffmpeg command-line tool:
ffmpeg -version: show version ffmpeg -formats: show available formats ffmpeg -codecs: show available codecs ffmpeg -decoders: show available decoders ffmpeg -encoders: show available encoders ffmpeg -bsfs: show available bit stream filters ffmpeg -protocols: show available protocols ffmpeg -filters: show available filters ffmpeg -pix_fmts: show available pixel formats ffmpeg -layouts: show standard channel layouts ffmpeg -sample_fmts: show available audio sample formats
Step 4. FFmpeg Examples.
Below are some examples of FFmpeg command-line applications. Reduce .mov File Size FFmpeg command line:
ffmpeg -i in.mov -c:v libx264 -c:a copy -crf 20 out.mov
How to Convert .mov To .mp4:
ffmpeg -i in.mov -vcodec copy -acodec aac -strict experimental -ab 128k out.mp4
That’s all you need to do to install FFmpeg on Ubuntu 20.04 LTS Focal Fossa. I hope you find this quick tip helpful. For further reading on FFmpeg, please refer to their official knowledge base. If you have questions or suggestions, feel free to leave a comment below.