php5.3.3 under Installation FFmpeg

Source: Internet
Author: User

Install YASM, general this Yum warehouse will have this package, can be installed directly

Yum Install Yasm

Installing FFmpeg

SVN checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpegcd ffmpeg/./configure--prefix=/usr/local/ffmpeg-- Enable-sharedmakemake Install

You can use the FFmpeg command to see if the installation was successful:

Success will return the following information

ffmpeg version svn-r26402, copyright  (c)  2000-2011 the FFmpeg  developers  built on aug 16 2017 18:44:48 with gcc 4.4.7  20120313  (red hat 4.4.7-18)   configuration: --enable-shared   warning: library configuration mismatch  avutil       configuration: --prefix=/usr/local/ffmpeg --enable-shared  avcore       configuration: --prefix=/usr/local/ffmpeg --enable-shared  avcodec      configuration: --prefix=/usr/local/ffmpeg --enable-shared  avformat     configuration: --prefix=/usr/local/ffmpeg --enable-shared   avdevice    configuration: --prefix=/usr/local/ffmpeg --enable-shared   avfilter    configuration: --prefix=/usr/local/ffmpeg --enable-shared  swscale      configuration: --prefix=/usr/local/ffmpeg --enable-shared  libavutil      50.36. 0 / 50.36. 0  libavcore       0.16. 1 /  0.16. 1  libavcodec    52.108. 0 /  52.108. 0  libavformat   52.93. 0 / 52.93. 0   libavdevice   52. 2. 3 / 52. 2. 3  libavfilter     1.74. 0 /  1.74. 0  libswscale      0.12. 0 /  0.12. 0Hyper fast Audio and Video  Encoderusage: ffmpeg [options] [[infile options] -i infile]... {[outfile  options] outfile} ... Use -h to get full help or, even better, run  ' Man ffmpeg ' 

I got an error when I installed it:

Ffmpeg:error while loading shared libraries:libavdevice.so.52:cannot open Shared object File:no such file or director Y workaround: Add your ffmpeg installation directory to the last line in/etc/ld.so.conf and make sure that the file lib/libavdevice.so.52 in the installation directory is running Ldconfig reload information

Install php-ffmpeg below

: http://ffmpeg-php.sourceforge.net/

Version is: ffmpeg-php-0.6.0.tbz2

Minimum supported version:

    • Ffmpeg-0.4.9_pre1 or higher.

    • php-4.3.0 or higher

    • gd-2.0 or higher (the version of GD bundled with PHP works too)


If you do not have phpize, you need to install Php-devel

Tar xjf ffmpeg-php-0.6.0.tbz2cd ffmpeg-php-0.6.0/phpize./configure--with-ffmpeg=/usr/local/ffmpeg You can first use make Test to see if there is an error and then recompile Makemake install using make clean

The following error occurred in installing  php-ffmpeg  

/root/ffmpeg-php-0.6.0/ffmpeg_frame.c:336:error: ' Pix_fmt_rgba32 ' undeclared (first use of this function)/root/ Ffmpeg-php-0.6.0/ffmpeg_frame.c:336:error: (Each undeclared identifier was reported only once/root/ffmpeg-php-0.6.0/ Ffmpeg_frame.c:336:error:for each function it appears in.) /root/ffmpeg-php-0.6.0/ffmpeg_frame.c:in function ' zim_ffmpeg_frame_ffmpeg_frame ':/root/ffmpeg-php-0.6.0/ffmpeg_ Frame.c:421:error: ' Pix_fmt_rgba32 ' undeclared (first use of this function) make: * * * [Ffmpeg_frame.lo] Error 1/root/ffmpe g-php-0.6.0/ffmpeg_frame.c:in function ' zim_ffmpeg_frame_togdimage ':

You need to replace the pix_fmt_rgba32 inside the ffmpeg_frame.c with PIX_FMT_RGB32, there are three places in total


After all the build services are installed, you need to join the last line in php.ini: extension=ffmpeg.so

Restarting PHP makes it effective


Use the following method to see if it takes effect:

Php-m|grep ffmpegphp-r ' phpinfo (); ' | grep ffmpeg


This article is from "for the tribe!" "Blog, be sure to keep this provenance http://10309478.blog.51cto.com/10299478/1957090

php5.3.3 under Installation FFmpeg

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.