FFmpeg is a cross-platform solution for streaming audio and video as well as recording and conversion. There’s also a great PHP package called ffmpeg-php that allows for easy use of FFmpeg from inside PHP scripts. In this tutorial i will show you the easy way to install ffmpeg and ffmpeg-php (php extension).
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation FFmpeg on an Ubuntu 18.04 Bionic Beaver server.
Install FFmpeg on Ubuntu 18.04 LTS
Step 1. First make sure that all your system packages are up-to-date
sudo apt-get update sudo apt-get upgrade
Step 2. Installing FFmpeg on Ubuntu 18.04 LTS.
Method 1. Install FFmpeg using PPA:
You’ll need to add FFmpeg’s PPA (personal package archive) to your system:
sudo add-apt-repository ppa:jonathonf/ffmpeg-3 sudo apt update sudo apt install ffmpeg libav-tools x264 x265
Method 2. Install FFmpeg using default repository Ubuntu:
Install FFmpeg on Ubuntu is to use the apt command:
sudo apt install ffmpeg
To check for a installed ffmpeg version run:
### ffmpeg -version ffmpeg version 3.4.2-1build1 Copyright (c) 2000-2018 the FFmpeg developers
Congratulation’s! You have successfully installed FFmpeg. Thanks for using this tutorial for installing FFmpeg on your Ubuntu 18.04 LTS Bionic Beaver. For additional help or useful information, we recommend you to check the official FFmpeg web site.