Go Back   Web Server Hosting Forum by BODHost > Support > Tutorials and Documentation
 

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 10-25-08, 03:39
BOD Member
 
Join Date: Oct 2008
Posts: 2
Default How to Install FFMPEG?

Hello,

How To Install FFmpeg + FFmpeg-PHP + Mplayer + Mencoder + flv2tool + LAME MP3 Encoder? There are few automated scripts out there that install FFMPEG for you but you may find difficult to track a problem if something goes wrong. The better way is to install everything manually so that we can keep track of errors and resolve it before proceeding with the further installation:


Quote:
Change directory to ’src’ where we are going to download all the modules:
cd /usr/local/src/

# Download all the below modules:
wget http://www3.mplayerhq.hu/MPlayer/rel...061022.tar.bz2
wget http://rubyforge.org/frs/download.ph..._1.0.5_rc6.tgz
wget http://easynews.dl.sourceforge.net/s...me-3.97.tar.gz
wget http://superb-west.dl.sourceforge.ne...php-0.5.1.tbz2
wget http://downloads.xiph.org/releases/o...g-1.1.3.tar.gz
wget http://downloads.xiph.org/releases/v...s-1.1.2.tar.gz


# Extract the Modules:
tar zxvf flvtool2_1.0.5_rc6.tgz
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/


# Configure LAME:
cd /usr/local/src//lame-3.97
./configure
make && make install


# Configure 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


# Configure LIBVORBIS:
cd /usr/local/src//libvorbis-1.1.2
./configure && make && make install


# Configure flvtool:
cd /usr/local/src//flvtool2_1.0.5_rc6/
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install


# Configure MPLAYER:
cd /usr/local/src/mplayer
./configure && make && make install


# Configure FFMPEG:
cd /usr/local/src//ffmpeg/
./configure –enable-libmp3lame –enable-libvorbis –disable-mmx –enable-shared
######### IGNORE THIS ECHO LINE The dev’s fixed the issue in svn. Im only
leaveing it here in case it comes up again ###############
echo ‘#define HAVE_LRINTF 1 ‘>>config.h
################################################## ##########################
################################################## #######
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


# Configure FFMPEG-PHP:
cd /usr/local/src/ffmpeg-php-0.5.1/
phpize
./configure
make
make install

Now, you need to add the ffmpeg extension in your php.ini file. Locate the php.ini file and use the below commend to insert it:

echo ‘extension=/usr/local/lib/php/extensions/no-debug-non-zts-20020429/ffmpeg.so’ >> /path/to/php.ini

Make sure to restart apache once you insert the extension:
service httpd restart

At the end, during FFMPEG-PHP configuration you may face problem with /tmp been mounted as noexec (if your /tmp is mounted as noexec), in this case unmount /tmp temporarily and proceed with the installation.

Regards,
Jason.
Reply With Quote
  #2 (permalink)  
Old 06-13-09, 13:35
Rocky's Avatar
Administrator
 
Join Date: Nov 2007
Posts: 121
Default

That's a wonderful tutorial Jason

There are ready made scripts available now to install all the modules at one go, check this :
Quote:
wget ovh.dl.sourceforge.net/sourceforge/ffmpeginstall/ffmpeginstall.3.2.1.tar.gz
tar xzf ffmpeginstall.3.2.1.tar.gz
cd ffmpeginstall.3.2.1
./install
You'd be saving a lot of time through this..
__________________
Regards,
Rocky
Reply With Quote
  #3 (permalink)  
Old 06-14-09, 02:14
BOD Member
 
Join Date: Jun 2009
Posts: 46
Default

Rocky, does the script you mentioned install all of them (ie. flvtool2, LAME, mplayer, etc.)? Or is it just the FFmpeg script? Are there any issues with dependencies, etc., if you use that script, or does it just work out of the box?
Reply With Quote
  #4 (permalink)  
Old 06-14-09, 04:56
BOD Member
 
Join Date: Oct 2008
Posts: 2
Default

Hi Vertigo,

The script installs everything (ie. flvtool2, LAME, mplayer, etc.)for you on the server and you don't have to worry about the dependencies at all. Now a days, we use the same script to install FFMEPG on servers and if for some reason it doesn't work, we install it in the traditional way i.e. manual installation.

Regards,
Jason.
Reply With Quote
  #5 (permalink)  
Old 06-14-09, 09:06
Rocky's Avatar
Administrator
 
Join Date: Nov 2007
Posts: 121
Smile

Quote:
Originally Posted by Vertigo View Post
Rocky, does the script you mentioned install all of them (ie. flvtool2, LAME, mplayer, etc.)? Or is it just the FFmpeg script? Are there any issues with dependencies, etc., if you use that script, or does it just work out of the box?
Here's what I got when I installed that application:
Quote:
root@rocky [~]# ffmpeg
FFmpeg version SVN-r14473, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads --enable-liba52 --enable-libamr-nb --enable-libamr-wb --enable-libfaac --enable-libfaad --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-cross-compile
libavutil version: 49.7.0
libavcodec version: 51.62.0
libavformat version: 52.18.0
libavdevice version: 52.0.0
built on Jun 13 2009 14:57:56, gcc: 4.1.2 20080704 (Red Hat 4.1.2-44)
Quote:
root@rocky [~]# flvtool2
FLVTool2 1.0.5 RC6
Quote:
root@rocky [~]# mplayer
MPlayer 1.0rc1-4.1.2 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz (Family: 6, Model: 23, Stepping: 10)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
98 audio & 216 video codecs
Usage: mplayer [options] [url|path/]filename
+ these following applications are installed as well

Quote:
a52dec
amrnb-decoder
amrnb-decoder-etsi
amrnb-decoder-if2
amrnb-encoder
amrnb-encoder-etsi
amrnb-encoder-etsi-vad2
amrnb-encoder-if2
amrnb-encoder-if2-vad2
amrnb-encoder-vad2
amrwb-decoder
amrwb-decoder-if2
amrwb-encoder
amrwb-encoder-if2
erb
extract_a52
faac
faad
ffmpeg
ffserver
flvtool2
irb
lame
libwmf-config
libwmf-fontmap
mencoder
mp3rtp
mplayer
oggdec
oggenc
ogginfo
qt-faststart
rdoc
re2c
ri
ruby
testrb
vorbiscomment
wmf2eps
wmf2fig
wmf2gd
wmf2svg
wmf2x
x264
yasm
__________________
Regards,
Rocky
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT -6. The time now is 09:47.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright © 1999-2010, BODHost Ltd. All rights reserved.