Install FFMPEG on a VPS using YUM

Installation Steps :

preparing step :

Edit or create a file /etc/yum.repos.d/dag.repo. Add lines below at the end of the file:

[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

Add line below at the end of the file /etc/ld.so.conf:

/usr/local/lib

Run commands via ssh :

ldconfig -v

Installing RPMForge

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

warning: rpmforge-release-0.3.6-1.el5.rf.i386.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
Preparing ########################################### [100%] 1:rpmforge-release ########################################### [100%] # yum install apt

Loading installonlyn plugin
Setting up Install Process
Setting up repositories
dag 100% |=========================| 1.1 kB 00:00
rpmforge 100% |=========================| 1.1 kB 00:00
base 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 3.4 MB 06:56
################################################## 9520/9520
primary.xml.gz 100% |=========================| 3.4 MB 06:36
################################################## 9520/9520
primary.xml.gz 100% |=========================| 263 kB 00:27
################################################## 400/400
Parsing package install arguments
Resolving Dependencies
> Populating transaction set with selected packages. Please wait.
> Downloading header for apt to pack into transaction set.
apt-0.5.15lorg3.94a-5.el5 100% |=========================| 25 kB 00:04
> Package apt.i386 0:0.5.15lorg3.94a-5.el5.rf set to be updated
> Running transaction check

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
apt i386 0.5.15lorg3.94a-5.el5.rf rpmforge 2.8 M

Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 2.8 M
Is this ok [y/N]: y
Downloading Packages:
(1/1): apt-0.5.15lorg3.94 100% |=========================| 2.8 MB 05:49
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: apt ######################### [1/1]

Installed: apt.i386 0:0.5.15lorg3.94a-5.el5.rf
Complete!

Now Install FFmpeg :

# yum install ffmpeg

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
ffmpeg i386 0.5-2.el5.rf rpmforge 2.5 M
Installing for dependencies:
SDL i386 1.2.10-8.el5 base 233 k
a52dec i386 0.7.4-8.el5.rf rpmforge 78 k
alsa-lib i386 1.0.17-1.el5 base 412 k
amrnb i386 7.0.0.2-1.el5.rf rpmforge 237 k
amrwb i386 7.0.0.3-1.el5.rf rpmforge 190 k
audiofile i386 1:0.2.6-5 base 107 k
cppunit i386 1.12.0-3.el5.rf rpmforge 811 k
dirac i386 1.0.2-1.el5.rf rpmforge 2.9 M
esound i386 1:0.2.36-3 base 129 k
faac i386 1.26-1.el5.rf rpmforge 151 k
faad2 i386 2.6.1-1.el5.rf rpmforge 329 k
ffmpeg-libpostproc i386 0.5-2.el5.rf rpmforge 40 k
giflib i386 4.1.3-7.1.el5_3.1 updates 39 k
imlib2 i386 1.4.0-1.el5.rf rpmforge 947 k
lame i386 3.98.2-1.el5.rf rpmforge 569 k
libXext i386 1.0.1-2.1 base 35 k
libid3tag i386 0.15.1b-3.el5.rf rpmforge 75 k
libogg i386 2:1.1.3-3.el5 base 19 k
libtheora i386 1.0alpha7-1 base 708 k
x264 i386 0.0.0-0.4.20090708.el5.rf rpmforge 898 k

Transaction Summary
=============================================================================
Install 21 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 11 M
Is this ok [y/N]:

Install ffmpeg-devel and ffmpeg-php :

# yum install ffmpeg-devel

# 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

Install mplayer, Mencoder and flvtool2:

# yum install mplayer mencoder

# yum install flvtool2

Edit php.ini:

Find and edit the php.ini file of your domain as below:

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

add lines below at the end of the file php.ini:

[ffmpeg]
extension=ffmpeg.so

Check phpinfo:

Create a new file name phpinfo.php that include lines below:

<?php

phpinfo()

?>

and upload that file to the root folder of your domain and run via web browser:

http://yourdomain.extension/phpinfo.php

Article Authored by Basil Boon K

Author, Basil Boon K, is a Sr.Systems Engineer with SupportPRO. Basil specializes in Level 3 Linux Administration. SupportPRO offers 24X7 technical support services to Web hosting companies and service providers.

If you require help, contact SupportPRO Server Admin

Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value

Leave a Reply