In this tutorial we are going to learn how to install FFmpeg on Ubuntu 18.04. We will also install and configure its prerequisites. FFmpeg is among the best multimedia framework which may be used to encode, decode, transcode, mux, demux, record, stream, filter, and play any sort of media files. It is totally free multimedia framework that operates on nearly all operating systems, including Linux, Mac OS X, Microsoft Windows etc.
I recommend to use a minimal Ubuntu server setup as a basis for the tutorial, that can be a virtual or a root server image with an Ubuntu 18.04 Bionic Beaver minimal install from a web hosting company or you use our minimal server tutorial to install a server from scratch.
Install FFmpeg on Ubuntu 18.04
Step 1. First, ensure your system and apt package lists are fully up-to-date by running the following:
apt-get update -y apt-get upgrade -y
Step 2. Installing FFmpeg on Ubuntu 18.04 Bionic Beaver.
FFmpeg is also available under default repositories but an older version. To install the updated version, you need to add PPA repositories to your system:
sudo add-apt-repository ppa:jonathonf/ffmpeg-3 sudo apt update
After enabling the PPA repositories, install FFmpeg on Ubuntu use the apt command:
sudo apt install ffmpeg libav-tools x264 x265
To check for a installed ffmpeg version run:
[firstname.lastname@example.org ~]# ffmpeg -version
Step 3. FFmpeg Basic Commands.
Here is the list of few ffmepg basic command:
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