Originally Posted by
dualistic
However, I am now having trouble installing the ffmpeg-php extension. I tried recompiling x264 and ffmpeg with --enable-shared instead but it still was not finding my installation. Could someone please help with some instructions on how I can install ffmpeg-php?
I have not really used FFmpeg-php myself but I had a quick look purely from curiosity (admittedly using a non-Ubuntu distro) and although phpize seemed to run ok:
Code:
andrew@skamandros~/Desktop/ffmpeg-php-0.6.0$ phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
configure.in:3: warning: prefer named diversions
configure.in:3: warning: prefer named diversions
and ./configure ran ok, picking up the FFmpeg libraries:
Code:
andrew@skamandros~/Desktop/ffmpeg-php-0.6.0$ ./configure
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/php/extensions
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for ffmpeg support... yes, shared
checking whether to force gd support in ffmpeg-php... no
checking for ffmpeg headers... ...found in /usr/include/libavcodec
checking for ffmpeg libavcodec.so... ...found in /usr/lib
checking for ffmpeg swscale support... yes
checking for ld used by cc... /usr/i486-slackware-linux/bin/ld
checking if the linker (/usr/i486-slackware-linux/bin/ld) is GNU ld... yes
checking for /usr/i486-slackware-linux/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/i486-slackware-linux/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
make crashed out with multiple errors in ffmpeg_movie.c, I demonstrate some of these here:
Code:
VIDEO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘_php_get_pixelformat’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:850:57: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘_php_get_codec_name’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:963:40: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getVideoCodec’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:989:58: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getAudioCodec’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1009:58: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getVideoStreamId’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1029:60: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getAudioStreamId’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1051:60: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getAudioChannels’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1089:53: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getAudioSampleRate’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1125:59: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getAudioBitRate’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1161:53: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getVideoBitRate’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1181:53: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘_php_read_av_frame’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1204:13: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1215:13: warning: implicit declaration of function ‘avcodec_decode_video’
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1219:48: error: ‘PKT_FLAG_KEY’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘_php_get_av_frame’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1246:57: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1282:24: error: ‘AVCodecContext’ has no member named ‘hurry_up’
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1284:24: error: ‘AVCodecContext’ has no member named ‘hurry_up’
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘_php_get_sample_aspect_ratio’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1443:57: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
make: *** [ffmpeg_movie.lo] Error 1
Are these the errors that stopped your compilation? I shall crank up my Natty Narwhal installation and have a proper look later and hopefully an FFmpeg-php guru will also see your post .
Edit: Mind you I picked up the latest FFmpeg-php from svn and saw this in the changelog:
Code:
version 0.6.3 (3/30/2009)
Bug Fixes
* Fixed compatibility with ffmpeg 0.5.0 release. ffmpeg-php is only
supporting offical releases from here on.
So I don't like your chances if the last supported FFmpeg build is so ancient .
Bookmarks