Skip to content

Instantly share code, notes, and snippets.

@codeprimate
Created January 19, 2010 00:00
Show Gist options
  • Save codeprimate/280512 to your computer and use it in GitHub Desktop.
Save codeprimate/280512 to your computer and use it in GitHub Desktop.
FFMPEG Installation in /opt
# The following notes detail the installation of ffmpeg from source,
# and installed to /opt, instead of the default locations.
# Target OS: Ubuntu 10.04
# This file is not intended to be run as a script, but should be
# seen as a rough guide, especially for dependency finding and
# configure options.
sudo apt-get remove ffmpeg x264 libx264-dev
sudo apt-get install build-essential yasm git-core libtheora-dev libtheora0 \
libvorbis-dev libvorbis0a libvorbisenc2 libvorbisenc2 libvorbisfile3 vorbis-tools \
libxvidcore-dev libxvidcore4 libtwolame-dev libtwolame0 \
libdc1394-22-dev libdc1394-22 libavc1394-0 libraw1394-11 libraw1394-dev \
libgsm1-dev libgsm1
mkdir ffmpeg_work
cd ffmpeg_work
wget http://faac.cvs.sourceforge.net/viewvc/faac/faac/?view=tar -O faac.tar
wget http://downloads.sourceforge.net/faac/faad2-2.7.tar.bz2
wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz
wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz
git clone --depth 1 git://git.videolan.org/x264.git
git clone --depth 1 git://git.videolan.org/ffmpeg.git
git clone --depth 1 git://git.xiph.org/mirrors/ogg.git
sudo echo "/opt/lib" > /etc/ld.so.conf.d/opt.conf
sudo ldconfig
tar xzf lame-3.98.4.tar.gz
cd lame-3.98.4
./configure --prefix=/opt
make && sudo make install
cd ..
cd ogg/
./autogen.sh --prefix=/opt
make && sudo make install
sudo ldconfig
tar xzvf libtheora-1.1.1.tar.gz
cd libtheora-1.1.1
./configure --prefix=/opt --with-ogg=/opt
make && sudo make install
cd ..
tar xf faac.tar
cd faac/
./bootstrap && ./configure --with-mp4v2 --enable-shared --prefix=/opt
make && sudo make install
cd ..
tar xjf faad2-2.7.tar.bz2
cd faad2-2.7/
./configure --with-mp4v2 --enable-shared --prefix=/opt
make && sudo make install
cd ..
cd x264
./configure --prefix=/opt --enable-pthread --enable-shared
make && sudo make install
cd ..
sudo ldconfig
cd ffmpeg
./configure --prefix=/opt --enable-gpl --enable-nonfree --enable-pthreads \
--enable-postproc --disable-debug \
--extra-ldflags=-L/opt/lib --extra-cflags=-I/opt/include \
--enable-libvorbis --enable-libtheora --enable-libdc1394 --enable-libgsm \
--enable-libmp3lame --enable-libfaac --enable-libfaad --enable-libxvid --enable-libx264
make && sudo make install
sudo ldconfig
# Be sure to Add "/opt/bin" to your PATH, otherwise call /opt/bin/ffmpeg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment