Must read: How to install ffmpeg in CentOS or Red Hat
Once you have installed ffmpeg, now you need to install php extension of ffmpeg to work ffmpeg via php.
1 2 3 4 5 6 |
# wget http://sourceforge.net/projects/ffmpeg-php/files/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2/download # tar -xvjf ffmpeg-php-0.6.0.tbz2 # phpize # ./configure --enable-shared # make # make install |
Locate php.ini
1 2 3 |
# php -i | grep php.ini Configuration File (php.ini) Path => /usr/local/lib Loaded Configuration File => /usr/local/lib/php.ini |
Edit php.ini and add
1 |
# vi /usr/local/lib/php.ini |
Add following at the end of php.ini
1 2 |
[ffmpeg] extension=ffmpeg.so |
Restart Apache
1 |
# service httpd restart |
You can confirm by running
1 2 |
# php -m | grep ffmpeg ffmpeg |
1 2 3 4 5 6 7 8 9 10 |
# php -i | grep ffmpeg ffmpeg ffmpeg-php version => 0.6.0-svn ffmpeg-php built on => Aug 28 2012 21:14:51 ffmpeg-php gd support => enabled ffmpeg libavcodec version => Lavc52.72.2 ffmpeg libavformat version => Lavf52.64.2 ffmpeg swscaler version => SwS0.11.0 ffmpeg.allow_persistent => 0 => 0 ffmpeg.show_warnings => 0 => 0 |
Must Read: Common errors in the installation of ffmpeg-php extension
Comment Policy:
Your words are your own, so be nice and helpful if you can. Please, only use your real name, not your business name or keywords. Using business name or keywords instead of your real name will lead to the comment being deleted. Anonymous commenting is not allowed either. Limit the amount of links submitted in your comment. We accept clean XHTML in comments, but don't overdo it please.