Skip to content

Instantly share code, notes, and snippets.

@fasthold
Last active December 20, 2015 05:19
Show Gist options
  • Save fasthold/6077804 to your computer and use it in GitHub Desktop.
Save fasthold/6077804 to your computer and use it in GitHub Desktop.
Install ffmpeg and useful encoders (h264,mp3...)
# From http://my.oschina.net/michaelyuanyuan/blog/68616
# Set a download dir
download_dir=~/downloads
# Install H264 encoder
cd $download_dir
git clone git://git.videolan.org/x264.git x264
cd x264
./configure --enable-shared --enable-static
make && sudo make install
# Install mp3lame encoder
cd $download_dir
wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Flame%2Ffiles%2Flatest%2Fdownload%3Fsource%3Dfiles&ts=1374740068&use_mirror=nchc
tar zxvf lame-3.99.5.tar.gz
cd lame-3.99.5
./configure
make && make install
# Install FFmpeg 2.0
cd $download_dir
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-libx264 --enable-libmp3lame
make && sudo make install
# Finally
sudo ldconfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment