2

please help me installing FFMEPG, i have instilled it but there is no extension in php setting.

in php.d ffmepg is not there.

anyone one know how to install it.

MUKESH KUMAR
  • 33
  • 1
  • 5
  • FFmpeg does not include any PHP extensions. You need a third-party wrapper if you want to do that. See the [tag:ffmpeg-php] and [tag:php-ffmpeg] tags. Otherwise, just execute the `ffmpeg` executable directly in the script. See [FFmpeg Wiki: PHP](https://trac.ffmpeg.org/wiki/PHP). – llogan Oct 30 '18 at 19:21

2 Answers2

1

For PHP >=7.0, simply use composer:

# /opt/plesk/php/7.2/bin/php /usr/lib64/plesk-9.0/composer.phar install php-ffmpeg/php-ffmpeg

For earlier PHP versions:

1. Make sure EPEL is enabled:

# 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* -y

2. 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

3. Install FFmpeg and dependencies:

# sudo yum install ffmpeg ffmpeg-devel mplayer mencoder flvtool2 libogg libvorbis lame
# sudo yum install make plesk-php56-devel gcc glibc-devel zlib-devel

4. Download ffmpeg-php:

# git clone https://github.com/nilsringersma/ffmpeg-php
# cd ffmpeg-php 
# /opt/plesk/php/5.6/bin/phpize

5. Do configure & make:

# ./configure --with-php-config=/opt/plesk/php/5.6/bin/php-config --enable-skip-gd-check
# make 
# make install

6. Enable the extension:

# echo "extension=ffmpeg.so" > /opt/plesk/php/5.6/etc/php.d/ffmpeg.ini
# plesk bin php_handler --reread

For more general instructions, refer to this guide.

Elvis Plesky
  • 3,190
  • 1
  • 12
  • 21
0

you don't have to, you just could use shell_exec to run ffmpeg on php

You can follow this link

Running ffmpeg command using shell_exec in php as a background process in windows

Aman Rawat
  • 2,625
  • 1
  • 25
  • 40
Ugur Kazdal
  • 648
  • 8
  • 10