Install FFprobe and FFmpeg on Ubuntu [3 Methods]


Ubuntu

Author: Omer Cakmak
Reviewer: Deepak Prasad

What is FFmpeg and FFprobe?

FFmpeg; It is a free (LGPL, GPL licensed) and open source multimedia library and terminal-based tool for processing video, audio and other multimedia files. It combines many encoders and decoders to support many common and uncommon multimedia formats.

FFprobe is a simple multimedia stream analyzer with a command line interface based on FFmpeg project libraries. The format and title of a multimedia file can be used to print multimedia streams and information about each packet or frame.

We had already installed FFprobe and FFmpeg packages on Rocky Linux, which is a Redhat based operating system. Now we will install it on Ubuntu, which is a Debian based system. In this way, you will learn how to install it on a different distribution.

 

How to install FFprobe and FFmpeg on Ubuntu

FFprobe comes with it when the FFmpeg package is installed. There is no different installation step.

 

Method -1-  Install from Repository

Version 4.4.2 available from package repository:

foc@ubuntu22:~$ sudo apt search ffmpeg

ffmpeg/jammy-updates,jammy-security 7:4.4.2-0ubuntu0.22.04.1 amd64
Tools for transcoding, streaming and playing of multimedia files

For installation, simply run the following command:

foc@ubuntu22:~$ sudo apt install ffmpeg -y

After installation, both ffmpeg and ffprobe can be used:

foc@ubuntu22:~$ ff
ffmpeg ffplay ffprobe

Check the version:

foc@ubuntu22:~$ ffmpeg -version
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)

 

Method -2-  Install from SNAP Store

In this method, first install the snapd package.

foc@ubuntu22:~$ sudo apt install snapd -y

Then install the ffmpeg package from the snap store:

foc@ubuntu22:~$ sudo snap install ffmpeg
Download snap "ffmpeg" (1286) from channel "stable" 64% 280kB/s 1m48sffmpeg 4.3.1 from Snapcrafters installed

The package was installed from the snap store. Version:

foc@ubuntu22:~$ ffmpeg -version
ffmpeg version n4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
...

and for ffprobe:

foc@ubuntu22:~$ ffmpeg.ffprobe
ffprobe version n4.3.1 Copyright (c) 2007-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
...
Simple multimedia streams analyzer
usage: ffprobe [OPTIONS] [INPUT_FILE]

 

Method -3- Installing FFmpeg From Official Archive

After the above methods, let's explain the installation for the latest version 5.1.2. Install the necessary packages before and during installation:

foc@ubuntu22:~$ sudo apt install wget gcc tar yasm pkg-config make

Then go to ffmpeg official page. Right click on the version file ending with tar.gz of the version you want to install and copy the link.

Install FFprobe and FFmpeg on Ubuntu [3 Methods]

Then type the wget command followed by the link.

foc@ubuntu22:~$ wget https://ffmpeg.org/releases/ffmpeg-5.1.2.tar.gz

Extract the .tar.gz, then enter the ffmpeg-5.1.2 directory:

foc@ubuntu22:~$ tar xvf ffmpeg-5.1.2.tar.gz && cd ffmpeg-5.1.2

Run the following 3 commands in sequence:

foc@ubuntu22:~/ffmpeg-5.1.2$ sudo ./configure
foc@ubuntu22:~/ffmpeg-5.1.2$ sudo make
foc@ubuntu22:~/ffmpeg-5.1.2$ sudo make install

Installation may take some time.  Versions after installation complete:

foc@ubuntu22:~/ffmpeg-5.1.2$ ./ffmpeg -version
ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 11 (Ubuntu 11.3.0-1ubuntu1~22.04)
configuration:
...

For ffprobe:

foc@ubuntu22:~/ffmpeg-5.1.2$ ./ffprobe -version
ffprobe version 5.1.2 Copyright (c) 2007-2022 the FFmpeg developers
built with gcc 11 (Ubuntu 11.3.0-1ubuntu1~22.04)
configuration:
...

 

Summary

We explained the installation of packages on Ubuntu. The official documentation page on its use and what it does will help.

Locally, you can get help with the --help command:

foc@ubuntu22:~$ ffmpeg --help

and

foc@ubuntu22:~$ ffprobe --help

 

References

ffmpeg.org - Download FFmpeg

 

Omer Cakmak

Omer Cakmak

He is highly skilled at managing Debian, Ubuntu, CentOS, Oracle Linux, and Red Hat servers. Proficient in bash scripting, Ansible, and AWX central server management, he handles server operations on OpenStack, KVM, Proxmox, and VMware. You can connect with him on his LinkedIn profile.

Can't find what you're searching for? Let us assist you.

Enter your query below, and we'll provide instant results tailored to your needs.

If my articles on GoLinuxCloud has helped you, kindly consider buying me a coffee as a token of appreciation.

Buy GoLinuxCloud a Coffee

For any other feedbacks or questions you can send mail to admin@golinuxcloud.com

Thank You for your support!!

1 thought on “Install FFprobe and FFmpeg on Ubuntu [3 Methods]”

  1. Hello,
    Thank you for the amazing post.
    I have used the third method in this post and showed the same FFMPEG version.
    But, when I am trying to execute the command below
    ffmpeg -i input.mp4 -ss 00:00:00 -t 00:00:02 -y -crf 25 output.mp4
    and receiving this error “Unrecognized option ‘-crf’ Error splitting the argument list: Option not found”
    The same command was working when I used this command “sudo apt install ffmpeg” to install FFMPEG.

    Please help me to fix this issue.
    THanks in advance.

    Reply

Leave a Comment