Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

With the help of this guide, I am trying to install ffmpeg using these commands:

 # cd ffmpeg-php/branches/ffmpeg-php/ffmpeg-php-0.6.1/
 # replace 'PIX_FMT_RGBA32' 'PIX_FMT_RGB32' -- *
 # phpize 
 # ./configure --with-ffmpeg=/usr/local/cpffmpeg
 # make 
 # make install

But when I run this replace 'PIX_FMT_RGBA32' 'PIX_FMT_RGB32' -- * I get this error:

replace: Error reading file 'autom4te.cache' (Errcode: 21) replace: Error reading file 'build' (Errcode: 21) ffmpeg_frame.c converted replace: Error reading file 'include' (Errcode: 21) replace: Error reading file 'modules' (Errcode: 21) replace: Error reading file 'tests' (Errcode: 21)

And when I run make and skip that line I get:

/root/ffmpeg-php/branches/ffmpeg-php/ffmpeg-php-0.6.1/ffmpeg-php.c:171: error: expected '{' at end of input
make: *** [ffmpeg-php.lo] Error 1

Any ideas?

share|improve this question
    
Curiously, did you do all of that as root? I say that because # normally implies that the command is ran as root. –  Tshepang Jan 29 '11 at 9:35

3 Answers 3

The errors from replace are harmless, it's just telling you (cryptically) that these files are directories and it can't act on them.

But you do need to run phpize and ./configure … before you can run make.

share|improve this answer
    
yes i am running them before i run make.. –  livetolearn Jan 10 '11 at 20:19

Probably, you would need to edit the only one file i.e. ffmpeg_frame.c

replace 'PIX_FMT_RGBA32' 'PIX_FMT_RGB32' -- ffmpeg_frame.c
./configure
make
make install

This should install ffmpeg-php on the server - you will need to add the ffmpeg.so file to your php.ini file like:

extension=ffmpeg.so

Restart Apache on the server once the extension is added.

share|improve this answer

Can't you use yum?

On Ubuntu doing aptitude install php5-ffmpeg seems to automatically install ffmpeg and all it's dependencies. Perhaps the same package is available for CentOS?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.