How to Install FFmpeg on Ubuntu Linux

June 23, 2024

How to Install FFmpeg on Ubuntu Linux
Cheap Linux Server


How to Install FFmpeg on Ubuntu Linux

FFmpeg is a powerful open-source tool that handles a variety of multimedia tasks, including video and audio processing, conversion, and streaming. In this guide, we’ll walk you through the steps to install FFmpeg on Ubuntu Linux. Whether you’re a beginner or an experienced user, this tutorial will help you get FFmpeg up and running on your system in no time.

Why Use FFmpeg?

FFmpeg is a versatile tool that supports a wide range of codecs and file formats. It is commonly used for tasks such as:

  • Converting video and audio files to different formats
  • Extracting audio from video files
  • Streaming media over the internet
  • Recording and capturing video and audio
  • Editing and processing media files


Before we start, make sure you have the following:

  • An Ubuntu-based system (Ubuntu 20.04 LTS or later is recommended)
  • A user account with sudo privileges
  • An active internet connection

Step-by-Step Installation Guide

Step 1: Update Your System

Before installing any new software, it’s a good idea to update your system’s package list to ensure you have the latest versions available. Open your terminal and run:

sudo apt update
sudo apt upgrade  Update Your System 

Step 2: Install FFmpeg

FFmpeg is available in the official Ubuntu repositories, making the installation process straightforward. To install FFmpeg, use the following command:

sudo apt install ffmpeg

Install FFmpeg

Step 3: Verify the Installation

Once the installation is complete, you can verify that FFmpeg is installed correctly by checking its version. Run:

ffmpeg -version

Verify the Installation

You should see output that displays the version of FFmpeg installed on your system, along with other details about the build.

Step 4: Basic Usage Examples

To get you started with FFmpeg, here are a few basic commands:

Convert a video file to a different format:

ffmpeg -i input.mp4 output.avi

Convert a video file to a different format

Extract audio from a video file:

ffmpeg -i input.mp4 -vn -acodec copy output.aac

Extract audio from a video file

Resize a video file:

ffmpeg -i input.mp4 -vf scale=640:480 output.mp4

Resize a video file

Combine an audio and video file:

ffmpeg -i input.mp4 -i audio.mp3 -c:v copy -c:a aac output.mp4

Combine an audio and video file

Step 5: Explore Advanced Features

FFmpeg is a powerful tool with many advanced features. To learn more about what you can do with FFmpeg, check out the official FFmpeg documentation.


If you encounter any issues during the installation or while using FFmpeg, here are a few tips:

  • Check dependencies: Ensure that all necessary dependencies are installed. The sudo apt install ffmpeg command should handle this, but if you encounter issues, you may need to install additional packages.
  • Consult the community: The FFmpeg community is very active, and you can find help on forums, mailing lists, and websites like Stack Overflow.
  • Read the documentation: The official FFmpeg documentation is comprehensive and provides detailed information on all features and options.


Installing FFmpeg on Ubuntu Linux is a straightforward process that opens up a world of possibilities for multimedia processing. With FFmpeg, you can convert, edit, and stream video and audio files with ease. Follow the steps in this guide to install FFmpeg on your system and start exploring its powerful features today.

Feel free to leave a comment if you have any questions or need further assistance!

Happy coding!


How to Install FFmpeg on Ubuntu Linux (F.A.Q)

What is FFmpeg used for?

FFmpeg is a versatile multimedia framework capable of decoding, encoding, transcoding, muxing, demuxing, streaming, filtering, and playing almost anything that humans and machines have created. It supports a wide array of formats and codecs, making it an essential tool for video and audio processing.

How do I install FFmpeg on Ubuntu?

To install FFmpeg on Ubuntu, follow these simple steps:

  1. Update your system:

    sudo apt update
    sudo apt upgrade
  2. Install FFmpeg:

    sudo apt install ffmpeg
  3. Verify the installation:

    ffmpeg -version
How do I convert a video file using FFmpeg?

To convert a video file to a different format using FFmpeg, use the following command:

ffmpeg -i input_file.mp4 output_file.avi

Replace input_file.mp4 with the name of your source file and output_file.avi with the desired output file name and format.

How can I extract audio from a video using FFmpeg?

To extract the audio from a video file, use the command:

ffmpeg -i input_video.mp4 -vn -acodec copy output_audio.aac

Replace input_video.mp4 with your source video file and output_audio.aac with the desired name and format for the extracted audio file.

What is Forex VPS and Why You Need It

What is Forex VPS and Why You Need It

  What is Forex VPS and Why You Need It The world of Forex trading is dynamic and fast-paced, where milliseconds can make a difference between a profitable trade and a loss. As traders strive to optimize their trading strategies and enhance their performance, one...

What Is Ubuntu Pro, and Is It Worth It?

What Is Ubuntu Pro, and Is It Worth It?

  What Is Ubuntu Pro, and Is It Worth It? In today's fast-evolving technological landscape, security and compliance are paramount concerns for enterprises. As organizations increasingly adopt open-source solutions, maintaining the robustness and security of these...


Submit a Comment