You'll be needing the following to be properly installed in your system. Kindly note that I am working under the ~/RPMS directory.
* Install the AMR codecs
#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
#bunzip2 amrnb-7.0.0.0.tar.bz2
#bunzip2 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 && make && make install
#cd ../amrwb-7.0.0.2
#./configure && make && make install
#cd .. # go back to the ~/RPMS directory
* Download faad2 and faac from http://faac.sourceforge.net/oldsite/download.php get Faad2 and faac (new versions)
#wget http://prdownloads.sourceforge.net/f...ar.gz?download
#wget http://prdownloads.sourceforge.net/f...ar.gz?download tar -zxvf faac-1.24.tar.gz && cd faac
#cd faac && sh bootstrap
#./configure && make && make install
#cd .. # go back to the ~/RPMS directory
* Installing Faad2
#tar zxvf faad2-2.0.tar.gz
#cd faad2 && less README.linux
There are 2 bugs in this package, so you need to manually edit these files
#nano Makefile.am
Edit the file to look like this
SUBDIRS = libfaad common frontend plugins
EXTRA_DIST = faad2.spec
#cd common/mp4ff && nano mp4ffint.h
Comment out this line
//void mp4ff_track_add(mp4ff_t *f);
Save file and cd ../..
#autoreconf -vif
#./configure
#make && make install
* Installing LAME (for audio support)
go to lame Sourceforge - http://sourceforge.net/project/showf...package_id=309
#wget http://mesh.dl.sourceforge.net/sourc...me-3.97.tar.gz
#tar zxvf lame-3.97.tar.gz
#cd lame*
#./configure && make && make install
* Installing Xvid
#cd .. && wget http://downloads.xvid.org/downloads/...e-1.1.2.tar.gz
#tar zxvf xvidcore-1.1.2.tar.gz && cd xvid*/build/generic/
#./configure && make && make install;
#cd ../../..
* Then get the X264 package
#git clone git://git.videolan.org/x264.git
#cd x264#./configure && make && make install
#cd ..
*And finally, install FFMPEG itself
#svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg && cd ffmpeg
#./configure --enable-shared --enable-libxvid --enable-libx264 --enable-libmp3lame --enable-gpl --enable-libamr-nb \
>--enable-libamr-wb --enable-libfaad --enable-libfaac --enable-pthreads --enable-nonfree
#make && make install
If the install doesn't blow up (which it shouldn't really do at this point) do the following to prevent FFMPEG from
telling you lib not found when you try to run something:
#ldd ./ffmpeg
If Path to Lib Libraries are not ok, check to see if /usr/local/lib exists in this file
#cat /etc/ld.so.conf
If not, add it using
#echo /usr/local/lib >>/etc/ld.so.conf
Then you need to install some more stuff, namely MP4Box to 'hint' the video files you create via FFMPEG.
Here's how:
cd to the ~/RPMS directory
#wget http://downloads.sourceforge.net/gpac/gpac-0.4.4.tar.gz
#wget http://downloads.sourceforge.net/gpac/gpac_extra_libs-0.4.4.tar.gz
#tar zxvf gpac-0.4.4.tar.gz
#tar zxvf gpac_extra_libs-0.4.4.tar.gz
#cd gpac_extra_libs
#cp -r * ../gpac/extra_lib
#cd ../gpac
#chmod +x configure
#./configure
#make lib
#make apps
#make install
#cp bin/gcc/libgpac.so /usr/lib
#ldconfig -v # refresh the cache library
* At this point, you should now have a fully working installation, ready to create mobile videos (and iPod videos)
Examples:
#ffmpeg -i INPUT.AVI -s 176x144 -b 64000 -vcodec libx264 -r 10 -acodec libfaac -ac 1 \
>-ar 22500 -ab 32000 OUTPUT.3gp
-i shows the input file
-s is the screen size,
-b is the video bit rate
-vcodec is the video codec
-r is the frame rate per second
-acodec is the audio codec
-ac is the number of audio channels, 1 = mono ; 2 = stereo
-ar is the audio sampling rate
-ab is the audio bit rate
and finally, the output file
*But before you stick this on your streaming server you need to prepare the file for streaming using MP4Box.
#MP4Box -hint OUTPUT.3gp
-hint : hints the given file for RTP/RTSPYou may want to check MP4Box documentation for a more detailed explanation of MP4Box
http://gpac.sourceforge.net/doc_mp4box.php

No comments:
Post a Comment