Tutorials  /  Linux Basics

How to Install and Use FFmpeg on Ubuntu 20.04

Ccentron Redaktion · June 2025 ·4 min read ·Linux Basics, Tutorial

FFmpeg offers a powerful, cross-platform toolkit to record, convert, and stream both audio and video. This tutorial explains how to get the most recent version up and running. While the focus is on Ubuntu 20.04, these steps are also applicable to Debian 10, CentOS 8, Fedora 32, or any Linux system running kernel version 3.2.0 or newer.

Prerequisites

  • A fully updated instance of Ubuntu 20.04
  • An active sudo user account (not root)
VM

Matching infrastructure at centron

No hardware needed to follow along: ccloud³ VMs with full root access start at €3.12 per month, billed by the hour and ready in seconds. Rent a cloud server →

Understanding the Two FFmpeg Branches

FFmpeg maintains two source code branches: master and release. The master branch gets updates quicker, including bug fixes, new features, and security patches. It’s considered stable for daily use in nearly all scenarios.

Twice per year, the project issues a stable release that merges selected improvements from the master branch. During these intervals, point releases are distributed to fix critical bugs without introducing new features. This guide covers the setup for both branches, so you can choose the one that suits your needs.

Installing FFmpeg

⚠️ Important: Before proceeding, remove any previous FFmpeg installations to avoid possible version conflicts.

Create Directory for the Static Build

sudo mkdir -p /opt/ffmpeg

cd /opt/ffmpeg

Download the Static Archive

For the master branch:

sudo wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz

sudo wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz.md5

md5sum -c ffmpeg-git-amd64-static.tar.xz.md5

For the release branch:

sudo wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz

sudo wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz.md5

md5sum -c ffmpeg-release-amd64-static.tar.xz.md5

Ensure that the md5sum output confirms the file integrity with an "OK" message.

Extract the Archive

sudo tar xvf ffmpeg*.xz

cd ffmpeg-*-static

ls

The extracted files should resemble this:

  • ffmpeg
  • ffprobe
  • GPLv3.txt
  • manpages
  • model
  • qt-faststart
  • readme.txt

Make FFmpeg Globally Accessible

sudo ln -s "${PWD}/ffmpeg" /usr/local/bin/

sudo ln -s "${PWD}/ffprobe" /usr/local/bin/

Testing FFmpeg

Download a Sample Video

cd ~

wget https://archive.org/download/BigBuckBunny_124/Content/big_buck_bunny_720p_surround.mp4 -O origin.mp4

Convert to a Streaming-Optimized Format

ffmpeg -i origin.mp4 -c copy -movflags +faststart streaming.mp4

Check the Output Using ffprobe

ffprobe streaming.mp4

If successful, you’ll see output similar to the following:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'streaming.mp4':

Metadata:

major_brand : isom

minor_version : 512

compatible_brands: isomiso2avc1mp41

title : Big Buck Bunny - https://archive.org/details/BigBuckBunny_124

encoder : Lavf58.49.100

comment : license:http://creativecommons.org/licenses/by/3.0/

Duration: 00:09:56.50, start: 0.000000, bitrate: 829 kb/s

Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 697 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default)

Metadata:

handler_name : VideoHandler

Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)

Metadata:

handler_name : SoundHandler

Conclusion

If you're eager to explore more about FFmpeg, check out these helpful sources:

  • The official FFmpeg website—for news, updates, and source code.
  • The FFmpeg Static Builds page—offering downloads compatible with kernel 3.2.0 and above.
  • The FFmpeg Wiki—a collection of guides created by the open-source community.
Jetzt 200 € Guthaben sichern

Testen Sie Ihr Setup auf ccloud³

Registrieren Sie sich in der ccloud³ und erhalten Sie 200 € Startguthaben für Ihr Projekt – z. B. für eine PostgreSQL-VM mit automatischen Backups.

centron Redaktion Technische Redaktion

Das Redaktionsteam von centron schreibt Anleitungen aus dem Betriebsalltag: getestet auf unserer eigenen Plattform, betrieben im Rechenzentrum in Hallstadt bei Bamberg.

Kategorie Linux Basics
Teilen
Noch offene Fragen?

Our team will help you with your specific setup - in German or English, by people who run the platform themselves.

War dieses Tutorial hilfreich?

Your answer is stored anonymously and helps us improve our tutorials.

Kommentare

No comments yet - be the first to ask a question about this tutorial.

Sign in to comment

Comments are open to centron customers. Sign in to your account to ask a question about this tutorial.

Weiterlesen

Das könnte Sie auch interessieren

Jetzt kostenlos anfangen

Melden Sie sich an und erhalten Sie in den ersten 60 Tagen ein Guthaben von 200 € bei centron.

Dieses Werbeangebot gilt nur für neue Konten. Angebot ausschließlich für Gewerbetreibende.

Jetzt loslegen Sales kontaktieren