Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to Install FFmpeg on a WHM/cPanel Server

This guide shows you how to install FFmpeg on a cPanel server, so your websites can convert video and audio.

WHM2 min read5 steps2 screenshots

This guide needs root access and SSH. Root is the main admin login. VPS and dedicated server owners have it. SSH is a way to type commands on the server from your computer.

What is FFmpeg?

FFmpeg is a free program that changes video and sound files from one type to another. A video site might use it to turn an upload into a format that plays in any browser.

The steps below fit servers based on CentOS, AlmaLinux or Rocky Linux. Names of repositories can change. If a step fails, read the message or ask Hostvento support.

Before you start

  • Take a backup or a server snapshot.
  • Check your system: run cat /etc/os-release. It prints the name and version.

Steps

  1. Log in to the server by SSH as root.
    Screenshot: Log in to the server by SSH as root.
    Screenshot: Log in to the server by SSH as root.
  2. Add the EPEL repository. A repository is an online store of software your server can install from.
    yum install epel-release -y
    This adds extra packages.
  3. Add the RPM Fusion repository for your version. Follow the instructions on the RPM Fusion website for your exact system, because the address depends on the version number.
  4. Install FFmpeg.
    yum install ffmpeg ffmpeg-devel -y
    This downloads and installs FFmpeg and its developer files.
  5. Check the install.
    ffmpeg -version
    This prints the version if FFmpeg is ready.
Tip: On newer systems, use dnf in place of yum. The rest is the same.

Use FFmpeg in PHP sites

Some PHP scripts call FFmpeg through the command line. They need the full path. Find it with:

which ffmpeg

This prints the path, often /usr/bin/ffmpeg. Give that path to your script's settings.

If it does not work

  • PHP may block command running. Check disable_functions in MultiPHP INI Editor.
  • The repository may not match your system version.
  • Shared hosting customers cannot install it. Ask Hostvento support if it is on your plan.

Quick recap

  • FFmpeg converts video and audio files.
  • Add EPEL and RPM Fusion, then install with yum or dnf.
  • Check with ffmpeg -version.
  • Use the full path in your PHP scripts.