Home >Backend Development >PHP Tutorial >Detailed explanation of the steps to install ffmpeg extension for PHP 5.3 under Centos 6.5

Detailed explanation of the steps to install ffmpeg extension for PHP 5.3 under Centos 6.5

黄舟
黄舟Original
2017-03-04 14:06:301562browse

Everyone knows that ffmpeg is a video streaming software. We can install ffmpeg in the Linux system. This article mainly introduces the steps to install the ffmpeg extension in PHP 5.3 under Centos 6.5. Friends who need it can refer to it. .

The content of this article is mainly to solve the problem of installing ffmpeg extension on PHP5.3 under Centos6.5. I won’t say much below, let’s take a look at the detailed steps.

The installation steps are as follows:

Install the necessary environment yasm

 wget http://www.php.cn/
 tar zxvf yasm-0.7.0.tar.gz
 cd yasm-0.7.0
 ./configure
 make && make install

Install ffmpeg

 svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
 cd ffmpeg
 ./configure --enable-shared 
 make
 make install

Install ffmpeg-php

Download address: http://www.php.cn/

 tar jxvf ffmpeg-php-0.6.0.tbz2
 cd ffmpeg-php-0.6.0
 /usr/local/php/bin/phpize
 ./configure --with-php-config=/usr/local/php/bin/php-config

Important: Troubleshoot! ! !

 vi ffmpeg_frame.c
  :%s/PIX_FMT_RGBA32/PIX_FMT_RGB32 #替换PIX_FMT_RGBA32为/PIX_FMT_RGB32 
make &&make install
vi /usr/local/php/etc/php.ini

加入: extension=ffmpeg.so

service httpd restart #重启apache生效

Summary

The above is a detailed explanation of the steps to install the ffmpeg extension for PHP 5.3 under Centos 6.5. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn