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

黄舟
Release: 2023-03-06 11:04:01
Original
1551 people have browsed it

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 //m.sbmmt.com/
 tar zxvf yasm-0.7.0.tar.gz
 cd yasm-0.7.0
 ./configure
 make && make install
Copy after login

Install ffmpeg

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

Install ffmpeg-php

Download address: //m.sbmmt.com/

 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
Copy after login

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生效
Copy after login

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 (m.sbmmt.com)!


Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template