TL;DR
To install FFmpeg Ubuntu, follow these steps:
- Update and upgrade your Ubuntu system:
sudo apt update, sudo apt upgrade
. - Download FFmpeg source code, extract it, navigate to the extracted directory.
- Build and install FFmpeg:
./configure, make, sudo make install
. - Verify the installed version of FFmpeg:
ffmpeg -version
.
Read the guide below for a step-by-step guide to install FFmpeg Ubuntu, how to use it, benefits of installing it, and common errors with possible solutions.
Converting or editing video and audio files on your computer can be challenging, but I have a powerful solution for you: FFmpeg. This versatile tool can handle almost any multimedia task you throw at it. In this post, I’ll walk you through what FFmpeg is, why it’s so useful, and how to install FFmpeg on Ubuntu system. You’ll learn different installation methods and get some practical tips on using FFmpeg for your projects. Let’s explore and make your multimedia tasks easier and more efficient with FFmpeg!
What is FFmpeg?
FFmpeg is a powerful software tool used to handle multimedia files and streams. It can convert, edit, and stream audio and video files in various formats. With FFmpeg, you can easily change the format of a video, extract audio from a video, resize videos, and much more. It’s widely used because it’s free, open-source, and supports a huge range of formats.
How to Install FFmpeg Ubuntu
To install FFmpeg on Ubuntu, first open your terminal and update your package list with sudo apt update
. Then, install FFmpeg using the command sudo apt install ffmpeg
. After the installation completes, verify it by running ffmpeg -version
to check the installed version. This process ensures that FFmpeg is correctly installed and ready for use on your Ubuntu system.
Here is the detailed step-by-step guide for each method to FFmpeg install Ubuntu.
1. Installing FFmpeg Using Apt Package
- Open a Terminal by pressing Ctrl+Alt+T.

- Type the following command to update your package list:
sudo apt update
This command updates the list of available packages on your Ubuntu system.

- Once the package list is updated, run the following command to upgrade your installed packages:
sudo apt upgrade
If prompted, enter your password and confirm the upgrade process. This command ensures that your system’s installed packages are up to date with the latest security patches, bug fixes, and improvements.

- Download the FFmpeg source code from the official website. Visit the FFmpeg website (https://ffmpeg.org/download.html) and choose the latest stable release or a specific version you prefer.

- Extract the downloaded source code archive to a directory of your choice.

- Navigate to the extracted directory using the Terminal.

- Run the following commands in sequence to build and install FFmpeg on Ubuntu:
./configure
The command will configure the build options.

- Now run the following command:
make
The command will compile FFmpeg make file.

- In the end run the following command to Ubuntu FFmpeg install:
sudo make install

- To check the installed version of FFmpeg, enter the following command:
ffmpeg -version
The Terminal will display detailed information about the FFmpeg version and its configured options.

2. Installing FFmpeg via Snap Package
Snap packages provide an easy way to install and manage software on Ubuntu, ensuring automatic updates and sandboxed applications. This method is perfect for users who prefer minimal manual intervention and simplified maintenance. Follow these steps for FFmpeg Ubuntu install using snap package:
- Before installing Snap, make sure your system is up-to-date to ensure you have the latest package information:
sudo apt update

- Install the Snap package management system if it’s not already installed on your system:
sudo apt install snapd
This command installs Snapd, which is required to manage Snap packages.

- Use Snap to install FFmpeg by running the following command:
sudo snap install ffmpeg
This command installs FFmpeg as a Snap package, ensuring it is sandboxed and automatically updated.

- Verify the installation to confirm that FFmpeg is correctly installed:
snap run ffmpeg -version
This command displays the installed version of FFmpeg to verify the installation was successful.

How to Use FFmpeg
FFmpeg is a powerful multimedia framework that allows you to manipulate and process audio and video files. I will walk you through the basics of using FFmpeg and provide you with some commonly used commands. By the end, you’ll have a solid foundation for utilizing FFmpeg’s capabilities in your multimedia projects.
1. Converting a Video Format
To convert a video file from one format to another, use the following command:
ffmpeg -i input.mp4 output.avi
Replace input.mp4 with the name of your input file and output.avi with the desired name of the output file. FFmpeg will automatically detect the input format based on the file extension, so you don’t need to specify it explicitly.

2. Resizing a Video
To resize a video to a specific width and height, use the following command:
ffmpeg -i input.mp4 -vf "scale=640:480" output.mp4
In this example, the video will be resized to a width of 640 pixels and a height of 480 pixels. Adjust the values as needed.

3. Trimming a Video
To trim a video and extract a specific portion, specify the start and end times using the -ss
(start time) and -to
(end time) options. Here’s an example:
ffmpeg -i input.mp4 -ss 00:00:10 -to 00:00:30 -c copy output.mp4
This command extracts a 20-second segment from the input video, starting at 10 seconds and ending at 30 seconds. The -c copy option ensures that the video and audio streams are copied without re-encoding, preserving the original quality.

Benefits of Installing FFmpeg On Ubuntu
FFmpeg is a versatile multimedia framework that offers numerous benefits for audio and video processing tasks. Installing FFmpeg on your system opens up a world of possibilities and empowers you to accomplish various multimedia-related goals. Here are four key benefits of installing FFmpeg:
- 🎛️ Wide Format Support: One of the significant advantages of FFmpeg is its extensive format support. Whether it’s audio or video, FFmpeg can handle a vast array of formats, ensuring compatibility with almost any multimedia file you encounter. From popular formats like MP3, MP4, and AVI to more niche formats, FFmpeg has got you covered.
- 🚀 Powerful Functionality: FFmpeg provides a wealth of powerful functionality for multimedia processing. It offers a comprehensive set of tools and libraries that enable you to perform complex tasks with ease. Whether you need to encode or decode videos, extract audio from videos, apply filters and effects, or perform video editing operations, FFmpeg provides the necessary functionality to accomplish these tasks efficiently.
- 🧩 Customizability: Another key benefit of installing FFmpeg is the level of customizability it offers. With FFmpeg, you have granular control over various parameters and options for audio and video processing. You can fine-tune encoding settings, adjust quality parameters, apply specific filters, and more.
- 👥 Open-Source and Community-Driven: FFmpeg is an open-source project with a vibrant and dedicated community of developers and users. This community-driven nature ensures continuous development, bug fixes, and improvements to the framework. By installing FFmpeg, you become part of this active community, gaining access to support, resources, and valuable insights from experienced users worldwide.
Ubuntu Install FFmpeg: Wrapping Up
In this article, I’ve walked you through various methods to install and configure FFmpeg on Ubuntu, from using APT to building from Snap packages. Each method suits different needs, ensuring you can smoothly FFmpeg Linux install.
For more learning, I recommend exploring:
- How to use the help command in Linux, which can assist you with additional FFmpeg commands and options
- Exploring how to convert string to number in Bash, which can be useful for scripting with FFmpeg commands.
- Learn how to check system logs on Linux to troubleshoot any issues with FFmpeg.
Frequently Asked Questions
Can I update FFmpeg to a newer version once it’s installed?
apt
, you can update it by running the package manager’s update command. This will fetch the latest version available in the repository and install it on your system. However, if you manually compiled FFmpeg from source, updating requires repeating the compilation process with the new source code. It involves downloading the latest version, configuring the build, compiling, and then installing the updated version of FFmpeg.