Ffmpeg-php

apps

#1

I’m struggling to get ffmpeg-php working
I’ve been trying to configure it with --prefix=$HOME
I have set my environment variables PATH to $HOME/bin:$PATH and LD_LIBRARY_PATH to $HOME/lib
whenever I try to configure it complains that it can’t find ffmpeg headers.

I found a post on another forum with exactly the problem I’ve run into but it’s solution hasn’t worked for me the following is from said forum…

////------------------------------------------------------------------------

While installing FFMPEG-PHP sometime it gives following error:

checking for ffmpeg support… yes, shared
checking for ffmpeg headers… configure: error: ffmpeg headers not
found. Make sure you’ve built ffmpeg as shared libs using the
–enable-shared option
To fix this problem just copy and paste the following commands on the
shell of your server and re-run the “./configure” for FFMPEG-PHP:

mkdir /usr/local/include/ffmpeg
cp /usr/local/include/libavcodec/* /usr/local/include/ffmpeg
cp /usr/local/include/libavdevice/* /usr/local/include/ffmpeg
cp /usr/local/include/libavformat/* /usr/local/include/ffmpeg
cp /usr/local/include/libavutil/* /usr/local/include/ffmpeg
cp /usr/local/include/libswscale/* /usr/local/include/ffmpeg

////-------------------------------------------------------------------------

I copied the headers files mentioned in the advice above from $HOME/include/… to $HOME/include/ffmpeg and reran configure but to know avail.
Anyone else have this problem?


#2

[quote]I’ve been trying to configure it with --prefix=$HOME
I have set my environment variables PATH to $HOME/bin:$PATH and LD_LIBRARY_PATH to $HOME/lib[/quote]
Try this in shell:

cd [ffmpeg-php_dir]
~/bin/phpize
./configure --enable-shared --with-ffmpeg=$HOME --with-php-config=$HOME/bin/php-config
make
make install

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#3

thanks a lot, I got through the configure with the following command:

./configure --enable-shared --with-ffmpeg=$HOME --with-php-config=/usr/local/php5/bin/php-config

however i’m now stuck on the make, error as follows…

/home/nutvca/ffmpeg-php-0.5.0/ffmpeg-php.c: At top level:
/home/nutvca/include/ffmpeg/avformat.h:188: error: storage size of `pix_fmt’ isn’t known
make: *** [ffmpeg-php.lo] Error 1

thanks


#4

Are you attempting to install ffmpeg without customising your PHP environment?

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#5

yea… I take it thats where I’m going wrong?


#6

I’ve installed it for a few people on DreamHost and compiled PHP immediately before compiling ffmpeg-php, then call it via the PHP.INI in the following manner:

[ffmpeg]
extension_dir=[your extension directory]
extension=ffmpeg.so

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost