Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: FFmpeg-php module installation cpanel easyapache4  (Read 6275 times)

0 Members and 1 Guest are viewing this topic.

varghesepa

  • Guest
FFmpeg-php module installation cpanel easyapache4
« 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  ;)