How to compile latest version of ffmpeg on Centos 5

If you’ve ever happened to install ffmpeg on CentOS 5.x you would probably have added the RPMforge repository to your YUM repositories. This might be fine if you don’t need a recent version of ffmpeg as the latest version included in that repository for Centos 5 is 0.6.5 which is quite obsolete and comes with no x264 codecs support.

The other option is to compile the latest version of ffmpeg from sources and all its dependencies and codecs. These are the steps to accomplish it:

Prepare your system

Remove ffmpeg and any of the codecs that were pre-installed.

# yum remove libvpx libogg libvorbis libtheora libx264 x264 ffmpeg

Update your system and install the tools required for compiling and installing all the codecs.

# yum update
# yum install gcc gcc-c++ automake autoconf libtool nasm git subversion

Compile Yasm assembler

Latest version of ffmpeg requires yasm 1.2 or newer therefore you will have to compile it manually as well. Download the source code from

# wget
# tar xvfz yasm-1.2.0.tar.gz
# cd yasm-1.2.0
# ./configure
# make && make install
# ldconfig

Compile codecs

Xvid codec

Visit the Xvid site to retrieve the latest version of the codec.

# wget
# tar xvfz xvidcore-1.3.2.tar.gz
# cd xvidcore/build/generic
# ./configure
# make && make install
# ldconfig

Lame codec

Visit the LAME MP3 Encoder project to obtain their latest version.

# wget
# tar xvfz lame-3.98.4.tar.gz
# cd lame-3.98.4
# ./configure
# make && make install
# ldconfig

Faac codec

Visit the AudioCoding site for the latest version of the codec.

# wget
# tar xvfz faac-1.28.tar.gz
# cd faac-1.28
# ./bootstrap
# ./configure
# make && make install
# ldconfig

OpenCore AMR Codec

Get the latest version of OpenCore AMR from their repository at SourceForge.

# wget
# tar xvfz opencore-amr-0.1.2.tar.gz
# cd opencore-amr-0.1.2
# ./configure
# make && make install
# ldconfig

OGG Codec

Visit for the latest version of libogg.

# wget
# tar xvfz libogg-1.3.0.tar.gz
# cd libogg-1.3.0
# ./configure
# make && make install
# echo /usr/local/bin > /etc/
# ldconfig

Vorbis Codec

Visit for the latest version of Vorbis (libvorbis).

# wget
# tar xvfz libvorbis-1.3.2.tar.bz2
# cd libvorbis-1.3.2
# ./configure
# make && make install
# ldconfig

Theora Codec

Visit for the latest version of Theora (libtheora).

# wget
# tar xvfz libtheora-1.1.1.tar.bz2
# cd libtheora-1.1.1
# ./configure
# make && make install
# ldconfig


# git clone git://
# cd x264
# ./configure --enable-static --enable-shared
# make && make install
# ldconfig

Libvpx (VP8/VP9 Codec)

Visit for the latest version of libvpx.

# git clone
# ./configure
# make && make install
# ldconfig

Compile FFMPEG

# git clone git:// ffmpeg
# cd ffmpeg
# ./configure --enable-version3 --enable-libopencore-amrnb \
--enable-libopencore-amrwb --enable-libvpx --enable-libfaac \
--enable-libmp3lame --enable-libtheora --enable-libvorbis \
--enable-libx264 --enable-libxvid --enable-gpl --enable-postproc \
# make && make install
# ldconfig


11 thoughts on “How to compile latest version of ffmpeg on Centos 5

  1. Thanks.. BTW the line in the OGG Coded should be changed from # echo /usr/local/bin > /etc/ to # echo /usr/local/lib > /etc/

  2. Pingback: FFMpeg install for CentOS5 | se7d12

  3. Pingback: How to install latest ffmpeg on centos 6 | Food Concerns

  4. Thanks for your post.
    But when I run “make” command, error occurs following this.
    libavcodec/libavcodec.a(libx264.o): In function `X264_init’:
    /ffmpeg/path/libavcodec/libx264.c:820: undefined reference to `x264_encoder_open_148′
    collect2: ld returned 1 exit status
    make: *** [ffmpeg_g] Error 1
    What this occurs?
    Thanks in advice.

  5. Very good tutorial! Only 2 problems I found that gave me some headache.

    To extract .bz2 files you need xvfj instead of xvfz

    And this line in libogg:
    # echo /usr/local/bin > /etc/

    Should be:
    # echo /usr/local/lib > /etc/

    Otherwise libvorbis and libtheora won’t find ogg.

  6. [DEP] vpx_config.c.d
    [CC] vp9/encoder/x86/vp9_frame_scale_ssse3.c.o
    ../vp9/encoder/x86/vp9_frame_scale_ssse3.c: In function ‘eight_tap_row_ssse3’:
    ../vp9/encoder/x86/vp9_frame_scale_ssse3.c:93: internal compiler error: in simplify_binary_operation_1, at simplify-rtx.c:1993
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See for instructions.
    Preprocessed source stored into /tmp/cchf8jcU.out file, please attach this to your bugreport.
    make[1]: *** [vp9/encoder/x86/vp9_frame_scale_ssse3.c.o] Error 1
    make: *** [.DEFAULT] Error 2

    i got this error.
    i’ve try all source, from git , googlechromium and etc.
    please help

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s