Admin-Ahead Community
Linux => Control Panels => cPanel => Topic started by: varghesepa on April 18, 2017, 07:32:35 pm
-
Pre-requirements
Install php-devel for easyapache4 using the below command.
yum install ea-php56-php-devel-5.6.28-1.1.2.cpanel.x86_64
Or
yum install ea-php56-php-devel
Compile ffmpeg-php
wget http://rep0.admin-ahead.com/sources/aast-ffmpeg-installer/2_0_4/sources/ffmpeg-php.tar.gz
tar zxvf ffmpeg-php.tar.gz
cd ffmpeg-php
/opt/cpanel/ea-php56/root/usr/bin/phpize
CFLAGS=-I/path/to/ffmpegbuildincludedirectory LDFLAGS=-L/path/to/ffmpeglibdirectory ./configure --with-ffmpeg=/path/to/ffmpegbuilddirectory --with-php-config=/opt/cpanel/ea-php56/root/usr/bin/php-config
(CFLAGS and LDFLAGS can ignore based on your ffmpeg compilation) For example:
CFLAGS=-I/usr/local/ffmpeg/build/include LDFLAGS=-L/usr/local/ffmpeg/build/lib ./configure --with-ffmpeg=/usr/local/ffmpeg/build/ --with-php-config=/opt/cpanel/ea-php56/root/usr/bin/php-config
make && make install
echo "extension=ffmpeg.so" >> /opt/cpanel/ea-php56/root/etc/php.ini
service httpd restart
Verify the installation.
/opt/cpanel/ea-php56/root/usr/bin/php -m | ffmpeg
That’s it ;)