git clone https://code.videolan.org/videolan/x264
cd x264
./configure –enable-shared
sudo make
sudo make install
3.x265源码编译
#ubuntu packages:
sudo apt-get install mercurial cmake cmake-curses-gui build-essential yasm
#Note: if the packaged yasm is older than 1.2, you must download yasm-1.2 and build it
hg clone https://bitbucket.org/multicoreware/x265
cd x265/build/linux
./make-Makefiles.bash
#这里将 LOG_CU_STATISTICS 设置为ON,然后,按下“c”,实现configure,按下“q”退出
sudo make
sudo make install
4.ffmpeg源码编译
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
tar -zxvf FFmpeg-n6.1.3.tar.gz ./configure --prefix=/usr/local/ffmpeg/ --enable-shared --enable-gpl --enable-libx264 --enable-libx265sudo make
sudo make install