How to setup an encoding/streaming server

October 10, 2008

Notice: **Do not apply those commands without thinking! **There are many ways to Rome, therefore many ways to get ffmpeg + codecs to be setup correctly! This is one way I came up with, that just works!

Depending on library updates etc.. few things might need to be altered, especially newer librairies and dependencies…

**Pre-requites: **Some gcc and C compiling concept knowledge

Configure the system

A couple of software/tools are required

Install subversion ruby libogg libvorbis libvorbis-devel gcc gcc-c++ make

Now download the needed packages

essential codecs from (use whatever codes you might feel like getting or need) Mplayer (use version revision 1 that is proven to work straight with this setup or venture for revision 2) from FLVtool from LAME from

Now untar the packages either using tar -zxf for tar.gz files or tar -jxf for .tar.bz2 (depending on the file compressed extension you downloaded)

— After all packages have been uncompressed, proceed to installation

mkdir /usr/local/lib/codecs

mv essential-VERSION/* /usr/local/lib/codecs (keep in mind, the codecs are up to you)

chmod -Rf 755 /usr/local/lib/codecs/

now get ffmpeg and mplayer from svn

svn checkout svn:// ffmpeg

svn checkout svn:// mplayer

proceed to install lame

cd lame-VERSION

./configure && make && make install

proceed now to install flvtool

cd flvtool-VERSION

ruby setup.rb config

ruby setup.rb setup

ruby setup.rb install

we now to build a set of symlinks (VERY IMPORTANT)

ln -s /usr/local/lib/ /usr/lib/

ln -s /usr/local/lib/ /usr/lib/

ln -s /usr/local/lib/ /usr/lib/

ln -s /usr/local/lib/ /usr/lib/

ln -s /usr/local/lib/ /usr/lib/

now let’s install Mplayer

export LD_LIBRARY_PATH=/usr/local/lib

cd Mplayer-VERSION


cat configure.log |grep lame (make sure libmp3lame was loaded)

make && make install

and finally FFMPEG (depending on the modules you need, here we only decide to have lame and vorbis)

cd ffmpeg-VERSION

./configure –enable-libmp3lame –enable-libvorbis –disable-mmx

make && make install

echo “/usr/local/lib” >> /etc/

echo “/usr/lib” >> /etc/


and voila :-) - good luck!