FFmpeg is a free, open-source, cross-platform multimedia framework that anyone can use to record, convert and stream audio and video online or via any application. It contains libraries like libavcodec, libavutil, libavformat, libavfilter, libavdevice, libswscale, libswresample, and others. Applications and other tools can use FFmpeg libraries for transcoding and playing multimedia files, providing the best technically possible solution. For more about FFmpeg, please visit its homepage. When you’re ready to install FFmpeg, follow the steps below:

Install FFmpeg on Ubuntu

FFmpeg comes via Ubuntu’s official repositories. It can be installed via Ubuntu default package manager, apt. This is the easiest way to install FFmpeg on Ubuntu. However, the version included in the repositories may not be the latest. At the time of writing this article, the current version of FFmpeg available in the Ubuntu 18.04 | 16.04 repositories is 3.4.6. The current latest version from the FFmpeg website is version 4.2.2. To install the stable version that comes in Ubuntu default repositories, simply run the commands below: To validate that the package is installed and working properly use the FFmpeg -version command. The command above should output something similar to the lines below: That’s it. FFmpeg stable version is now installed on your system, and you can start using it.

Installing FFmpeg via Repository

To get the latest version of FFmpeg which includes several new filters, encoders, and decoders, you may want to add a third-party PPA repository. To do that, simply run the commands below: To verify if FFmpeg is installed, run the commands below: It should output similar lines as shown below: That’s what you install via a third-party PPA.

Install via Snap

The easiest way to install FFmpeg latest on Ubuntu is by using the snappy packaging system. Snaps are applications packaged with all their dependencies to run on all popular Linux distributions from a single build. They update automatically and roll back gracefully. First, run the commands below to install the snap package manager and then install FFmpeg. After installing, use the command to verify the FFmpeg version. This is how one installs FFmpeg on Ubuntu.

Use FFmpeg

After installing FFmpeg, you can begin using it to convert multimedia files to different formats. For example, to convert from mp4 format to WebM, simply run the commands below To convert an audio file from mp3 to Ogg, run the commands below: There are more examples on the developer’s site. Go there and learn how to use FFmpeg. Conclusion: This post showed you how to install and use FFmpeg on Ubuntu 20.04 | 18.04. If you find any error above, please use the form below to report it. Thanks, You may also like the post below: