Topic: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

Here is a tutorial that will help you to install ffmpeg-php along with ffmpeginsaller version 6.3

1) Download the ffmpeg installer version 6.3   to your server and replace ffmpeg.sh with the following code.
---------------

#!/bin/bash
#FFMPEG installation script

#  Copyright (C) 2007-2010 Sherin.co.in. All rights reserved.
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
RED='\033[01;31m'
RESET='\033[0m'
INSTALL_SDIR='/usr/src/ffmpegscript'
SOURCE_URL='http://mirror.ffmpeginstaller.com/source/ffmpeg'
INSTALL_DDIR='/usr/local/cpffmpeg'
export cpu=`cat "/proc/cpuinfo" | grep "processor"|wc -l`
export TMPDIR=$HOME/tmp
_package='ffmpeg.tar.gz'
clear
sleep 2
ffmpeg_source=$_package
ldconfig
echo -e $RED"Installation of $_package ....... started"$RESET
cd $INSTALL_SDIR
echo "Removing old source"
   rm -vrf ffmpeg*
   #wget $SOURCE_URL/$ffmpeg_source
   #tar -xvzf $ffmpeg_source
  # /usr/local/cpffmpeg/bin/svn   checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
wget -c http://www.ffmpeg.org/releases/ffmpeg-0.5.3.tar.gz
tar -xzf ffmpeg-0.5.3.tar.gz
   cd ffmpeg-0.5.3/
   ldconfig
./configure --prefix=$INSTALL_DDIR --enable-shared --enable-nonfree \
                --enable-gpl --enable-pthreads  --enable-libopencore-amrnb  --enable-decoder=liba52 \
                --enable-libopencore-amrwb  --enable-libfaac  --enable-libmp3lame \
                --enable-libtheora --enable-libvorbis  --enable-libx264  --enable-libxvid \
                --extra-cflags=-I/usr/local/cpffmpeg/include/ --extra-ldflags=-L/usr/local/cpffmpeg/lib \
                 --enable-version3 --enable-swscale
   make -j$cpu
   make tools/qt-faststart   
   make install
   cp -vf tools/qt-faststart /usr/local/cpffmpeg/bin/
   ln -sf /usr/local/cpffmpeg/bin/ffmpeg /usr/local/bin/ffmpeg
   ln -sf /usr/local/cpffmpeg/bin/ffmpeg /usr/bin/ffmpeg
   ln -sf /usr/local/cpffmpeg/bin/qt-faststart /usr/local/bin/qt-faststart
   ln -sf /usr/local/cpffmpeg/bin/qt-faststart /usr/bin/qt-faststart
   ldconfig
   /usr/bin/ffmpeg -formats

echo -e $RED"Installation of $_package ....... Completed"$RESET
sleep 2
-----------------------

2) Install all the packages using ./install

3) Download ffmpeg-php as follows,

# svn co https://ffmpeg-php.svn.sourceforge.net/ … ffmpeg-php ffmpeg-php

4) Install ffmpeg-php as follows,

    # 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

5) Sometimes you need to add  extension = "ffmpeg.so"  to the php.ini file and set the extension_dir path.

Hope this will help some one.

Syslint Technologies | 24x7 Server Management | Outsourced Support | Software Development - (0091) 471-3273-211

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

If i modify the ffmpeg.sh file then i get an error at ffmpeg install.I can install it without modify the file but then when i want to install ffmpeg-php 0.6.1 it give me and error on make command:

In file included from /home/work/ffmpeg-php/branches/ffmpeg-php/ffmpeg-php-0.6.0/ffmpeg-php.c:42:
/usr/local/cpffmpeg/include/libavcodec/avcodec.h:30:33: error: libavcore/samplefmt.h: No such file or directory
/usr/local/cpffmpeg/include/libavcodec/avcodec.h:32:27: error: libavutil/cpu.h: No such file or directory
/usr/local/cpffmpeg/include/libavcodec/avcodec.h:437:36: error: libavcore/audioconvert.h: No such file or directory
In file included from /home/work/ffmpeg-php/branches/ffmpeg-php/ffmpeg-php-0.6.0/ffmpeg-php.c:42:
/usr/local/cpffmpeg/include/libavcodec/avcodec.h:1251: error: field 'sample_fmt' has incomplete type
/usr/local/cpffmpeg/include/libavcodec/avcodec.h:1372: error: field 'codec_type' has incomplete type
/usr/local/cpffmpeg/include/libavcodec/avcodec.h:2801: error: field 'type' has incomplete type
/usr/local/cpffmpeg/include/libavcodec/avcodec.h:2849: error: field 'type' has incomplete type
make: *** [ffmpeg-php.lo] Error 1

Im on centos 5.2 and ffmepg works now but i can't get ffmpeg-php to install.
Do you have any advices?
Thanks.

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

Hello,
Do the following ,

Download the ffmpeg-php from svn and go to the ffmpeg-php-swscale folder   then  ,

# phpize
# ./configure --with-ffmpeg=/usr/local/cpffmpeg
# make
# make install

If all   ok add the extension ffmpeg.so to php.ini

Syslint Technologies | 24x7 Server Management | Outsourced Support | Software Development - (0091) 471-3273-211

4 (edited by razor 2011-01-03 09:22:30)

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

Hello,

I've used:

    # 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

on ffmpeg-php-swscale and did the trick thank you.

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

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)

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

Hello,

That only need if you have a 32 bit server   . Also the command seems fine
------
ffmpeg_frame.c converted
------------

Syslint Technologies | 24x7 Server Management | Outsourced Support | Software Development - (0091) 471-3273-211

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

after did the make command i got the following errors

/home/zoondia001/ffmpeg/ffmpeg-php-0.6.0/ffmpeg-php.c:92: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
/home/zoondia001/ffmpeg/ffmpeg-php-0.6.0/ffmpeg-php.c:130: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
/home/zoondia001/ffmpeg/ffmpeg-php-0.6.0/ffmpeg-php.c:143: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
/usr/local/cpffmpeg/include/libswscale/swscale.h:161: error: old-style parameter declarations in prototyped function definition
/home/zoondia001/ffmpeg/ffmpeg-php-0.6.0/ffmpeg-php.c:163: error: expected ‘{’ at end of input
make: *** [ffmpeg-php.lo] Error 1

please tell me what is the issue, if i did anything wrong.

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

Successfully installd ffmpeg using ffmpeginstaller 6.3, but while configuring php using ffmpeg-php-0.6.1 got below mentioned error while running #make, how to solve this ?
-------------------------------------------------
root@v9 [/usr/local/src/ffmpeg-php/branches/ffmpeg-php/ffmpeg-php-0.6.1]# make
/bin/sh /usr/local/src/ffmpeg-php/branches/ffmpeg-php/ffmpeg-php-0.6.1/libtool --mode=compile cc  -I. -I/usr/local/src/ffmpeg-php/branches/ffmpeg-php/ffmpeg-php-0.6.1 -DPHP_ATOM_INC -I/usr/local/src/ffmpeg-php/branches/ffmpeg-php/ffmpeg-php-0.6.1/include -I/usr/local/src/ffmpeg-php/branches/ffmpeg-php/ffmpeg-php-0.6.1/main -I/usr/local/src/ffmpeg-php/branches/ffmpeg-php/ffmpeg-php-0.6.1 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/cpffmpeg/include/libavcodec/ -I/usr/local/cpffmpeg/include/libavformat/ -I/usr/local/cpffmpeg/include/libavutil/ -I/usr/local/cpffmpeg/include/libswscale/ -I/usr/local/cpffmpeg/include/libavfilter/ -I/usr/local/cpffmpeg/include/libavdevice/  -DHAVE_CONFIG_H  -g -O2 -Wall -fno-strict-aliasing   -c /usr/local/src/ffmpeg-php/branches/ffmpeg-php/ffmpeg-php-0.6.1/ffmpeg-php.c -o ffmpeg-php.lo
cc -I. -I/usr/local/src/ffmpeg-php/branches/ffmpeg-php/ffmpeg-php-0.6.1 -DPHP_ATOM_INC -I/usr/local/src/ffmpeg-php/branches/ffmpeg-php/ffmpeg-php-0.6.1/include -I/usr/local/src/ffmpeg-php/branches/ffmpeg-php/ffmpeg-php-0.6.1/main -I/usr/local/src/ffmpeg-php/branches/ffmpeg-php/ffmpeg-php-0.6.1 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/cpffmpeg/include/libavcodec/ -I/usr/local/cpffmpeg/include/libavformat/ -I/usr/local/cpffmpeg/include/libavutil/ -I/usr/local/cpffmpeg/include/libswscale/ -I/usr/local/cpffmpeg/include/libavfilter/ -I/usr/local/cpffmpeg/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /usr/local/src/ffmpeg-php/branches/ffmpeg-php/ffmpeg-php-0.6.1/ffmpeg-php.c  -fPIC -DPIC -o .libs/ffmpeg-php.o
In file included from /usr/local/src/ffmpeg-php/branches/ffmpeg-php/ffmpeg-php-0.6.1/ffmpeg-php.c:42:
/usr/local/cpffmpeg/include/libavcodec/avcodec.h:30:33: error: libavcore/samplefmt.h: No such file or directory
/usr/local/cpffmpeg/include/libavcodec/avcodec.h:32:27: error: libavutil/cpu.h: No such file or directory
/usr/local/cpffmpeg/include/libavcodec/avcodec.h:438:36: error: libavcore/audioconvert.h: No such file or directory
In file included from /usr/local/src/ffmpeg-php/branches/ffmpeg-php/ffmpeg-php-0.6.1/ffmpeg-php.c:42:
/usr/local/cpffmpeg/include/libavcodec/avcodec.h:1267: error: field âsample_fmtâ has incomplete type
make: *** [ffmpeg-php.lo] Error 1
root@v9 [/usr/local/src/ffmpeg-php/branches/ffmpeg-php/ffmpeg-php-0.6.1]#
----------------------------------------------

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

please read this whole post to install ffmpeg-php

Syslint Technologies | 24x7 Server Management | Outsourced Support | Software Development - (0091) 471-3273-211

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

please help asap!!!

i've made edit on ffmpeg to download current version which is 0.6.1
all the installation was fine untill it came up with this error.

FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
  built on Mar 16 2011 09:03:45 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48)
  configuration: --prefix= --enable-shared --enable-nonfree --enable-gpl --enable-pthreads --enable-libopencore-amrnb --enable-decoder=liba52 --enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --extra-cflags=-I/usr/local/cpffmpeg/include/ --extra-ldflags=-L/usr/local/cpffmpeg/lib --enable-version3 --enable-swscale
  WARNING: library configuration mismatch
  libavutil   configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads
  libavcodec  configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads
  libavformat configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads
  libavdevice configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads
  libswscale  configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0.11. 0 /  0.11. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

how can i fix this?

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

bythe way i have 64bit centos 5

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

fixed the problem,
now the server cannot use mp4box?

typed whereis MP4Box and only the install file of ffmpeginstaller/mp4box.sh shows up.

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

try to run 
sh mp4box.sh

This will install mp4box for you

Syslint Technologies | 24x7 Server Management | Outsourced Support | Software Development - (0091) 471-3273-211

14 (edited by hansel 2011-03-18 22:48:48)

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

i did that and still no go, shoulnt't it show something like  "/usr/local/bin/mp4box" when i type whereis mp4box?

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

i might be stupid, but let say if i download a script like clipbuckket, do i point out the ffmpeg to default ffmpeg directory? or cpffmpeg/bin directory?

16 (edited by jakesully 2011-03-20 16:23:43)

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

clipbucket usually auto detects where ffmpeg, flvtool2, and mp4box is and then it adds thoes locations to settings smile

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

should we use same commands for latest version of ffmpeg script ?

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

bhanuprasad1981 wrote:

should we use same commands for latest version of ffmpeg script ?

No  in version 7.0 , it will be installed in ordinary  way . There won't me much customization .

Syslint Technologies | 24x7 Server Management | Outsourced Support | Software Development - (0091) 471-3273-211

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

so ffmpeg-php installed by default? also where can i find installation process ?

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

after running installer i ended up with error :-

such file or directory
Installation of mplayer.tar.gz ....... Completed


   Mplayer installation Failed sad , please visit the forum

please help

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

bhanuprasad1981 wrote:

after running installer i ended up with error :-

such file or directory
Installation of mplayer.tar.gz ....... Completed


   Mplayer installation Failed sad , please visit the forum

please help


i am having the same issue with mplayer installation being failed

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

I have a previously install version of ffmpeginstaller 7.0 ffmpeg-php Says installed with package.

How do i find if it was install or not? I did not receive any errors with the script.

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

Also how do i add ffmpeg xuggler codec or speex or any other codes?

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

ffmpeg-php won't comes with  version 7.0

Syslint Technologies | 24x7 Server Management | Outsourced Support | Software Development - (0091) 471-3273-211

Re: [Solved ]Install ffmpeg-php 0.6.1 along with ffmpeginstaller 6.3 +

Also how do i add ffmpeg xuggler codec or speex or any other codec?