= $stitle ?>
HOWTO: avifile
Description: Compressed AVI file support library for x86 Linux
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything
# avifile
# =======
# Below I include the latest snapshot and instructions for installing it
# from CVS. If you use gcc >= 3.4 you'll probably want to use the latter.
# I was unable to build the snapshot with gcc 3.4.5
# If you want to uninstall avifile, or just clean up files from an old
# version before installing a new one, skip down to to the bottom for
# instructions.
# Create directories for the tarballs and source
mkdir -p -m 0700 ~/installed/avifile ~/src/avifile
# Prerequisites (for both versions):
# freetype >= 2.0
# XFree86 or X.org (for the 'aviplay' sample app)
# pkg-config
# Xft/fontconfig (they come as part of X)
# qt >= 2.0 (also for the sample app)
# libjpeg
# iconv
# sdl >= 1.0.0 (also for the sample app)
# liba52
# lame
# zlib
# Ogg/Vorbis
# divx4linux
# xvid
# faad
# libdca/libdts
# Codecs
# ======
# Install win32 codec binaries (for video (de)compression). This will not
# overwrite existing files, in case you already have codecs there from
# installing Mzlayer, for example. If you already have codecs installed
# elsewhere (ie. /usr/local/lib/codecs), you can skip this and use those
# below instead.
cd
test -f installed/avifile/binaries-011002.tgz &&
mv installed/avifile/binaries-011002.tgz .
test ! -f binaries-011002.tgz &&
wget http://avifile.sourceforge.net/binaries-011002.tgz
# Become root to install them
su
mkdir -p /usr/lib/win32
tar xzvfk binaries-011002.tgz -C /usr/lib
chown -R root:root /usr/lib/win32
find /usr/lib/win32 -type f -exec chmod 644 {} \;
# Become yourself again
exit
cd
rm -f installed/avifile/binaries-*.tgz
mv binaries-011002.tgz installed/avifile/
# These are Windows Media Player 9 codecs. This time it will overwrite these
# if they already exist. If you have codecs installed (in /usr/lib/win32)
# from installing MPlayer, skip this.
cd
test -f installed/avifile/Win32_dmo.tgz &&
mv installed/avifile/Win32_dmo.tgz .
wget -N http://download.sf.net/avifile/Win32_dmo.tgz
# Become root to install them
su
mkdir -p /usr/lib/win32
tar xzvf Win32_dmo.tgz -C /usr/lib/win32
mv /usr/lib/win32/Win32_dmo/* /usr/lib/win32/
rmdir /usr/lib/win32/Win32_dmo
chown -R root:root /usr/lib/win32
find /usr/lib/win32 -type f -exec chmod 644 {} \;
# Become yourself again
exit
cd
mv Win32_dmo.tgz installed/avifile/
# avifile 0.7.45-20060306
# =======================
# If you run Slackware with a 2.6 kernel and you have the 2.4 kernel
# headers installed from the kernel-headers-2.4.* package (because that's
# what glibc was built with), replace that with the kernel-headers-2.6.*
# package from Slackware testing:
# ftp://ftp.slackware.com/pub/slackware/slackware-10.2/testing/packages/linux-2.6.13/
# Once you build avifile, you can uninstall it and go back to the original
# one if you like.
cd
test -f installed/avifile/avifile-0.7-0.7.45.tar.bz2 &&
mv installed/avifile/avifile-0.7-0.7.45.tar.bz2 .
test ! -f avifile-0.7-0.7.45.tar.bz2 &&
wget http://download.sf.net/avifile/avifile-0.7-0.7.45.tar.bz2
cd src/avifile
test -d ./avifile && rm -r ./avifile
find -maxdepth 1 -type d -name "avifile-*" -exec rm -r {} \;
tar xjvf ~/avifile-0.7-0.7.45.tar.bz2
cd avifile-0.7-0.7.45
test $UID = 0 && chown -R root:root .
# If you skipped installing codecs above and want to use codecs in another
# directory, like those you installed with MPlayer, pass
# --with-win32-path=/usr/local/lib/codecs (wherever they are) to configure
./configure
## If make fails with an error like this:
# ../lib/.libs/libaviplay.so: undefined reference to `libiconv_open'
## re-run it like this:
# make LIBS=-liconv
make
# Become root to install it
su
( cd /usr/local/lib ; rm -f libaviplay.* libaviplayavcodec.* \
libaviplaydha.* libaviplayavformat.* libaviplayavutil.* libaviplayvidix.* \
libqavm.* )
make install
ldconfig
chown -R $USER .
# Become yourself again
exit
cd
rm -f installed/avifile/avifile-*.tar.* installed/avifile/avifile.README
mv avifile-0.7-0.7.45.tar.bz2 installed/avifile/
# If you're upgrading an older version, watch out for (delete if you want)
# old /usr/local/share/avifile-*/ and /usr/local/lib/avifile-*/ directories.
# avifile from CVS
# ================
# Prerequisites (beyond those listed above):
# autoconf (required by autogen.sh)
# automake (ditto)
# For Video4Linux2 support (optional):
# Kernel 2.6.x headers (not the 2.4.x package that comes with Slackware)
# You can get 2.6.x headers from testing
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "avifile-*" -exec rm -r {} \;
test -d ./avifile && cvs update
# If CVS asks for a password, just hit enter
test ! -d ./avifile &&
( cvs -d:pserver:anonymous@avifile.cvs.sourceforge.net:/cvsroot/avifile \
login
cvs -z3 -d:pserver:anonymous@avifile.cvs.sourceforge.net:/cvsroot/\
avifile co -P avifile
test $UID = 0 && chown -R root:root . )
cd avifile
test -f ./Makefile && make distclean
# I had to change install-hook in Makefile.am to install-exec-hook
# and install-hook in include/Makefile.am to install-data-hook
# autogen.sh wouldn't finish otherwise. I use automake 1.10
./autogen.sh
./configure --with-win32-path=/usr/local/lib/codecs
make
## If make failed with an error like this:
# /home/jason/src/avifile/avifile/lib/.libs/libaviplay.so: undefined
# reference to `libiconv_open'
## re-run it like this:
# make LIBS=-liconv
# Become root to install it
su
( cd /usr/local/lib ; rm -f libaviplay.* libaviplayavcodec.* \
libaviplaydha.* libaviplayavformat.* libaviplayavutil.* libaviplayvidix.* \
libqavm.* )
make install
ldconfig
chown -R $USER .
# Become yourself again
exit
rm -f ~/installed/avifile/avifile-*.tar.*
echo 'avifile was installed from CVS' > ~/installed/avifile/avifile.README
echo 'source is in ~/src/avifile/avifile' >> \
~/installed/avifile/avifile.README
chmod 700 ~/installed/avifile/avifile.README
# If you ever want to uninstall avifile, this should do it:
cd
su
test -d src/avifile && ( cd src/avifile ; make uninstall )
test -d src/avifile-* && ( cd src/avifile-* ; make uninstall )
( cd /usr/local/bin ; rm -f avifile-config avibench avicap avicat avimake \
aviplay avirec avirecompress avitype kv4lsetup )
find /usr/local/include -maxdepth 1 -type d -name "avifile-*" \
-exec rm -r {} \;
( cd /usr/local/lib ; rm -f libaviplay.* libaviplayavcodec.* \
libaviplaydha.* libaviplayavformat.* libaviplayavutil.* libaviplayvidix.* \
libqavm.* )
find /usr/local/lib -maxdepth 1 -type d -name "avifile-*" -exec rm -r {} \;
( cd /usr/local/man/man1 ; rm -f avibench.1 avicap.1 avicat.1 \
avifile-config.1 avimake.1 aviplay.1 avirec.1 avirecompress.1 avitype.1 \
kv4lsetup.1 )
find /usr/local/share -maxdepth 1 -type d -name "avifile-*" -exec rm -r {} \;
rm -f /usr/local/lib/pkgconfig/avifile.pc \
/usr/local/share/aclocal/avifile.m4
ldconfig
exit
test -d ~/src/avifile && rm -r ~/src/avifile
find ~/src -maxdepth 1 -type d -name "avifile-*" -exec rm -r {} \;
rm -f ~/installed/avifile-*.tar.* ~/installed/avifile.README
|
Last updated: Fri, 26 Mar 2010 13:18:56 -0400 Jason Englander <jason at englanders dot us> |
|