 |
Your forum announcement here! |
|
 |

16-05-2008, 00:59
|
 |
System Administrator(eUKhost.com)
|
|
Join Date: Mar 2007
Location: Planet Earth
Posts: 160
|
|
How To Install FFmpeg + FFmpeg-PHP + Mplayer + Mencoder + flv2tool + LAME MP3 Encoder
Hello,
Following are the steps to install FFmpeg + FFmpeg-PHP + Mplayer + Mencoder + flv2tool + LAME MP3 Encoder + Libog on a Linux server or VPS Hosting Manually. There are many automated scripts available which install these but its better to do it manually as in case of an error occuring during the installation process, we can stop the installation and fix them. These steps also include the common fixes for such errors.
Quote:
cd /usr/local/src/
DOWNLOAD MODULES
wget http://www.mplayerhq.hu/MPlayer/rele...061022.tar.bz2
wget rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz
wget easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
wget superb-west.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.1.tbz2
wget downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
wget downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz
EXTRACT MODULES
tar zxvf lame-3.97.tar.gz
tar zxvf libogg-1.1.3.tar.gz
tar zxvf libvorbis-1.1.2.tar.gz
tar zxvf flvtool2_1.0.5_rc6.tgz
tar jxvf essential-20061022.tar.bz2
tar jxvf ffmpeg-php-0.5.1.tbz2
mkdir /usr/local/lib/codecs/
yum install gcc gmake make libcpp libgcc libstdc++ gcc4 gcc4-c++ gcc4-gfortran subversion ruby ncurses-devel -y
DOWNLOAD FFMPEG and MPLAYER
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
cd /usr/local/src/mplayer
svn update
cd /usr/local/src/
mv /usr/local/src/essential-20061022/* /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/
LAME:
cd /usr/local/src/lame-3.97
./configure
make && make install
LIBOGG
cd /usr/local/src/
cd /usr/local/src/libogg-1.1.3
./configure --enable-shared && make && make install
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH
LIBVORBIS
cd /usr/local/src/
cd /usr/local/src/libvorbis-1.1.2
./configure && make && make install
FLVTOOL2
cd /usr/local/src/
cd /usr/local/src/flvtool2_1.0.5_rc6/
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install
MPLAYER
cd /usr/local/src/
cd /usr/local/src/mplayer
./configure && make && make install
cd /usr/local/src/
FFMPEG:
cd /usr/local/src/ffmpeg/
./configure --enable-libmp3lame --enable-libvorbis --disable-mmx --enable-shared
make
make install
export LD_LIBRARY_PATH=/usr/local/lib/
ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50
ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51
ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49
ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0
ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51
FFMPEG-PHP:
cd /usr/local/src/
cd /usr/local/src/ffmpeg-php-0.5.1/
phpize
./configure
make
make install
NOTICE: Make sure this is the correct php.ini for the box!!
echo 'extension=ffmpeg.so' >> /usr/local/Zend/etc/php.ini
NOTICE: Make sure this is the correct php.ini for the box!!
RESTART APACHE
service httpd restart
|
That's all
Last edited by eUK-Victor; 12-01-2012 at 21:42.
Reason: spelling mistake
|

16-05-2008, 05:55
|
 |
Technical Support (eUKhost.com)
|
|
Join Date: Oct 2006
Location: localhost
Posts: 3,356
|
|
Hey Mikey... Nice one  Keep it up..
|

26-07-2008, 17:29
|
 |
System Administrator(eUKhost.com)
|
|
Join Date: Mar 2007
Location: Planet Earth
Posts: 160
|
|
Hello,
While installing FFMPEG-PHP sometime it gives following error:
Quote:
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:
Quote:
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
|
|

03-10-2008, 13:09
|
|
new member
|
|
Join Date: Oct 2008
Posts: 3
|
|
MPLAYER
cd /usr/local/src/
cd /usr/local/src/mplayer
./configure && make && make install
I am getting error after running above command..
error is :
libmpdemux/demux_lavf.c:97: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mp_seek'
libmpdemux/demux_lavf.c: In function 'lavf_check_preferred_file':
libmpdemux/demux_lavf.c:190: warning: initialization from incompatible pointer type
libmpdemux/demux_lavf.c: In function 'demux_open_lavf':
libmpdemux/demux_lavf.c:464: error: 'mp_seek' undeclared (first use in this function)
libmpdemux/demux_lavf.c:464: error: (Each undeclared identifier is reported only once
libmpdemux/demux_lavf.c:464: error: for each function it appears in.)
make: *** [libmpdemux/demux_lavf.o] Error 1
cd /usr/local/src/
|

03-10-2008, 20:54
|
 |
Technical Support (eUKhost.com)
|
|
Join Date: Oct 2006
Location: localhost
Posts: 3,356
|
|
It appears like that the installer you downloaded is incorrect/corrupt, can you re-download a fresh copy of the packages & try reinstalling them ?
|

24-11-2008, 13:58
|
 |
System Administrator(eUKhost.com)
|
|
Join Date: Mar 2007
Location: Planet Earth
Posts: 160
|
|
While installing FFMPEG on a server when we run “make” after “./configure” it gives following error:
Quote:
math-errno -c -o libavdevice/v4l.o libavdevice/v4l.c
In file included from libavdevice/v4l.c:32:
/usr/include/linux/videodev.h:56: error: syntax error before "ulong"
/usr/include/linux/videodev.h:72: error: syntax error before '}' token
libavdevice/v4l.c: In function `grab_read_header':
libavdevice/v4l.c:77: error: storage size of 'tuner' isn't known
libavdevice/v4l.c:141: error: invalid application of `sizeof' to incomplete type `video_tuner'
libavdevice/v4l.c:148: error: invalid application of `sizeof' to incomplete type `video_tuner'
libavdevice/v4l.c:77: warning: unused variable `tuner'
make: *** [libavdevice/v4l.o] Error 1
|
SOLUTION:
This problem can be fixed by disabling v41 and v42 for FFMPEG. This can be done when we run “./configure” for FFMPEG
Quote:
|
./configure --enable-libmp3lame --enable-libvorbis --disable-mmx --enable-shared --disable-demuxer=v4l --disable-demuxer=v4l2
|
Once this has been completed run “make” and “make install” to install FFMPEG.
|

09-12-2008, 19:34
|
|
new member
|
|
Join Date: Dec 2008
Location: San Jose, CA
Posts: 1
|
|
I found a real simple fix to a common issue, and this issue comes when your trying to ./configure ffmpeg, the issue is with the /tmp directory. You can easily make a new tmp dir, just do the following:
1. cd /usr/local/src
2. mkdir tmp
3. chmod 777 tmp
4. export TMPDIR=/usr/local/src/tmp
5. cd /usr/local/src/ffmpeg/
6. ./configure --enable-libmp3lame --enable-libvorbis --disable-mmx --enable-shared && make && make install
That fixed the painful process of trying to find why my /tmp directory wasn't letting me install FFMPEG
|

13-12-2008, 10:10
|
|
new member
|
|
Join Date: Dec 2008
Posts: 2
|
|
Im getting a few erros when trying to install FFMPEG-PHP:
/usr/local/src/ffmpeg-php-0.5.1$ make
/bin/sh /usr/local/src/ffmpeg-php-0.5.1/libtool --mode=compile gcc -I. -I/usr/local/src/ffmpeg-php-0.5.1 -DPHP_ATOM_INC -I/usr/local/src/ffmpeg-php-0.5.1/include -I/usr/local/src/ffmpeg-php-0.5.1/main -I/usr/local/src/ffmpeg-php-0.5.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/include/ffmpeg -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c -o ffmpeg_frame.lo
gcc -I. -I/usr/local/src/ffmpeg-php-0.5.1 -DPHP_ATOM_INC -I/usr/local/src/ffmpeg-php-0.5.1/include -I/usr/local/src/ffmpeg-php-0.5.1/main -I/usr/local/src/ffmpeg-php-0.5.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/include/ffmpeg -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c -fPIC -DPIC -o .libs/ffmpeg_frame.o
/usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c: In function `_php_convert_frame':
/usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c:197: warning: implicit declaration of function `img_convert'
/usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c: In function `_php_crop_frame':
/usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c:250: warning: implicit declaration of function `img_copy'
/usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c: In function `_php_resample_frame':
/usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c:272: error: `ImgReSampleContext' undeclared (first use in this function)
/usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c:272: error: (Each undeclared identifier is reported only once
/usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c:272: error: for each function it appears in.)
/usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c:272: error: `img_resample_ctx' undeclared (first use in this function)
/usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c:298: warning: implicit declaration of function `img_resample_full_init'
/usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c:311: warning: implicit declaration of function `img_resample'
/usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c:316: warning: implicit declaration of function `img_resample_close'
make: *** [ffmpeg_frame.lo] Error 1
|

13-12-2008, 16:54
|
 |
System Administrator(eUKhost.com)
|
|
Join Date: Mar 2007
Location: Planet Earth
Posts: 160
|
|
Hello,
The problem seems to be with the FFMPEG-PHP version (0.5.1) which you are trying to install. Please try to install the latest version of FFMPEG-PHP i.e. 0.6.0 which can be downloaded from: SourceForge.net: Files
Please let us know if this fix the issue.
|

13-12-2008, 20:49
|
|
new member
|
|
Join Date: Dec 2008
Posts: 2
|
|
Ya that worked great thanks
|

14-01-2009, 14:51
|
|
new member
|
|
Join Date: Jan 2009
Posts: 1
|
|
so close, still getting ffmpeg-php.lo error 1
tried version of ffmpeg-php 5.1, 5.0, 6.0 5.3.1 no luck
any idea why?
great solution, just a hair thin away from getting it all done
|

12-02-2009, 09:29
|
|
Junior Member
|
|
Join Date: Feb 2009
Posts: 10
|
|
FLVTOOL2
cd /usr/local/src/ .................................................. ....OK
cd /usr/local/src/flvtool2_1.0.5_rc6/...........................OK
ruby setup.rb config..........................................-bash: ruby: command not found
I think it is a simple problem but i dont have any idea why this command doesnt work. All the other steps was allright
I need help about this command
TNX
|

12-02-2009, 10:42
|
 |
Technical Support (eUKhost.com)
|
|
Join Date: Oct 2006
Location: localhost
Posts: 3,356
|
|
Quote:
Originally Posted by doncamillo
FLVTOOL2
cd /usr/local/src/ .................................................. ....OK
cd /usr/local/src/flvtool2_1.0.5_rc6/...........................OK
ruby setup.rb config..........................................-bash: ruby: command not found
I think it is a simple problem but i dont have any idea why this command doesnt work. All the other steps was allright
I need help about this command
TNX
|
Hi,
You need to install Ruby first if you're running the ruby command. Try running " yum install ruby" from the SSH, it'd be sorted out
|

12-02-2009, 11:18
|
|
Junior Member
|
|
Join Date: Feb 2009
Posts: 10
|
|
Quote:
Originally Posted by eUK-Scott
Hi,
Please try installing ffmpeg using auto-installer. It will install most of the dependencies automatically. You can download installer from URL ttp://nchc.dl.sourceforge.net/sourceforge/ffmpeginstall/ffmpeginstall.3.1.tar.gz
------------------------------------------
wget nchc.dl.sourceforge..........e/ffmpeginstall/ffmpeginstall.3.1.ta
tar -xvzf ffmpeginstall.3.1.tar.gz
cd ffmpeginstall.3.1
./install.sh
------------------------------------------
|
I had the same problem and did evrything that you told in the above.
Now i wonder is this for only FFMPEG install or both FFMPEG and FFMPEG-PHP.
Shortly i wonder should i continue the FFMPEG_PHP step of the first post. Or it is done now?
What should i do now?
|

12-02-2009, 14:58
|
|
Junior Member
|
|
Join Date: Feb 2009
Posts: 10
|
|
Quote:
Originally Posted by Rock
Hi,
You need to install Ruby first if you're running the ruby command. Try running " yum install ruby" from the SSH, it'd be sorted out 
|
When i try to install it gaves me repomd.xml error
Code:
yum install ruby
Loading "rhnplugin" plugin
Loading "security" plugin
rhel-i386-server-5 100% |=========================| 1.2 kB 00:00
http://apt.sw.be/redhat/el5Server/en/i386/dag/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: dag. Please verify its path and try again
Then i try for by passing "--disablerepo=dag" to yum's command line invocation
Code:
yum --disablerepo=dag install ruby
Loading "rhnplugin" plugin
Loading "security" plugin
rhel-i386-server-5 100% |=========================| 1.2 kB 00:00
Excluding Packages in global exclude list
Finished
Setting up Install Process
Parsing package install arguments
No package ruby available.
Nothing to do
so still the RUBY command not working for me. What can i do?
|

13-02-2009, 02:42
|
 |
Technical Support (eUKhost.com)
|
|
Join Date: Oct 2006
Location: localhost
Posts: 3,356
|
|
Hello DonCamillo,
From the errors generated, I think that you're installing FFMPEG & other supported applications on an RHEL5 machine. I find that the mirrors mentioned in your repositories [/etc/yum.repos.d/*] aren't proper.. For instance the path of the repo metadata is incorrect & the files aren't fetched properly:
Quote:
|
http://apt.sw.be/redhat/el5server/en/i386/dag/repodata/repomd.xml
|
It should be:
Quote:
|
http://apt.sw.be/redhat/el5/en/i386/dag/repodata/repomd.xml
|
Additionally I'd even recommend to update your system via Red Hat Network (RHN) if it's registered online.. or try installing apt-get & run "apt-get install ruby" if you are comfortable with the apt-get commands..
Also, try running "up2date -i ruby" as it's another good feature for installing apps on RHEL boxes.. 
There are various other sources for installing Ruby, a precompiled Ruby RPM that was tested on RHEL, one place you can get it is the RPM repo
of RubyWorks Production Stack: http://rubyworks.rubyforge.org/redhat/5/RPMS/i386/
If you provide me the login details of your server, I'd be able to further troubleshoot the problem & get the required applications installed... 
|

13-02-2009, 09:51
|
|
Junior Member
|
|
Join Date: Feb 2009
Posts: 10
|
|
I found the way to install ruby in another forum with 2 simple command amd it worked.
/scripts/installruby
/usr/local/cpanel/bin/ror_setup.
Tnx for help
|

14-02-2009, 02:42
|
 |
Technical Support (eUKhost.com)
|
|
Join Date: Oct 2006
Location: localhost
Posts: 3,356
|
|
Quote:
Originally Posted by doncamillo
I found the way to install ruby in another forum with 2 simple command amd it worked.
/scripts/installruby
/usr/local/cpanel/bin/ror_setup.
Tnx for help
|
You're  DonCamillo.. Ahhh I didn't have a slightest idea whether you had cPanel installed on your server..else things would have been much faster..
|

15-04-2009, 15:55
|
 |
Premium Member
|
|
Join Date: Mar 2007
Location: 127.0.0.1
Posts: 1,652
|
|
Will this work fine on a L-VPS-03 server?
I've also been reading on using this with PHP and it needs to made use of exec(), so it would it be okay to enable exec() on my server?
__________________
Josh
Resident Blogger
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT. The time now is 04:00.
|
|
|