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

Install FFmpeg on a Linux server

This guide shows you how to install FFmpeg on a Linux server and check that it works.

Dedicated Servers2 min read6 steps

What is FFmpeg?

FFmpeg is a free tool that works with video and sound files. It can change a video from one format to another. It can also cut clips, shrink files and grab pictures from a video. Many video websites use it behind the scenes.

You need root access for this guide. Root is the main administrator login of the server. It works on VPS and dedicated servers.

Steps

  1. Connect to your server with SSH. SSH is a safe way to type commands on a remote server.
  2. Check if FFmpeg is already there.
    ffmpeg -version
    This prints the version. If you see "command not found", go on.
  3. On AlmaLinux, Rocky Linux or CentOS, FFmpeg is not in the main package list. First add the extra repository called EPEL, and the RPM Fusion repository. A repository is an online store of software your server can download from. The exact steps depend on your system version, so check the instructions for your version.
    dnf install epel-release
    This adds the EPEL store.
  4. Install FFmpeg.
    dnf install ffmpeg ffmpeg-devel
    This downloads and installs FFmpeg. On older systems, use yum instead of dnf.
  5. On Ubuntu or Debian, use this instead.
    apt update
    apt install ffmpeg
    The first line refreshes the package list. The second installs FFmpeg.
  6. Check the install again.
    ffmpeg -version
    You should now see a version number.

Test it

Try to convert a small file. Replace the names with your own.

ffmpeg -i input.avi output.mp4

This reads input.avi and writes a new file called output.mp4.

If PHP needs it

Many PHP scripts just run the ffmpeg command. They need the path. Find it with:

which ffmpeg

This usually prints /usr/bin/ffmpeg.

Tip: Package names can change between system versions. If a command fails, read the message. It often names the missing piece. Ask Hostvento support if you are stuck.

Quick recap

  • FFmpeg works with video and audio files.
  • You need root access and SSH.
  • Use dnf or yum with extra repositories on Red Hat style systems, or apt on Ubuntu and Debian.
  • Check with ffmpeg -version.