How to install ffmpeg-php on a centos 6.0?

Issues related to applications and software problems
Post Reply
rewards
Posts: 48
Joined: 2011/02/22 02:59:11

How to install ffmpeg-php on a centos 6.0?

Post by rewards » 2011/10/09 16:55:47

Hello all,

I am trying to install ffmpeg-php on a centos 6.0 but with no success. I am copied and pasted everything to give a clear picture for anyone who can help me with this and I appreciate it very much. I don't understand why this is so complicated? I have installed all the pre-requisit packeges in order to install ffmpeg-php such as yum install ffmpeg ffmpeg-devel ffmpeg-libpostproc subversion etc.


[root@php ffmpeg-php-0.6.0]# phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626

[root@php ffmpeg-php-0.6.0]# ./configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
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 a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from cc object... ok
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 for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/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
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing libtool commands

[root@php ffmpeg-php-0.6.0]# make
/bin/sh /root/Downloads/ffmpeg-php-0.6.0/libtool --mode=compile cc -I. -I/root/Downloads/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/root/Downloads/ffmpeg-php-0.6.0/include -I/root/Downloads/ffmpeg-php-0.6.0/main -I/root/Downloads/ffmpeg-php-0.6.0 -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 -I/usr/include/libavcodec/ -I/usr/include/libavformat/ -I/usr/include/libavutil/ -I/usr/include/libswscale/ -I/usr/include/libavfilter/ -I/usr/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /root/Downloads/ffmpeg-php-0.6.0/ffmpeg_frame.c -o ffmpeg_frame.lo
libtool: compile: cc -I. -I/root/Downloads/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/root/Downloads/ffmpeg-php-0.6.0/include -I/root/Downloads/ffmpeg-php-0.6.0/main -I/root/Downloads/ffmpeg-php-0.6.0 -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 -I/usr/include/libavcodec/ -I/usr/include/libavformat/ -I/usr/include/libavutil/ -I/usr/include/libswscale/ -I/usr/include/libavfilter/ -I/usr/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /root/Downloads/ffmpeg-php-0.6.0/ffmpeg_frame.c -fPIC -DPIC -o .libs/ffmpeg_frame.o
/root/Downloads/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function ‘zim_ffmpeg_frame_toGDImage’:
/root/Downloads/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: ‘PIX_FMT_RGBA32’ undeclared (first use in this function)
/root/Downloads/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: (Each undeclared identifier is reported only once
/root/Downloads/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: for each function it appears in.)
/root/Downloads/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function ‘zim_ffmpeg_frame_ffmpeg_frame’:
/root/Downloads/ffmpeg-php-0.6.0/ffmpeg_frame.c:421: error: ‘PIX_FMT_RGBA32’ undeclared (first use in this function)
make: *** [ffmpeg_frame.lo] Error 1

[root@php ffmpeg-php-0.6.0]# make install
/bin/sh /root/Downloads/ffmpeg-php-0.6.0/libtool --mode=compile cc -I. -I/root/Downloads/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/root/Downloads/ffmpeg-php-0.6.0/include -I/root/Downloads/ffmpeg-php-0.6.0/main -I/root/Downloads/ffmpeg-php-0.6.0 -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 -I/usr/include/libavcodec/ -I/usr/include/libavformat/ -I/usr/include/libavutil/ -I/usr/include/libswscale/ -I/usr/include/libavfilter/ -I/usr/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /root/Downloads/ffmpeg-php-0.6.0/ffmpeg_frame.c -o ffmpeg_frame.lo
libtool: compile: cc -I. -I/root/Downloads/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/root/Downloads/ffmpeg-php-0.6.0/include -I/root/Downloads/ffmpeg-php-0.6.0/main -I/root/Downloads/ffmpeg-php-0.6.0 -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 -I/usr/include/libavcodec/ -I/usr/include/libavformat/ -I/usr/include/libavutil/ -I/usr/include/libswscale/ -I/usr/include/libavfilter/ -I/usr/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /root/Downloads/ffmpeg-php-0.6.0/ffmpeg_frame.c -fPIC -DPIC -o .libs/ffmpeg_frame.o
/root/Downloads/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function ‘zim_ffmpeg_frame_toGDImage’:
/root/Downloads/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: ‘PIX_FMT_RGBA32’ undeclared (first use in this function)
/root/Downloads/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: (Each undeclared identifier is reported only once
/root/Downloads/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: for each function it appears in.)
/root/Downloads/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function ‘zim_ffmpeg_frame_ffmpeg_frame’:
/root/Downloads/ffmpeg-php-0.6.0/ffmpeg_frame.c:421: error: ‘PIX_FMT_RGBA32’ undeclared (first use in this function)
make: *** [ffmpeg_frame.lo] Error 1

[root@php ffmpeg-php-0.6.0]#

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to install ffmpeg-php on a centos 6.0?

Post by TrevorH » 2011/10/09 19:44:55

http://linuxhostingsupport.net/blog/error-pix_fmt_rgba32-undeclared

Oh, and you really should not compile stuff as root. It isn't necessary and can be downright dangerous. The only step that needs to run as root is the `make install` one which installs the new files in the correct locations. Ideally you should try to find a rebuilt RPM containing the code you want to run, failing that, try to find a source RPM for a Fedora distribution and rebuild that on Centos. As a last resort, you should do what you are currently doing and compile by hand

rewards
Posts: 48
Joined: 2011/02/22 02:59:11

Re: How to install ffmpeg-php on a centos 6.0?

Post by rewards » 2011/10/11 03:13:25

Hello.

Thank you for your response. I did everything step by step according the site link and the suggestions by the site. Now how can I make sure that ffmpeg-php actually is being installed on my system successfully? Are there any commands on the terminal showing this? Thank you

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

How to install ffmpeg-php on a centos 6.0?

Post by pschaff » 2011/10/11 21:20:56

Please review the recommended reading and do not dual-post. Your duplicate post has been removed from view.

No idea how to verify it is installed properly except for using it for your intended purpose; however rather that using a [url=http://wiki.centos.org/PackageManagement/SourceInstalls]Source Install[/url] I suggest you google a [url=http://www.google.com/search?q=ffmpeg-php+%22src.rpm%22&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a]ffmpeg-php src.rpm[/url] and follow [url=http://wiki.centos.org/HowTos/RebuildSRPM]How to Rebuild a Source RPM[/url] to create a package.

Post Reply