Views
From Wiki
Jump to: navigation, search

I have written a script to take care of this.

wget http://mw.example.com/scripts/easyffmpeg3.txt

Below are instructions in case this doesn't work.

This is the TRUE 'easy way' to install ffmpeg on CentOS or RHEL/Redhat Enterprise Linux..

nano -w /etc/yum.repos.d/dag.repo

Insert the following:

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1

Add the

/usr/local/lib

to

/etc/ld.so.conf

Then run:

ldconfig -v

Then run the following:

rpm -Uvh http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.i386.rpm
yum update
yum install ffmpeg ffmpeg-devel

To install the PHP extension follow these steps:

cd /usr/local/src
wget http://internap.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.1.tbz2
tar xjf ffmpeg-php-0.5.1.tbz2
cd /usr/local/src/ffmpeg-php-0.5.1/
phpize && ./configure && make && make install
echo -e "\nextension = ffmpeg.so\n" >> /usr/local/lib/php.ini
service httpd restart
php -i | grep ffmpeg

If the extension doesn't load you need to fix php.ini and change the extension_dir line, it should look something like this:

extension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20060613/"

After that's done restart apache.

/etc/init.d/httpd restart

Install test files

wget http://mw.example.com/rpms/centos4/ffmpeg_stuff/post-install_ffmpeg_tests.tgz
tar -C /usr/local/apache/htdocs -xzf post-install_ffmpeg_tests.tgz
chown nobody:nobody /usr/local/apache/htdocs/post-install_ffmpeg_tests/*
echo "To test the install use the following URL:"
echo "${IP}/post-install_ffmpeg_tests/index.php"
Personal tools