Admin-Ahead Community

Linux => Control Panels => cPanel => Topic started by: varghesepa on April 18, 2017, 07:32:35 pm

Title: FFmpeg-php module installation cpanel easyapache4
Post by: varghesepa on April 18, 2017, 07:32:35 pm
Pre-requirements

Install php-devel for easyapache4 using the below command.
Code: [Select]
yum install ea-php56-php-devel-5.6.28-1.1.2.cpanel.x86_64Or
Code: [Select]
yum install ea-php56-php-devel
Compile ffmpeg-php

Code: [Select]
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

Code: [Select]
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:
Code: [Select]
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

Code: [Select]
make && make install

Code: [Select]
echo "extension=ffmpeg.so" >>  /opt/cpanel/ea-php56/root/etc/php.ini
service httpd restart

Verify the installation.
Code: [Select]
/opt/cpanel/ea-php56/root/usr/bin/php -m | ffmpeg

That’s it  ;)