How to install FFmpeg on Linux

is an all-in-one multimedia codex that can convert audio and video to different formats and is available as a command line tool. FFmpeg can convert most audio and video formats, it can also edit and stream media files. Here we will show you how to install it on your Linux based.

Here are some of the features of FFmpeg:

  • Extract audio from a series of video files
  • Extract only video without audio
  • Resize video files
  • Cut existing video into smaller clip
  • Merge videos
  • Convert audio and video

Remember that whatever version of Linux you are using, you can check if FFmpeg is installed or what version is running with the following command:

ffmpeg -version

A typical output of this command would look like the following:

Install FFmpeg on Ubuntu

Installing FFmpeg 4, the latest version, on Ubuntu 14.x and higher is easy.

We will install FFmpeg from the mc3man ppa. PPA stands for Personal Package Archives which are supported by the Ubuntu community.

To add this PPA we need to run:

sudo apt-get install -y software-properties-common add apt-repository ppa:mc3man/trusty-media

After the PPA is installed, continue with the repository update by running:

apt-get update apt-get dist-upgrade

Finally, to install ffmpeg we have to execute:

apt-get install ffmpeg

This completes the ffmpeg installation. To check the version use the following command:

ffmpeg -version

Install FFmpeg on Debian

To install FFmpeg on Debian 9 – Stretch, you must be logged in as the root user. FFmpeg package uses package manager apt for installation, which is available in the official Debian repository.

See also  Drupal vs Joomla: Comparison of two top-tier content management systems

First update the list of packages using:

apt update

After this we can run the following command to install FFmpeg:

apt install ffmpeg

If you are using Debian 8 – Jessie, FFmpeg will not be available in the official repository; however, the Debian media repository can be used to install the codex.

We will have to add the Debian media repository. To achieve this, we need to edit the file /etc/apt/sources.list. This file contains the list of repositories used by APT. To edit this file, you can use a terminal editor like elder brother either saw.

Open the file with the following command and press Yo (Insert) to start editing:

vi /etc/apt/sources.list

Add the following lines to the file:

deb http://www.deb-multimedia.org jessie main non-free deb-src http://www.deb-multimedia.org jessie main non-free # jessie-backports deb http://ftp.debian.org /debian/ jessie-backports main

To save what you edited in the editor saw press esc. To exit the editor press : and run what!

Now we have to install the package deb-multimedia-keyring. First, we’ll update, then we’ll install and update once again. This ensures that all changes are updated and logged correctly.

apt update apt install deb-multimedia-keyring apt update

When you’re done, install the FFmpeg package using:

apt install ffmpeg

To validate the installation on Debian use the following command:

ffmpeg -version

Install FFmpeg on CentOS, Fedora and RHEL

CentOS does not have an official repository for FFmpeg installation, but it can be installed using a third party repository nux dextop yum.

To install using CentOS 7 or 6update the system using:

yum install epel-release -y yum update -y

See also  The best HTML editors of 2022

In Cent OS 7 Y RHEL 7 use the following command:

rpm –import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/ nux-dextop-release-0-5.el7.nux.noarch.rpm

In CentOS/RHEL 6/5the command is slightly different and refers to a different repository.

rpm –import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/ nux-dextop-release-0-2.el6.nux.noarch.rpm

Next, we can install FFmpeg and its development packages using:

yum install ffmpeg ffmpeg-devel -y

This completes the installation.

To install FFmpeg on fedora, use the RPMfusion repository. If you don’t have it installed use this command:

dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm dnf install https://download1.rpmfusion.org/nonfree/fedora/ rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

We can then install FFmpeg and its development package using a DNF package manager.

dnf install ffmpeg ffmpeg-devel

That’s it, you have successfully added FFmpeg to your virtual machine. fedora.

Install FFmpeg on Arch Linux

For Arch Linux, we have to use the Pacman package manager. This is an Arch Linux repository. The official repository will give details of which version is available.

To update we can use the following command:

pacman -Sy vlc

Next, we can install ffmpeg using:

pacman -R ffmpeg4.0

To reflect these changes, update the system using:

pacman-Su

You’ve made it! Now FFmpeg should be successfully added to your Arch Linux machine. To verify the installation, run:

ffmpeg -version

conclusion

Installing FFmpeg on a Linux based VPS is easy and only takes a few minutes. Simply log in as the root user and follow the guidelines for your operating system. Each version of Linux (Ubuntu, Arch Linux, Debian, CentOS/RHEL, Fedora) has little differences to install FFmpeg. Start using this powerful codex!

Gustavo is passionate about creating websites. He focuses on the application of SEO strategies at for Spain and Latin America, as well as the creation of high-level content. When he is not applying new WordPress tricks you can find him playing the guitar, traveling or taking an online course.

Loading Facebook Comments ...
Loading Disqus Comments ...