James Gardner: Home > Work > Code > Gallery > 0.2.1 > Install

Gallery v0.2.1 documentation


The installation of Gallery requires a heavily customised version of ffmpeg in order to support all the different codecs used in phones and cameras. Unfortunately these codecs are not always open source and some can’t be distributed in binary format. As a result you have to create ffmpeg yourself.

Compiling and installing ffmpeg

These instructions describe how to create a custom version of ffmpeg on Ubuntu 8.10 for use with Gallery.

Copy and paste each line into a terminal. If all goes well you’ll end up with your own ffmpeg package correctly installed:

(The commented out bits are Ubuntu Intrepid - Ubuntu Karmic doesn’t need them. You can’t install libopencore-amrwb-dev or libopencore-amrnb-dev on Intrepid though).

sudo apt-get purge ffmpeg x264 libx264-dev
sudo apt-get install build-essential subversion git-core \
checkinstall texi2html libfaac-dev libfaad-dev \
libmp3lame-dev libtheora-dev libxvidcore4-dev libopencore-amrwb-dev libopencore-amrnb-dev libswscale-extra-0 libswscale-unstripped-0

cd ~/
wget http://www.tortall.net/projects/yasm/releases/yasm-0.7.2.tar.gz
tar xzvf yasm-0.7.2.tar.gz
cd yasm-0.7.2
sudo checkinstall --pkgname=yasm --default
sudo dpkg -i yasm*.deb
cd ~/
#git clone git://git.videolan.org/x264.git
tar jxfv x264-snapshot-20090505-2245.tar.bz2
cd x264-s*
./configure --enable-shared
sudo checkinstall --fstrans=no --install=yes --pkgname=x264 \
--pkgversion "1:0.svn`date +%Y%m%d`-0.0ubuntu1" --default
sudo ldconfig
sudo dpkg -i x264*.deb
#wget http://ftp.penguin.cz/pub/users/utx/amr/amrwb-
#tar jxfv amrwb-
#cd amrwb-
#sudo make install
#wget http://ftp.penguin.cz/pub/users/utx/amr/amrnb-
#tar jxfv amrnb-
#cd amrnb-
#sudo make install
svn checkout -r 19352 svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
#./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-libamr-nb --enable-libamr-wb
./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3

sudo mkdir /usr/local/lib/pkgconfig
sudo mkdir /usr/local/include/libavdevice
sudo mkdir /usr/local/include/libavformat
sudo mkdir /usr/local/include/libavcodec
sudo mkdir /usr/local/include/libavutil
sudo mkdir /usr/local/include/libswscale
sudo mkdir /usr/local/share/ffmpeg
sudo mkdir /usr/lib/vhook
sudo checkinstall --fstrans=no --install=yes --pkgname=ffmpeg --pkgversion "3:0.svn`date +%Y%m%d`-12ubuntu3" --default
sudo dpkg -i ffmpeg*.deb
#sudo ln -s /usr/local/lib/libamrnb.so.3 /usr/lib/libamrnb.so.3
#sudo ln -s /usr/local/lib/libamrwb.so.3 /usr/lib/libamrwb.so.3

Installing other dependencies

Gallery also relies on these dependencies:

sudo apt-get install exiv2 imagemagick ufraw dcraw
James Gardner: Home > Work > Code > Gallery > 0.2.1 > Install