Table of Contents

Choose a different version or distribution


Before we begin talking about how to install and FFmpeg on Ubuntu 20.04, let’s briefly understand – What is FFmpeg?

FFmpeg is a powerful open-source software designed for recording, converting, and streaming audio and video files. It supports a wide range of formats and codecs and can be used on various operating systems including Windows, Linux, and Mac.

With FFmpeg, users can easily manipulate audio and video files, perform basic editing tasks, and even extract frames from videos. Its flexibility and versatility make it a popular tool for media professionals and enthusiasts alike. If you're looking for a reliable and comprehensive media tool, FFmpeg is definitely worth checking out!

In this tutorial, you will install FFmpeg on Ubuntu 20.04. We will also address some FAQs related to the FFmpeg installation.

Install FFmpeg on Ubuntu

FFmpeg packages are available in the official Ubuntu repository and may be installed using the apt package manager. This is the most straightforward method for installing FFmpeg on Ubuntu. Every six months, a new major version of FFmpeg is published, and the version provided in the repositories frequently lags behind.

The latest version of FFmpeg available in the Ubuntu 20.04 repositories is 5.0 at the time of writing this article. Enter the following command as root or a user with sudo access to install it:

sudo apt update
sudo apt install ffmpeg

Use the ffmpeg -version command to see what version of FFmpeg you have installed:

ffmpeg -version

To see a list of all available encoders and decoders in FFmpeg, type:

ffmpeg -encoders
ffmpeg -decoders

That is all there is to it. You can now use FFmpeg because it has been installed on your system.

You can upgrade the FFmpeg package using the command-line or your desktop Software Update utility when a new version is published.

FFmpeg Examples

We'll look at some simple examples of how to utilize the FFmpeg utility in this section.

Conversion basics

You don't have to specify the input and output formats when converting audio and video files using FFmpeg. The output format is estimated from the file extension, while the input format is auto-detected.

  • To convert an mp4 file to a webm file, run the following command:
ffmpeg -i input.mp4 output.webm
  • To convert an mp3 file to an ogg file, run the following command:
ffmpeg -i input.mp3 output.ogg

Specifying Codecs

Use the -c option to specify codecs when converting files. It can be the name of any decoder/encoder supported by the system, or a special value copy that simply copies the input stream.

  • Using the libvpx video and libvorbis audio codecs, convert an mp4 video file to webm:
ffmpeg -i input.mp4 -c:v libvpx -c:a libvorbis output.webm
  • Convert an mp3 file to an ogg file using the libopus codec.
ffmpeg -i input.mp3 -c:a libopus output.ogg

FAQs to Install and Use Curl on Debian 10 Linux

Can I install FFmpeg from a package manager on Ubuntu 22.04?

Yes, you can install FFmpeg from the Ubuntu package manager using the sudo apt-get install ffmpeg command.

How do I update FFmpeg on Ubuntu 22.04?

You can update FFmpeg on Ubuntu 22.04 by using the following command in the terminal:

sudo apt-get update && sudo apt-get upgrade ffmpeg.

Does FFmpeg support all audio and video formats on Ubuntu 22.04?

FFmpeg supports a wide range of audio and video formats on Ubuntu 22.04, but not all formats are supported. You can check the FFmpeg documentation for a list of supported formats.


We hope this detailed tutorial helped you to install FFmpeg on Ubuntu 22.04. Checkout their official documentation for more details.

If you have any queries or doubts, please leave them in the comment below. We'll be happy to address them.

Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to DevOps Tutorials - VegaStack.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.