![]()
FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video. It includes libavcodec – the leading audio/video codec library.
Preliminary Note:
I am using a CentOS 5.2 x86_64 server with the RPM Forge YUM repo enabled in this tutorial:
* server1.example.co.za (IP 10.0.0.100)
I am also using rebuilt FFmpeg RPMS from DAG with AMR enabled (i.e. –enable-amr_nb –enable-amr_wb).
ffmpeg-libpostproc.x86_64.rpm (1558)
ffmpeg.x86_64.rpm (1155)
ffmpeg-devel.x86_64.rpm (1075)
Installing the FFmpeg RPMS
# wget http://www.how2centos.com/wp-content/plugins/download-monitor/download.php?id=1
# wget http://www.how2centos.com/wp-content/plugins/download-monitor/download.php?id=2
# wget http://www.how2centos.com/wp-content/plugins/download-monitor/download.php?id=3
# yum install ffmpeg-0.4.9-0.9.20070530.x86_64.rpm \
ffmpeg-devel-0.4.9-0.9.20070530.x86_64.rpm \
ffmpeg-libpostproc-0.4.9-0.9.20070530.x86_64.rpm
# ffmpeg –help
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: –prefix=/usr –libdir=/usr/lib64 –mandir=/usr/share/man
–incdir=/usr/include/ffmpeg –extra-cflags=-fPIC –enable-libmp3lame
–enable-libogg –enable-libvorbis –enable-libogg –enable-libtheora
–enable-libfaad –enable-libfaac –enable-libgsm –enable-xvid
–enable-x264 –enable-liba52 –enable-liba52bin –enable-pp –enable-shared
–enable-pthreads –enable-gpl –enable-libamr-nb –enable-libamr-wb –disable-strip
libavutil version: 49.4.0
libavcodec version: 51.40.4
libavformat version: 51.12.1
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





13 Comments » 

Pingback: Installing and upgrading to PHP 5.2.9 on CentOS and Red Hat Linux 5.3 x86_64 | George Rushby dot com