Installing FFMpeg on CentOS/RedHat 5.x successfully

Share this post:

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.

Lets create a directory first
mkdir -p /opt/ffmpeg-packages
cd /opt/ffmpeg-packages

Installing FAAD2
tar zxf faad2-2.6.1.tar.gz
cd faad2
autoreconf -vif
./configure –disable-drm –disable-mpeg4ip
make && make install

Installing FAAC
tar zxfv faac-1.26.tar.gz
cd faac
./configure –disable-mp4v2
make && make install

Installing LAME
tar zxfv lame-3.98b8.tar.gz
cd lame-3.98b8
make && make install

Installing yasm
tar zfvx yasm-0.7.0.tar.gz
cd yasm-0.7.0
make && make install

Installing x264

FFMpeg requires that you get the latest x264 codec. Thus we use the latest from their GIT repository.

git clone git://
cd x264
./configure –enable-shared –prefix=/usr && make && sudo make install

Installing Xvid
tar zxfv xvidcore-1.2.1.tar.gz
cd xvidcore/build/generic
make && make install

Installing FFmpeg

For FFMPEG, you will need to get the latest out of SVN.

svn checkout svn:// ffmpeg
cd ffmpeg
./configure –enable-gpl –enable-postproc –enable-nonfree –enable-postproc
–enable-libfaad –enable-avfilter –enable-pthreads –enable-libxvid
–enable-libx264 –enable-libmp3lame –enable-libfaac –disable-ffserver –disable-ffplay
make install

The “make” of FFmpeg can take up to 5 minutes, so please be patience. I also disable “FFServer” and “FFplay” on my servers. Please adjust to your environment.

Hope this helps.

Over 10 years in business.

Self-funded. No investors. No bullshit.

More than 3,000 customers worldwide.

Helpmonks - no bullshit customer engagement service

Growth starts with action

Empower your team and delight your customers.

Helpmonks - email management for small businesses