A few month ago when I try to install and configure a few cms(phpmotion,etc) that require to convert audio/video into flv/other type, there’s a lot of problem when we want to compile and enable audio/video file into flv file, but you can try these steps, so it should be relatively easy to follow

The following Guide will show you exactly how to install the following packages on a RedHat/CenOS/Cpanel Base system:


INSTALL_SDIR='/usr/src/ffmpegscript'

# Set temp dir
rm -rf $HOME/ffmpeg-temp
mkdir -p $HOME/ffmpeg-temp
chmod 4777 $HOME/ffmpeg-temp
export TMPDIR=$HOME/ffmpeg-temp

# Install DIR
echo -e "Creating installation dir... "
rm -rf $INSTALL_SDIR
mkdir -p $INSTALL_SDIR
echo -e "dir setup...completed"

# Ruby
sleep 5
echo -e "Installing RUBY... "
cd $INSTALL_SDIR
wget http://openstorage.gunadarma.ac.id/linux/apps/ffmpeg//ruby-1.8.6-p110.tar.gz
gunzip ruby-1.8.6-p110.tar.gz
tar -xvf ruby-1.8.6-p110.tar
cd ruby-1.8.6-p110
./configure
make
make install
echo -e "RUBY...completed"

# FlvTool2
sleep 5
echo -e "Installing FLVTOOL... "
cd $INSTALL_SDIR
wget http://openstorage.gunadarma.ac.id/linux/apps/ffmpeg//flvtool2_1.0.5_rc6.tgz
tar -zxvf flvtool2_1.0.5_rc6.tgz
cd flvtool2_1.0.5_rc6/
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install
echo -e "FLVTOOL...completed"

# LAME
sleep 5
echo -e "Installing LAME... "
cd $INSTALL_SDIR
wget http://openstorage.gunadarma.ac.id/linux/apps/ffmpeg//lame-3.97.tar.gz
tar -zxvf lame-3.97.tar.gz
cd lame-3.97
./configure --prefix=/usr
make
make install
echo -e "LAME...completed"

# CODECS
sleep 5
echo -e "Installing CODECS... "
cd $INSTALL_SDIR
wget http://openstorage.gunadarma.ac.id/linux/apps/ffmpeg//essential-20061022.tar.bz2
tar -xvjf essential-20061022.tar.bz2
chown -R root:root essential-20061022
mkdir -pv /usr/local/lib/codecs/
cp -vrf essential-20061022/* /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/
echo -e "CODECS...completed"

# LIBOGG
sleep 5
echo -e "Installing LIBOGG... "
cd $INSTALL_SDIR
wget http://openstorage.gunadarma.ac.id/linux/apps/ffmpeg//libogg-1.1.3.tar.gz
tar -xvzf libogg-1.1.3.tar.gz
cd libogg-1.1.3/
./configure --prefix=/usr
make
make install
echo -e "LIBOGG...completed"

# LIBOVIS
sleep 5
echo -e "Installing LIBOVIS... "
cd $INSTALL_SDIR
wget http://openstorage.gunadarma.ac.id/linux/apps/ffmpeg//libvorbis-1.1.2.tar.gz
tar -xvzf libvorbis-1.1.2.tar.gz
cd libvorbis-1.1.2
./configure --prefix=/usr
make
make install
echo -e "LIBOVIS...completed"

# MPLAYER / MENCODER
sleep 5
echo -e "Installing MENCODER... "
cd $INSTALL_SDIR
wget http://openstorage.gunadarma.ac.id/linux/apps/ffmpeg//MPlayer-1.0rc1.tar.bz2
tar -jvxf MPlayer-1.0rc1.tar.bz2
cd MPlayer-1.0rc1/
./configure --prefix=/usr --with-codecsdir=/usr/local/lib/codecs
make
make install
echo -e "MENCODER...completed"

# FFMPEG
sleep 5
echo -e "Installing MENCODER... "
cd $INSTALL_SDIR
wget http://openstorage.gunadarma.ac.id/linux/apps/ffmpeg//ffmpeg_source.tgz
gunzip ffmpeg_source.tgz
tar -xvf ffmpeg_source.tar
cd ffmpeg
./configure --prefix=/usr --enable-libmp3lame --enable-libogg --enable-libvorbis --disable-mmx --enable-shared
make
make install

# Clean up
rm -rf $INSTALL_SDIR
rm -rf $HOME/phpmptiontemp
echo -e "MENCODER...completed"
reset

sleep 5
echo "----------------------------------------------------------------------------------------"
echo "                          INSTALLATION COMPLETE                                         "
which mencoder
which ffmpeg
which flvtool2
echo "                                                                                        "
echo "                                                                                        "
echo "                     YOU CAN NOW TEST THE INSTALLATION                                  "
echo "                                                                                        "
echo "                                                                                        "
echo " TEST FILE: wget http://openstorage.gunadarma.ac.id/linux/apps/ffmpeg/lions.mpg         "
echo "                                                                                        "
echo " MENCODER: lions.mpg  -o lions.flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts "
echo "vcodec=flv:vbitrate=800:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -lavfopts "
echo "i_certify_that_my_video_stream_does_not_use_b_frames -vf scale=450:400 -srate 22050"
echo "                                                                                        "
echo " FFMPEG: -i lions.flv -ss 1 -t 00:00:01 -s 120x90 -r 1 -f mjpeg lions.jpg"
echo "----------------------------------------------------------------------------------------"
sleep 3

If you're successfull installing all, please report back here :) ok !