How to Install FFmpeg on Linux

Published on January 20, 2024

Even in a Linux environment, it’s possible to work with multimedia files comfortably, provided you know what tools to use. One reliable tool to use is FFmpeg. It is a command-line tool designed to help users record, mix, transcode, or format multimedia content. FFmpeg is a cross-platform tool, and you can use it to manage any multimedia files.

The best part about it is that it comes with different audio and video libraries to ease how you use it by offering numerous functionalities. However, FFmpeg is not installed by default on Linux; there are simple steps that will guide you in installing it. This post shares two approaches that you can use to install FFmpeg on Linux.

Two Methods on How to Install FFmpeg on Linux

Like most Linux packages, there are different ways you can install FFmpeg. The common options include using the APT or from the snap store. Both options get the job done, but you will get different versions of the package. We’ve discussed each method and given the commands to use.

Method 1: Using APT

FFmpeg is available in the default Linux repository. For this case, we are using Ubuntu, and we can install FFmpeg using the apt command.

First, let’s update the repository to update the source list for the packages.

Copy

Once the update command is complete, the next step is to install FFmpeg. For that, run the below command.

Copy

Scroll down the terminal and answer the prompt. Press “y” to confirm that FFmpeg should be installed on your system. Notice that 222 MB of disk space will be used when you install the package.

Let the installation go to completion. Once it is complete, FFmpeg will have been installed on your system. To verify so, check its version.

Copy

If you get an output similar to the one below, showing the installed version, it signals that FFmpeg has been installed successfully. For our case, we have FFmpeg version 4.4.2.

Hopefully, you’ve followed the steps we’ve covered and run the commands to install FFmpeg on your system. That’s it for the first method on how to install FFmpeg on Linux.

Method 2: Install FFmpeg Via Snap

FFmpeg is available as a snap package on some Linux distros, such as Ubuntu. Therefore, you can install it and its dependencies via snap, and the installed version will be different from the one installed from the official Ubuntu repository via APT.

If you don’t have the snap tool available on your system, run the commands below to install it.

Copy

Next, install the snapd package.

Copy

In this case, we already have it installed; thus, the installation doesn’t run. However, your case might be different, and the snap package will initiate the installation.

Check the installed snap version to ascertain that the snap tool was installed successfully.

You are now ready to install FFmpeg from the Snap Store using the syntax below.

Copy

FFmpeg will start downloading from the snap store, and a progress bar will display on its right. Once it downloads, it will then get installed, and you will see an output like the one below.

Still, you can check the FFmpeg version to see which version was installed and as another way of confirming that your installation was successful.

That’s the second way how to install FFmpeg on Linux. Hopefully, you’ve decided on which method works best for you and utilized it to install FFmpeg on your Linux.

Conclusion

FFmpeg has proved to be among the leading multimedia frameworks that you can use in Linux. Whether you want to decode, encode, mix, mux, demux, or stream content, using FFmpeg on Linux gets the job done with ease. If you are stuck on how to install FFmpeg on Linux, we’ve shared two methods that you can use. First, you can use the APT to install it from the Ubuntu repository. Secondly, you can install FFmpeg as a snap package. Try both options and see which you are comfortable with.

New to LinuxMeta? Get Started Now! 

Instantly Deploy Linux & Windows KVM VPS at a Cheap Price