Some of you, probably, will or want to create a video website like YouTube (YoutTube clone). To be able to do so you’re going to need ffmpeg, lame, libvorbis and other programs installed on your server. Today, I’ll explain how to install them easily.
There are two methods to do it, the dirty one and the easy (very easy) one. I’ll start with the dirty one:
How to manually install ffmpeg, lame, libogg, libvorbis…
This is exactly how I did it last year (how we did it
cos Fay helped me)
First of all, you have to login to your server using SSH as the owner account of your directory, and because I’m not a Linux user I used Putty (http://www.putty.org)
Create these directories, and set their correct permissions
$ mkdir bin lib tmp $ chmod 777 tmp $ chmod 775 bin lib
mkdir: creates the directory
chmod: sets the correct permissions for the directory
Export these variables
$ export TMPDIR=$HOME/tmp $ export PATH=$HOME/bin:$PATH $ export LD_LIBRARY_PATH=$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH $ export CPATH=$HOME/include:/usr/local/include:$CPATH $ export LIBRARY_PATH=$HOME/lib:/usr/local/lib:$LIBRARY_PATH $ mkdir src $ cd src
Autoconf
$ wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.63.tar.gz $ tar -zxf autoconf-2.63.tar.gz $ cd autoconf-2.63 $ ./configure --prefix=$HOME $ make && make install $ cd ..
LAME:
$ wget http://nchc.dl.sourceforge.net/sourceforge/lame/lame-398.tar.gz $ tar -zxvf lame-398.tar.gz $ cd lame-398 $ ./configure "--prefix=$HOME" "--enable-shared" $ make && make install $ cd..
Libogg
$ wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz $ tar -zxf libogg-1.1.3.tar.gz $ cd libogg-1.1.3 $ ./configure --prefix=$HOME $ make && make install $ cd ..
Libvorbis
$ wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.0.tar.gz $ tar -zxf libvorbis-1.2.0.tar.gz $ cd libvorbis-1.2.0 $ ./configure --prefix=$HOME $ make && make install $ cd ..
Mplayer:
$ wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2 $ bunzip2 essential-20061022.tar.bz2 $ tar -xf essential-20061022.tar $ mv essential-20061022 $HOME/lib $ wget http://www3.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc1.tar.bz2 $ bunzip2 MPlayer-1.0rc1.tar.bz2 $ tar -xf MPlayer-1.0rc1.tar $ cd MPlayer-1.0rc1 $ ./configure --prefix=$HOME --with-codecsdir=$HOME/lib/essential-20061022/ $ make && make install $ cd ..
Amr
$ wget http://ftp.penguin.cz/pub/users/utx/amr/amrnb-7.0.0.0.tar.bz2 $ wget http://ftp.penguin.cz/pub/users/utx/amr/amrwb-7.0.0.2.tar.bz2 $ gunzip amrnb-7.0.0.0.tar.bz2 $ gunzip amrwb-7.0.0.2.tar.bz2 $ tar xvf amrnb-7.0.0.0.tar $ tar xvf amrwb-7.0.0.2.tar $ cd amrnb-7.0.0.0 $ ./configure --prefix=$HOME $ make && make install $ cd .. $ cd amrwb-7.0.0.2 $ ./configure --prefix=$HOME $ make && make install $ cd ..
FFmpeg
$ svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg $ cd ffmpeg $ ./configure --prefix=$HOME --cross-compile --enable-shared --enable-libmp3lame --enable-libamr-nb --enable-libamr-wb --extra-cflags=-I$HOME/include --extra-ldflags=-L$HOME/lib $ make && make install $ cd..
Test :
Now you can test to convert for exemple an AVI file to flv.
Here is the command I use to generate FLVs:
$ /path/to/ffmpeg -i /path/to/inputfile.avi -acodec mp3 -ab 32 -ac 1 -ar 44100 /path/to/outputfile.flv
Exemple :
$ bin/ffmpeg -i www/videos/test.avi test.flv
Cooool, It works
But there’s still one problem; after restarting your server you’ll get this error while trying to do the test again
[fahdos]$ bin/ffmpeg -i www/test2.avi www/test2.flv bin/ffmpeg: error while loading shared libraries: libavformat.so.51: cannot open shared object file: No such file or directory
The solution is quite simple
Login with SSH again and tape:
$ vi .bash_profile i
Then past these lines:
export TMPDIR=$HOME/tmp export PATH=$HOME/bin:$PATH export LD_LIBRARY_PATH=$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH export CPATH=$HOME/include:/usr/local/include:$CPATH export LIBRARY_PATH=$HOME/lib:/usr/local/lib:$LIBRARY_PATH
Tape the Esc key then tape
:wq
Restart your server and test it again, now it will work
How to Automatically install ffmpeg, lame, libogg, libvorbis…
We will use The ffmpeginstall Script for the shared server:
This series of scripts will install all required modules for running video streaming application websites in a shared environment. A number of webhosts provides large amount of disk space and normal shell access to your Linux server. So now you can setup your own ffmpeg environment in a shared account.
To do so, just visit www.ffmpeg.sherin.in
It will install all you need with just few clicks. Documentation
NB: the website maybe down, so please download the file from :
Automatic Installation (11.8 KiB, 819 hits)
For instruction, open the INSTALL File.
Have Fun


























September 19th, 2008
at 00:33
so you call my help a “dirty” one :\
ok Dos, 3qel fiha, remind it next time when you will ask Fay another help
September 19th, 2008
at 08:25
lol :p
September 20th, 2008
at 00:42
Great walkthrough, got it working on my Dreamhost account no problems! Many thanks for taking the time to share this
Spotted a couple of typos in your guide - when installing AMR your guide mentions gunzip, rather than bunzip2. I also had to install the LibOGG libraries before the LibVorbis ones.
September 23rd, 2008
at 10:52
@Andrew Gatenby:
Sorry dude, it was just a mistake. ( i’m talking about Libogg and libvorbis )
thanks :p
October 13th, 2008
at 12:34
Скажите, где найти хозяина agafix.org.
С меня пыво)
———
Ответы на любые вопросы
October 13th, 2008
at 13:05
@Интересные факты
all of us are owners of agafix.org
December 9th, 2008
at 05:46
OK I AM having trouble installing this fucking script/software whatever the fuck you wanna call it.
To make things easier i decided to go with the AUTOMATIC installation. I got this .tar file and now i dont know what to do with it. there are no instructions on how to install it either.
can anyone please help me? Thanks =]
December 9th, 2008
at 06:06
djpazze@yahoo.com
Please i need help.
xtrigit@yahoo.com
djpazze@live.com
please!!!
March 8th, 2009
at 17:14
got though the whole thing until the FFMpeg config
changed to:
./configure –prefix=$HOME –enable-cross-compile –enable-shared –enable-nonfree –enable-libmp3lame –enable-libamr-nb –enable-libamr-wb –extra-cflags=-I$HOME/include –extra-ldflags=-L$HOME/lib
seems like it worked
Thanks!
March 18th, 2009
at 22:14
Thanks for this manual.
Although for the ffmpeg install (on Dreamhost) I had to use the following:
./configure –prefix=$HOME –enable-cross-compile –enable-nonfree –enable-shared –enable-libmp3lame –enable-libamr-nb –enable-libamr-wb –extra-cflags=-I$HOME/include –extra-ldflags=-L$HOME/lib
March 29th, 2009
at 12:38
HOME/libnb –enable-libamr-wb –extra-cflags=-I$HOME/include –extra-ldflags=-L$
libamr is nonfree and –enable-nonfree is not specified.
If you think configure made a mistake, make sure you are using the latest
version from SVN. If the latest version fails, report the problem to the
ffmpeg-user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file “config.err” produced by configure as this will help
solving the problem.
[thing]$
plss help
April 7th, 2009
at 03:01
hey guys, can you help with installation for shared hosting. i need instructions that link expired i guess
April 7th, 2009
at 08:22
@Max: Done
April 19th, 2009
at 15:57
Documentation link is not working… Any other suggestions besides google?
May 18th, 2009
at 02:58
hey.
Im not a noob, but I am a noob at server installs.
Anyone wana help me out here with a little bit better details on how to use the automatic install.
I unzipped it and got inside a folder and opened INSTALL. Now im lost
DO I download something else? whats the # tar -xyzf thing?
May 18th, 2009
at 07:41
Upload the compressed file to your server, and log in using SSH, then tape:
tar -xvzf sharedhostffmpeg.1.0.tar.gz
cd sharedhostffmpeg.1.0/
…….
May 27th, 2009
at 14:17
It worked so good, but now I’m a little confused about where to place the .bash_profile file.
Somebody knows?…thanks
May 27th, 2009
at 14:35
Just leave it where it is
June 9th, 2009
at 08:12
thanks for sharing dude
June 9th, 2009
at 20:46
Thanks ma8 the auto-installer is working great, at the install ending I come here to post the results…
June 10th, 2009
at 14:00
I’m having some problems with phpize on the ffmpeg-php, but It seems like it’s a problem from my php installation, I’m trying to fix, the rest worked.
June 11th, 2009
at 16:14
Have to do all by myself, the auto-installer didn’t work. It’s all broken…
August 12th, 2009
at 05:57
Looking at the changelog for ffmpeg, it appears libamr was removed from the build sometime december 07; therefore, to get this going, you have to use a older build by using: `svn checkout –revision 15624 svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg-15624` and then `./configure –prefix=$HOME –enable-cross-compile –enable-shared –enable-libmp3lame –enable-nonfree –enable-amr-nb –enable-amr-wb –extra-cflags=-I$HOME/include –extra-ldflags=-L$HOME/lib` should work fine..
August 13th, 2009
at 02:07
Thanks Mate, I didn’t noticed that libamr was out of the releases. But now Dreamhost just gave me full root access via SUDO command to my Private Server and it’s a lot easier now.
Seeya
August 13th, 2009
at 15:56
Ya no problem, I wish i knew ahead of time that Dreamhost could give me sudo access, but it is all well.. at least for now.
December 22nd, 2009
at 15:34
Hi
Automatic Installation is not avalaible.
Can you update the link ??
Thank you !
January 22nd, 2010
at 00:31
sorry for the delay
, you can now download the file.
April 11th, 2010
at 23:25
Latest site for downloads and information on automatic installation is here…
http://sourceforge.net/projects/shf/files/
June 21st, 2010
at 14:11
Hello Fahdos can you please help me install this ffmpeg in my server?
We can talk in skype my skype is labelnine, I try so hard but still nothing I can do to install ffmpeg in my server…. Please please help me!!!