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:
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