Download faac source and give it a ./configure && make && sudo make install :
sudo apt-get install libfaac-dev # <-- encouraged to use this
__OR__
get source from http://www.audiocoding.com/downloads.html
Version 1.28 bootstrapped TAR.BZ2 Package
http://downloads.sourceforge.net/faac/faac-1.28.tar.bz2
which after you decompress gives you a dir :
cd faac-1.28
./configure
make -j8 # the number after the j should be double the number of your CPU cores
... when it throws errors fix :
just comment out line 126 of file faac-1.28/common/mp4v2/mpeg4ip.h
so it looks like
// char *strcasestr(const char *haystack, const char *needle);
make clean
make -j8
sudo make install
Then for x264 :
git clone git://git.videolan.org/x264.git
cd x264
./configure --enable-static --enable-shared
make -j8
sudo make install
For mp3 get LAME (libmp3lame) from http://lame.sourceforge.net/ version 3.99.5, then give it the normal
cd lame-3.99.5/
./configure
make -j8
sudo make install
Finally download ffmpeg source and do install :
git clone git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libx264 --enable-libfaac --enable-libmp3lame
make -j8
sudo make install
I feel your pain, but this works