Community Documentation

v3 Knowledgebase

Install FFmpeg, Mplayer, Mencoder, FFmpeg-PHP on CentOS 5.x automatically

This Tutorial is for all phpFox users have unmanaged VPS and interested to enable Video Upload module and i hope this is help.

My primary Linux distribution of choice is CentOS. CentOS is an Enterprise-class Linux Distribution derived from sources freely provided to the public by RedHat. Thus CentOS is merely speaking a copy of RedHat and provides the same stability and security.

The trade off with stability and security is, that you mostly run packages which are not cutting edge and thus you run into issues where you need the cutting edge. This is the case with FFMpeg.

There is a DAG repository that give you FFMpeg in the yum installation, but that version is not working with libx264 or libfaac and still uses the older way of and might break some applications.

Thus I set out to find the best way to install FFMpeg. Since FFMpeg depends on a lot of external libraries we first have to install this external libraries.

Please follow the below steps one by one to install FFMpeg on CentOS/RedHat 5.x. successfully. Some of these libraries might be older (some even from 2008), thought I used what worked best for me and were stable in production environment.

Use your Putty or Terminal

1. cd /usr/src/

2. Download ffmpeginstaller 3 series Latest Stable Release at here


Note: ffmpeginstaller 3 scripts will install stable versions of all binaries. ffmpeginstaller version 4 will install all latest dependencies of ffmpeg and mplayer, and also use svn version of ffmpeg and mplayer. Version 4 and 5 may cause problem on your VPS. I recommend you install Version 3.

3. Unzip the file

tar -xzvf ffmpeginstall.3.2.1.tar.gz
cd ffmpeginstall.3.2.1

4. Run the installer.


The script will find your php.ini, enter the php.ini full path to confirm the installation.

This process will take about 30 minutes and it will install the following packages:

Amrnb and Amrwb
All codecs
facc and faad2
Mplayer and Mencoder

5. Reboot the server.

6. Verify ffmpeg module listing in php and other modules.

php -m | grep ffmpeg

ls -lah /usr/local/cpffmpeg/bin/