Home General TopicsInstall FFmpeg on a VPS Using YUM | Step-by-Step Guide

Install FFmpeg on a VPS Using YUM | Step-by-Step Guide

by SupportPRO Admin
Install FFMPEG on a VPS using YUM

FFmpeg is a powerful multimedia framework used for video, audio, and streaming operations. This guide explains how to install FFmpeg on a VPS using the YUM package manager.

Step 1: Prepare the Repository

First, configure the RPM repository required for installation.

Create or edit the repository file:

vi /etc/yum.repos.d/dag.repo

Add the following configuration:

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1

Step 2: Configure Library Path

Next, update the dynamic linker configuration:

vi /etc/ld.so.conf

Add the following line:

/usr/local/lib

Then apply the changes:

ldconfig -v

Step 3: Install RPMForge Repository

Download and install the RPMForge release package:

wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rpm -ivh rpmforge-release-0.3.6-1.el5.rf.i386.rpm

If you see a GPG warning, it can be safely ignored during initial setup.

Step 4: Install APT (Optional Dependency Tool)

Install APT to help manage dependencies:

yum install apt

Confirm installation when prompted by typing y.

Step 5: Install FFmpeg

Now install FFmpeg using YUM:

yum install ffmpeg

This will automatically install required dependencies such as:

  • audio and video codecs
  • libraries (SDL, x264, libogg, etc.)
  • encoding/decoding tools

Confirm installation when prompted.

Step 6: Install Additional Development Packages

To extend FFmpeg functionality, install development libraries:

yum install ffmpeg-devel

Step 7: Install FFmpeg-PHP Extension

Download and compile FFmpeg-PHP:

wget http://nchc.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.6.0.tbz2
tar -xjf ffmpeg-php-0.6.0.tbz2
cd ffmpeg-php-0.6.0
phpize
./configure
make
make install

Step 8: Install Supporting Tools

Install multimedia utilities like MPlayer, MEncoder, and FLV tools:

yum install mplayer mencoder
yum install flvtool2

Step 9: Configure PHP for FFmpeg

Edit your PHP configuration file:

vi /home/httpd/yourdomain.extension/php.ini

Add the following line at the end:

[ffmpeg]
extension=ffmpeg.so

Step 10: Verify Installation

Create a test file:

vi phpinfo.php

Add:

<?php
phpinfo();
?>

Upload it to your web root directory and open it in a browser:

http://yourdomain.extension/phpinfo.php

Search for FFmpeg in the output to confirm successful installation.

Conclusion

You have successfully installed FFmpeg on your VPS using YUM along with required dependencies and PHP support. FFmpeg is now ready for video processing, streaming, and media manipulation tasks.

If you require help, contact SupportPRO Server Admin

Partner with SupportPRO for 24/7 proactive cloud support that keeps your business secure, scalable, and ahead of the curve.

Contact Us today!
guy server checkup

You may also like

Leave a Comment