Gallery v0.2.0 documentation
Install¶
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
./configure
make
sudo checkinstall --pkgname=yasm --default
sudo dpkg -i yasm*.deb
cd ~/
#git clone git://git.videolan.org/x264.git
wget
ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20090505-2245.tar.bz2
tar jxfv x264-snapshot-20090505-2245.tar.bz2
cd x264-s*
./configure --enable-shared
make
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
cd
#wget http://ftp.penguin.cz/pub/users/utx/amr/amrwb-7.0.0.3.tar.bz2
#tar jxfv amrwb-7.0.0.3.tar.bz2
#cd amrwb-7.0.0.3/
#./configure
#make
#sudo make install
#cd
#wget http://ftp.penguin.cz/pub/users/utx/amr/amrnb-7.0.0.2.tar.bz2
#tar jxfv amrnb-7.0.0.2.tar.bz2
#cd amrnb-7.0.0.2/
#./configure
#make
#sudo make install
cd
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
make
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
Installing Gallery¶
Once all the dependencies are in place you can install Gallery into a virtual Python environment like this:
wget http://pylonsbook.com/virtualenv.py
python virtualenv.py env
env/bin/easy_install Gallery
You can then use Gallery like this:
env/bin/python -m gallery --help