Linux HOWTOs

About | Home | Search


HOWTO: faad
Description: Freeware Advanced Audio Decoder
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


# faad2 2.8.8
# ===========
# Prerequisites:
# autoconf and automake (for autoreconf)
# mpeg4ip (optional)
# XMMS (if you pass --with-xmms)
# id3lib
# GTK+ (for the XMMS plugin)

# Get it
cd
test -f installed/faad2-2.8.8.tar.gz &&
 mv installed/faad2-2.8.8.tar.gz .
test ! -f faad2-2.8.8.tar.gz &&
 wget https://downloads.sf.net/faac/faad2-2.8.8.tar.gz

# Extract it
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "faad2-*" -exec rm -r {} \;
tar xzvf ~/faad2-2.8.8.tar.gz
cd faad2-2.8.8
test $UID = 0 && chown -R root:root .

# faad2 has an mpeg4ip plugin, so if you want that but haven't installed
# mpeg4ip yet, build and install this, then mpeg4ip, then come back here
# again.

# If you have XMMS installed and want the plugin, add --with-xmms

# Configure the build 64-bit
test $(uname -m) = 'x86_64' &&
 ./configure --libdir=/usr/local/lib64 --mandir=/usr/local/man

# Configure the build anything else
test $(uname -m) != 'x86_64' &&
 ./configure --mandir=/usr/local/man

# Build it
make

# Become root to install it
su

# Remove old shared library files
test -d /usr/local/lib &&
  ( cd /usr/local/lib ; rm -f libfaad.* libfaad_drm.* libmp4.* libmp4ff.* )
test -d /usr/local/lib64 &&
 ( cd /usr/local/lib64 ; rm -f libfaad.* libfaad_drm.* libmp4.* libmp4ff.* )

# Install it
make install
ldconfig

# Become yourself again
exit

# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/faad2_*.tar.* installed/faad2-*.tar.*
mv faad2-2.8.8.tar.gz installed/


# If you ever want to uninstall faad2, this should do it:
# ('make uninstall' alone should do it if you have the configure'd source)
cd
su
test -d src/faad2-* && ( cd src/faad2-* ; make uninstall )
rm -f /usr/local/bin/faad
( cd /usr/local/include ; rm -f faad.h neaacdec.h )
test -d /usr/local/lib &&
 ( cd /usr/local/lib ; rm -f libfaad.* libfaad_drm.* libmp4.* libmp4ff.* )
test -d /usr/local/lib64 &&
 ( cd /usr/local/lib64 ; rm -f libfaad.* libfaad_drm.* libmp4.* libmp4ff.* )
rm /usr/localman/man1/faad.1
rm -f $(xmms-config --input-plugin-dir)/libmp4.*
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "faad2-*" -exec rm -r {} \;
rm -f ~/installed/faad2-*.tar.*

Back to the list


Last updated: Wed, 29 Apr 2020 22:04:50 -0400
Jason Englander <jason at englanders dot us>