Board index Linux Installation Stuffs

Moderator: chandranjoy

FFMpeg Installation Steps

Postby chandranjoy » Fri Apr 09, 2010 4:53 am

FFMPEG Installation: ... bx264-h264

Install libx264:

Code: Select all
tar -xvjf x264-snapshot-20100330-2245.tar.bz2
cd x264-snapshot-20100330-2245
./configure --enable-shared
make install

Install FFMPEG:

#svn checkout svn:// ffmpeg
#cd ffmpeg
#./configure --enable-libx264 -–enable-gpl -–enable-shared

Note: Before start to install ffmpeg with above mentioned libs/tools you must install them.

#make install


error while loading shared cannot open shared object file: No such file or directory

To fix this:
vi /etc/

Add the line :/usr/local/lib

And run ldconfig.

To check the ffmpeg

Convert commands:

video file to jpg:
ffmpeg -itsoffset -15 -i 'file_4bac6a2edd175.wmv' -vcodec mjpeg -vframes 1 -an -f rawvideo -s '320x240' '05.jpg'

video file to mp4:
ffmpeg -i 'video.flv' -acodec 'libmp3lame' -ab 128k -vcodec 'libx264' -vpre hq -crf 22 -threads 0 -f mp4 libx264_new.mp4

Install MP4Box Steps: ... 15281.html

wget ... 4.5.tar.gz
wget ... 4.5.tar.gz
tar -zxf gpac-0.4.5.tar.gz
tar -zxf gpac_extra_libs-0.4.5.tar.gz
cd gpac_extra_libs
cp -r * ../gpac/extra_lib
cd ../gpac
chmod +x configure
./configure --disable-opengl --use-js=no --use-ft=no --use-jpeg=no --use-png=no --use-faad=no --use-mad=no --use-xvid=no --use-ffmpeg=no --use-ogg=no --use-vorbis=no --use-theora=no --use-openjpeg=no
make lib
make apps
make install-lib
make install
cp ./bin/gcc/ /usr/lib/

Convert command:
MP4Box -inter 0.2 -add /var/www/vhosts/ /var/www/vhosts/

[root@238359-web1 new_test]# /usr/local/bin/MP4Box -inter 0.2 -add /var/www/vhosts/ /var/www/vhosts/
IsoMedia import - track ID 1 - Video (size 896 x 496)
IsoMedia import - track ID 2 - Audio (SR 44100 - 2 channels)
Saving to /var/www/vhosts/ 0.000 secs Interleaving

FFmpeg, FFmpeg-PHP, Lame, Libogg, Libvorbis, FLVtool2, Mplayer, Mencoder, AMR Manual Installation:


The following HOWTO will show you exactly how to install the following packages on a Debian Etch or Ubuntu 7.06 system:

* FFmpeg
* FFmpeg-PHP
* Mplayer + Mencoder
* flv2tool
* LAME MP3 Encoder
* AMR (for 3gp file conversions)
* Libogg
* Libvorbis

Do some prep-work

yum update
yum upgrade
yum install libjpeg-progs libjpeg62 libjpeg62-dev libsdl1.2-dev php5-dev build-essential unzip

Download all the files needed

cd /usr/local/src
wget ... rc3.tar.gz
wget ... -1.0.6.tgz
wget ... z/download
wget ... 2/download
Or Try with SVN checkout: svn co ... ffmpeg-php ffmpeg-php
wget ... 2.2.tar.gz
wget ... 3.2.tar.gz
wget ... .1.tar.bz2
Libxspf: ... 2.0.tar.gz
wget ... .2.tar.bz2
wget ... .3.tar.bz2
wget ... 2.2.tar.gz

Extract all the files

tar zxvf MPlayer-1.0rc3.tar.gz
tar zxvf flvtool2-1.0.6.tgz
tar zxvf lame-3.98.4.tar.gz
tar xjvf ffmpeg-php-0.6.0.tbz2
tar jxvf essential-20071007.tar.bz2
tar jxvf libogg-1.2.2.tar.gz
bzip2 -cd amrnb- | tar xvf -
bzip2 -cd amrwb- | tar xvf -
tar xvzf libtheora-1.1.1.tar.bz2
tar xvzf xvidcore-1.2.2.tar.gz
tar xvzf faad2-2.7.tar.gz
tar xvzf faac-1.28.tar.gz

We need a codec directory

mkdir /usr/local/lib/codecs/

Install Ruby on Rails, subversion & ncurses

yum install subversion ruby libcurses-ruby

Run some SVN queries

svn checkout svn:// ffmpeg
svn checkout svn:// mplayer
cd /usr/local/src/mplayer
svn update

Copy Codecs for mplayer
mkdir /usr/local/lib/codecs
mv /usr/local/src/essential-20071007/* /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/

We also need to secure the tmp directory
mkdir /usr/local/src/tmp
chmod 777 /usr/local/src/tmp
export TMPDIR=/usr/local/src/tmp

Install lame

cd /usr/local/src/lame-3.97
make && make install

Install libogg

cd /usr/local/src/libogg-1.1.3
./configure && make && make install

Install libvorbis

cd /usr/local/src/libvorbis-1.2.0
./configure && make && make install

Install flvtool2
cd /usr/local/src/flvtool2-1.0.6/
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install

Install mplayer & mencoder

cd /usr/local/src/mplayer
./configure --enable-jpeg
make && make install

Install AMR (for 3gp conversion)

cd /usr/local/src/amrnb-
make && make install

cd /usr/local/src/amrwb-
make && make install

Install libtheora (for ogg video encoding)

cd /usr/local/src/libtheora-1.0beta3
make && make install

Install ffmpeg

For Centos, Redhat, Fedora Users please use this.
./configure --enable-shared --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab --enable-libvorbis --enable-libvpx

Debian Etch and Ubuntu 8.04 users please use the following configure command:
cd /usr/local/src/ffmpeg/
./configure --enable-libmp3lame --enable-libvorbis --disable-mmx --enable-shared --enable-libamr-nb --enable-libamr-wb --enable-nonfree --enable-libtheora

Ubuntu 7.06 users please use the following configure command:
./configure --enable-libmp3lame --enable-libogg --enable-libvorbis --disable-mmx --enable-shared --enable-libamr-nb --enable-libtheora

Now run these commands:

make install
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/
ln -s /usr/local/lib/ /usr/lib/
ln -s /usr/local/lib/ /usr/lib/
ln -s /usr/local/lib/ /usr/lib/

Install ffmpeg-php

cd /usr/local/src/ffmpeg-php-0.5.0/
make install

You now need to add the new ffmpeg-php module to the php.ini file

vi /etc/php5/apache2/php.ini (add this line to the end of the file)

Restart the Apache

/etc/init.d/apache2 force-reload

/etc/init.d/httpd restart

FFMPEG-MPlayer-Mencoder-Flvtool2-Lame-MP4Box Installation through script:

cd /usr/local/src
wget ... 6.2.tar.gz
tar -xvzf ffmpeginstaller.6.2.tar.gz
cd ffmpeginstaller.6.2
chmod 755

Then start the automated installation.

This script will install the following packages in your server.
* ffmpeg
* Mplayer
* A52decoder
* Amrnb and Amrwb
* All codecs
* facc and faad2
* Ruby
* flvtool2
* ffmpeg-php
* Mplayer and Mencoder
* Lame
* Libogg
* Libvorbis
* Libtheora
* Libwmf
* opencoreamr
* vorbistools
* X264
* MP4Box
* Xvidcore

Restart httpd(apache) service.
/etc/init.d/httpd restart

Done. Cheers :)
Site Admin
Posts: 283
Joined: Fri Oct 23, 2009 11:19 pm

Return to Installation Stuffs

Who is online

Users browsing this forum: No registered users and 2 guests