- Plesk for Linux
How to install ffmpeg PHP module?
Warning: Plesk software does not install and does not manage FFMPEG library. Apply the solution below on your own risk and reponsibility.
Note: this instruction is applicable to CentOS 7 and PHP version 5.6 only and was not officially tested with Plesk.
Note: For single website, the 'composer' can be used instead. See the command below for the installation and the following link for usage examples: https://github.com/PHP-FFMpeg/PHP-FFMpeg
# /opt/plesk/php/7.2/bin/php /usr/lib64/plesk-9.0/composer.phar install php-ffmpeg/php-ffmpeg
- Log in to the server via SSH as root user.
Make sure EPEL repository is enabled. The following or similar output should be shown on the command below:
# yum repolist | grep epel
*epel/x86_64 Extra Packages for Enterprise Linux 7 - 12559
if it is not, enable it as follows:
# yum install epel*
Enable RPM Fusion:
# yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
# yum localinstall --nogpgcheck https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm
install ffmpeg and dependencies:
# yum install ffmpeg ffmpeg-devel mplayer mencoder flvtool2 libogg libvorbis lame
# yum install make plesk-php56-devel gcc glibc-devel zlib-devel
# cd /root && git clone https://github.com/nilsringersma/ffmpeg-php
# cd ffmpeg-php
Configure & make:
# ./configure --with-php-config=/opt/plesk/php/5.6/bin/php-config --enable-skip-gd-check
# make install
Enable the extension and update Plesk settings:
# echo "extension=ffmpeg.so" > /opt/plesk/php/5.6/etc/php.d/ffmpeg.ini
# plesk bin php_handler --reread