How to Install FFmpeg on Ubuntu 18.04 & 16.04

How to Install FFmpeg on Ubuntu 18.04 & 16.04

FFmpeg is a powerful, cross-platform tool used for recording, converting, and streaming audio and video. It is the go-to solution for multimedia handling, supporting a vast array of formats and codecs through its integrated libavcodec library.

In this tutorial, we will guide you through the simple steps to install FFmpeg on Ubuntu 18.04 and 16.04 LTS systems.

Step 1: Setup FFmpeg PPA

FFmpeg 4 is the recommended version for these Ubuntu releases. To ensure you get the latest updates and features, you should add the relevant PPA (Personal Package Archive) to your system.

Run the following command in your terminal:

sudo add-apt-repository ppa:jonathonf/ffmpeg-4

Step 2: Install FFmpeg on Ubuntu

Once the PPA is configured, update your local package index and install FFmpeg. This process will also automatically fetch and install any necessary dependencies.

sudo apt-get update
sudo apt-get install ffmpeg

Step 3: Verify the Installation

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

ffmpeg -version

You should see output similar to this: ffmpeg version 4.0.3-1~18.04.york0 Copyright (c) 2000-2018 the FFmpeg developers

Step 4: Essential FFmpeg Commands

FFmpeg comes with a variety of command-line options. Here are some of the most common commands to explore the tool’s capabilities:

  • ffmpeg -version: Show installed version
  • ffmpeg -formats: List available multimedia formats
  • ffmpeg -codecs: List available codecs
  • ffmpeg -decoders: List available decoders
  • ffmpeg -encoders: List available encoders
  • ffmpeg -protocols: List supported protocols
  • ffmpeg -filters: List available filters

For more detailed information, you can visit the official FFmpeg documentation.

Step 5: Practical Examples

Here are a couple of common tasks you can perform using the FFmpeg command line:

Reduce .mov File Size

If you need to compress a video file without losing significant quality:

ffmpeg -i in.mov -c:v libx264 -c:a copy -crf 20 out.mov

Convert .mov to .mp4

To change the container format for better compatibility:

ffmpeg -i in.mov -vcodec copy -acodec aac -strict experimental -ab 128k out.mp4

Discover more from TCMHACK

Subscribe to get the latest posts sent to your email.

Tags:

Leave a Reply

Discover more from TCMHACK

Subscribe now to keep reading and get access to the full archive.

Continue reading