CentOS 5.2 Tutorials CentOS 5.3 Tutorials CentOS 5.4 Tutorials CentOS 5.5 Tutorials CentOS 5.6 Tutorials CentOS 5.7 Tutorials CentOS 5.8 Tutorials

Installing FFmpeg on CentOS 5.x

FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video. It includes libavcodec – the leading audio/video codec library.

Install the RPMForge i386 YUM Repository

# rpm -Uvh

Installing FFmpeg on CentOS

# yum install ffmpeg ffmpeg-devel ffmpeg-libpostproc opencore-amr
# ffmpeg --help | more
FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
  built on Dec  4 2010 15:35:31 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab

Optional: Installing FFmpeg-php

# wget
# tar -xjf ffmpeg-php-0.6.0.tbz2
# cd ffmpeg-php-0.6.0
# phpize
# ./configure
# make
# make install
# echo "" > /etc/php.d/ffmpeg.ini

If you get the following error when running the command make to compile FFmpeg:

make: *** [ffmpeg_frame.lo] Error 1

In the version 0.6.0 of ffmpeg-php you will need to modify the file: ffmpeg_frame.c and replace every instance of PIX_FMT_RGBA32 with PIX_FMT_RGB32

Using Linux text editor, vi run the following commands:

# vi ffmpeg_frame.c

Restart the compile and install FFmpeg-Php:

# phpize
# ./configure
# make
# make install