This article shares with you php's ffmpeg. Friends who are interested can take a look
##php video thumbnail, the more commonly used one is ffmpeg-php
1: Install ffmpeg
ffmpeg download link http://ffmpeg.org/download.html
Unzip the installation package
tar -jxvf ffmpeg-x.x.tar.bz2
Enter the directory
cd ffmpeg-x.x
Compile and install
./configure --enable-shared && make && make install
After the installation is complete, execute ffmpeg -version
If information similar to the following appears, ffmpeg is installed successfully.
2 3456789
10 |
|
2 Install ffmpeg-php
Official download link
https://sourceforge.net/projects/ffmpeg-php/files/ffmpeg -php/
The official version has not been updated for a long time. I tried it on centos 7 + php5.6&php7.1 centos6.5+php5 but it didn’t work. An error will be reported when configuring make.
Later I found a version on github. Compiled and installed successfully on centos7.2+php5.5.6 (centos7 + php7.1 still doesn’t work)
Address: git clone https://github.com/tony2001/ffmpeg-php.git
You can also visit my Baidu cloud disk to download
https://pan.baidu.com/s/1skQTVlj
Enter the ffmpeg-php directory to compile and expand
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
Note (if an error occurs after make, it is a problem with the ffmpeg-php version. Stop fussing and change the version (or try lowering the php version)).
Add
in the php configuration file php.ini ##1 |
| ##
##1 |
|
If there is output, OK
Reprinted from:
The above is the detailed content of ffmpeg for php - CSDN Blog. For more information, please follow other related articles on the PHP Chinese website!