How to Install FFMPEG for WHM/cPanel Server
Installing FFmpeg for a WHM/cPanel server is a multi-step process that requires root access via SSH. There isn’t a simple one-click solution in WHM, as FFmpeg and its dependencies are not included by default. The recommended method is to use a third-party script to automate the installation.
Method 1: Installing via the FFmpeg Installer Script
This method automates the entire process, including the installation of all necessary dependencies.
- Log in via SSH: Access your server as the
rootuser. - Download the script: Use
wgetto download the installation script from a trusted source.Bashwget http://ffmpeg.gitbook.io/install-ffmpeg/ffmpeg-installer.sh - Make the script executable: Grant execution permissions to the script.
Bash
chmod +x ffmpeg-installer.sh - Run the script: Execute the script to begin the installation.
Bash
./ffmpeg-installer.sh - Follow the on-screen instructions: The script will guide you through the process, which can take a considerable amount of time depending on your server’s hardware. It will compile FFmpeg and its libraries from the source.
Method 2: Manual Installation
This method gives you more control over the process but is more complex. It’s only recommended for experienced administrators.
- Install Dependencies: You must manually install all required libraries, such as
yasm,libtheora,libvorbis,libvpx, and others. The commands for this will vary depending on your Linux distribution (e.g.,yumfor CentOS,aptfor Debian). - Download FFmpeg Source: Download the source code for the latest stable version of FFmpeg from their official website.
Bash
wget https://ffmpeg.org/releases/ffmpeg-4.4.tar.gz - Extract and Configure: Extract the archive and configure the build with the necessary options.
Bash
tar -zxvf ffmpeg-4.4.tar.gz cd ffmpeg-4.4 ./configure --enable-shared --enable-gpl --enable-libtheora --enable-libvorbis - Compile and Install: Compile the source code and install it on your system.
Bash
make make install
Verifying the Installation
After the installation is complete, you can verify that FFmpeg is installed and working correctly by running the following command:
ffmpeg -version
This will display the FFmpeg version number and its configuration details.