1. download ynsm.
tar xvf yasm-1.3.0.tar.gz
./configure
make
sudo make check install
2. download x264
./configure --enable-pthread --enable-mp4-output --enable-shared
make
sudo make install
3. download ffmpeg
./configure --enable-shared --enable-nonfree --enable-gpl --enable-decoder=aac --enable-libx264 --enable-demuxer=mov --enable-x11grab --enable-zlib --enable-protocol=http --enable-filter=aformat --enable-filter=volume --enable-filter=aresample
make
sudo make install
tar xvf yasm-1.3.0.tar.gz
./configure
make
sudo make check install
2. download x264
./configure --enable-pthread --enable-mp4-output --enable-shared
make
sudo make install
3. download ffmpeg
./configure --enable-shared --enable-nonfree --enable-gpl --enable-decoder=aac --enable-libx264 --enable-demuxer=mov --enable-x11grab --enable-zlib --enable-protocol=http --enable-filter=aformat --enable-filter=volume --enable-filter=aresample
make
sudo make install