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 http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
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 http://garr.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
# echo "extension=ffmpeg.so" > /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
:%s/PIX_FMT_RGBA32/PIX_FMT_RGB32 :wq!
Restart the compile and install FFmpeg-Php:
# phpize # ./configure # make # make install