In this article, we will have explained the necessary steps to install and configure FFmpeg on Ubuntu 18.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.
FFmpeg is a source command line application for transcoding multimedia documents. It comprises a set of video libraries and shared audio like libavcodec, libavformat, and libavutil. Between different video and audio formats, sample prices that are placed and resize videos, you can convert with FFmpeg.
Install FFmpeg on Ubuntu 18.04
Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.
sudo apt update sudo apt upgrade
Step 2. Install FFmpeg on Ubuntu.
To install the latest version of FFmpeg, you need to configure PPA on your system:
sudo add-apt-repository ppa:jonathonf/ffmpeg-3 sudo apt update sudo apt install ffmpeg libav-tools x264 x265
Verify the installation by running the ffmpeg -version command which will print the FFmpeg version:
ffmpeg -version
The output should look something like this:
ffmpeg version 4.0.3-1~18.04.york0 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
Step 3. FFmpeg Basic Commands.
Here is the list of the ffmepg basic command options used with ffmpeg command line tool:
ffmpeg -version: show version ffmpeg -formats: show available formats ffmpeg -codecs: show available codecs ffmpeg -decoders: show available decoders ffmpeg -encoders: show available encoders ffmpeg -bsfs: show available bit stream filters ffmpeg -protocols: show available protocols ffmpeg -filters: show available filters ffmpeg -pix_fmts: show available pixel formats ffmpeg -layouts: show standard channel layouts ffmpeg -sample_fmts: show available audio sample formats
Congratulation, you have learned how to install and use FFmpeg on Ubuntu 18.04. If you have any question, please leave a comment below.