Home » Control Panel » Plesk » Install FFMPEG on Plesk 12.5

Install FFMPEG on Plesk 12.5

Installing website software like ClipBucket or ClipShare is pretty hard on commercial webhosting control panel due to installation of FFMPEG library. No need to worry about it anymore, in this post I will show you how to install FFMPEG on Plesk 12.5 control panel.

For this ilustration I took :

Centos 6 x86_64
Plesk 12.5

Install FFMPEG on Plesk 12.5

FFMPEG packages are not available on CentOS base repository, so I have to find another repository to get latest stable FFMPEG packages.

Upon testing, I found RPMForge have most stable FFMPEG packages.

Note : RPM Fusion which is recommended by ffmpeg.org, is not compatible with current php-ffmpeg-0.6.6

Step 1

Install RPMForge repository , but make it as disable to avoid package conflict with Plesk repository.

# rpm -Uvh http://repository.it4i.cz/mirrors/repoforge/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
# sed -i 's/^\(enabled\s*=\s*\).*$/\10/' /etc/yum.repos.d/rpmforge.repo

Step 2
Install all FFMPEG packages from FPMForge repository

# yum --enablerepo=rpmforge install ffmpeg ffmpeg-devel mplayer mencoder flvtool2 libogg libvorbis lame
Step 3
Install PHP development package to compile PHP with FFMPEG. In Plesk have multiple PHP version, you have to choose for which version you want to install first. In this tutorial I will install it on PHP 5.6
# yum install make plesk-php56-devel gcc glibc-devel zlib-devel
Step 4
Download php-ffmpeg package module and compile it with PHP 5.6
wget http://downloads.sourceforge.net/ffmpeg-php/ffmpeg-php-0.6.0.tbz2
tar -xjf ffmpeg-php-0.6.0.tbz2
cd ffmpeg-php-0.6.0
Changes in ffmpeg_movie.c:
row 311: list_entry *le; to zend_rsrc_list_entry *le;
row 346: list_entry new_le; to zend_rsrc_list_entry new_le;
row 360: hashkey_length+1, (void *)&new_le, sizeof(list_entry), to hashkey_length+1, (void *)&new_le,sizeof(zend_rsrc_list_entry),
# /opt/plesk/php/5.6/bin/phpize
# ./configure --with-php-config=/opt/plesk/php/5.6/bin/php-config --enable-skip-gd-check
# make
# make install
Step 5
Add the extention to PHP and register it with Plesk
# echo "extension=ffmpeg.so" > /opt/plesk/php/5.6/etc/php.d/ffmpeg.ini
# plesk bin php_handler --reread
You should now be able to see the extension in Tools & Settings > PHP Settings > *any PHP 5.6 handler*
php-ffmpeg
Step 6
Change the PHP version for the domain you want to use FFMPEG on it
change php version on plesk
Congratulation’s! You have successfully installed FFMPEG on Plesk Server. Thanks for using this tutorial for install FFMPEG on Plesk 12.5. For additional help or useful information, we recommend you to check the official FFMPEG web site.

Check Also

Install DKIM and DMARC on Plesk 12.5

Now a days mail is an unavoidable part of life. How ever the misuse of …

8 comments

  1. pkgs.repoforge.org seems to be dead.. any other known sources?

  2. thanks for the very nice guide and the fast reply.. is there a 32bit version?

  3. cancel that, we will be migrating to a newer server that is running CentOS7 x64

    thanks

  4. I finally got 64bit OS going and gave this a go and got these errors after step 2

    Error: Package: mplayer-1.0-0.48.svn20100703.el6.rf.x86_64 (rpmforge)
    Requires: libopenjpeg.so.2()(64bit)
    Error: Package: mplayer-1.0-0.48.svn20100703.el6.rf.x86_64 (rpmforge)
    Requires: libesd.so.0()(64bit)
    Error: Package: mplayer-1.0-0.48.svn20100703.el6.rf.x86_64 (rpmforge)
    Requires: libartsc.so.0()(64bit)
    Error: Package: ffmpeg-0.6.5-1.el6.rf.x86_64 (rpmforge)
    Requires: libdc1394.so.22()(64bit)
    Error: Package: librtmp-2.3-1.el6.rf.x86_64 (rpmforge)
    Requires: libgnutls.so.26(GNUTLS_1_4)(64bit)
    Error: Package: mencoder-1.0-0.48.svn20100703.el6.rf.x86_64 (rpmforge)
    Requires: libopenjpeg.so.2()(64bit)
    Error: Package: mpg123-1.20.1-1.el6.rf.x86_64 (rpmforge)
    Requires: libesd.so.0()(64bit)
    Error: Package: ffmpeg-devel-0.6.5-1.el6.rf.x86_64 (rpmforge)
    Requires: libdc1394-devel
    Error: Package: librtmp-2.3-1.el6.rf.x86_64 (rpmforge)
    Requires: libgnutls.so.26()(64bit)

    • Sorry for late reply, I was on vacation.
      There are several packages missing.. libopenjpeg.so.2,libartsc.so.o

      Try to fix the package inconsistency first.

  5. Hi.

    When I use make and make install for ffmpeg-php-0.6.0, I got these errors:

    /bin/sh /root/ffmpeg-php-0.6.0/libtool –mode=compile cc -I. -I/root/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/root/ffmpeg-php-0.6.0/include -I/root/ffmpeg-php-0.6.0/main -I/root/ffmpeg-php-0.6.0 -I/opt/plesk/php/7.0/include/php -I/opt/plesk/php/7.0/include/php/main -I/opt/plesk/php/7.0/include/php/TSRM -I/opt/plesk/php/7.0/include/php/Zend -I/opt/plesk/php/7.0/include/php/ext -I/opt/plesk/php/7.0/include/php/ext/date/lib -I/usr/include/libavcodec/ -I/usr/include/libavformat/ -I/usr/include/libavutil/ -I/usr/include/libswscale/ -I/usr/include/libavfilter/ -I/usr/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /root/ffmpeg-php-0.6.0/ffmpeg-php.c -o ffmpeg-php.lo
    libtool: compile: cc -I. -I/root/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/root/ffmpeg-php-0.6.0/include -I/root/ffmpeg-php-0.6.0/main -I/root/ffmpeg-php-0.6.0 -I/opt/plesk/php/7.0/include/php -I/opt/plesk/php/7.0/include/php/main -I/opt/plesk/php/7.0/include/php/TSRM -I/opt/plesk/php/7.0/include/php/Zend -I/opt/plesk/php/7.0/include/php/ext -I/opt/plesk/php/7.0/include/php/ext/date/lib -I/usr/include/libavcodec/ -I/usr/include/libavformat/ -I/usr/include/libavutil/ -I/usr/include/libswscale/ -I/usr/include/libavfilter/ -I/usr/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /root/ffmpeg-php-0.6.0/ffmpeg-php.c -fPIC -DPIC -o .libs/ffmpeg-php.o
    In file included from /usr/include/sys/stat.h:107,
    from /opt/plesk/php/7.0/include/php/Zend/zend_stream.h:28,
    from /opt/plesk/php/7.0/include/php/Zend/zend.h:41,
    from /opt/plesk/php/7.0/include/php/main/php.h:35,
    from /root/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
    /usr/include/bits/stat.h:91: error: field ‘st_atim’ has incomplete type
    /usr/include/bits/stat.h:92: error: field ‘st_mtim’ has incomplete type
    /usr/include/bits/stat.h:93: error: field ‘st_ctim’ has incomplete type
    /usr/include/bits/stat.h:152: error: field ‘st_atim’ has incomplete type
    /usr/include/bits/stat.h:153: error: field ‘st_mtim’ has incomplete type
    /usr/include/bits/stat.h:154: error: field ‘st_ctim’ has incomplete type
    In file included from /opt/plesk/php/7.0/include/php/Zend/zend_stream.h:28,
    from /opt/plesk/php/7.0/include/php/Zend/zend.h:41,
    from /opt/plesk/php/7.0/include/php/main/php.h:35,
    from /root/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
    /usr/include/sys/stat.h:367: error: array type has incomplete element type
    /usr/include/sys/stat.h:374: error: array type has incomplete element type
    In file included from /opt/plesk/php/7.0/include/php/main/php.h:394,
    from /root/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
    /opt/plesk/php/7.0/include/php/Zend/zend_virtual_cwd.h:218: error: expected specifier-qualifier-list before ‘time_t’
    /opt/plesk/php/7.0/include/php/Zend/zend_virtual_cwd.h:248: error: expected declaration specifiers or ‘…’ before ‘time_t’
    /root/ffmpeg-php-0.6.0/ffmpeg-php.c: In function ‘zm_startup_ffmpeg’:
    /root/ffmpeg-php-0.6.0/ffmpeg-php.c:94: warning: implicit declaration of function ‘avcodec_init’
    make: *** [ffmpeg-php.lo] Error 1

    What I should do?

Leave a Reply

Your email address will not be published. Required fields are marked *