Building AviSynth 3.0 for GNU/Linux (using g++)

Summary

Presentation

To install Avisynth 3.0, we will need the following libraries:

This section explains how to install these libraries, taking into account the system. We will download all the libraries in the same directory, say avs_main_dir, in the home directory. In a terminal, type
cd
mkdir avs_main_dir

Note:
Shell commands are given throughout this section. Commands in each subsection are independant and can (have to...) be used as is to install the libraries.

Download dependencies

First, download the following libraries in the avs_main_dir directory:

Installation of STLport 5.0.2

Install STLport in the /usr/local directory:

cd avs_main_dir
tar jxvf STLport-5.0.2.tar.bz2
cd STLport/build/lib
make -f gcc.mak depend
make -f gcc.mak
make -f gcc.mak all-static
make -f gcc.mak install
make -f gcc.mak install-static

The libraries are located in STLport/lib and the headers in STLport/stlport.

cd ../..
su <type the root password>
cp lib/libstlport* /usr/local/lib/
cp -R stlport /usr/local/include/
<Ctrl-d>

Note:
STLport will be automatically found if installed in /usr/local.
cd ../..
cp lib/libstlport* $HOME/local/lib/
cp -R stlport $HOME/local/include/

Installation of Boost 1.33.1

Install Boost in the /usr/local directory:

cd
cd avs_main_dir
tar jxvf boost_1_33_1.tar.bz2
tar zxvf boost-jam-3.1.12-1-linuxx86.tgz
cd boost_1_33_1
su <type the root password>
../boost-jam-3.1.12-1-linuxx86/bjam "-sTOOLS=gcc" --prefix=/usr/local --with-thread install
<Ctrl-d>

If one wants to install it locally (like in Installation of STLport 5.0.2), just replace --prefix=/usr/local by --prefix=$HOME/local/.

Remark that Boost will be automatically found if installed in /usr/local.

Note:
For more informations about installing Boost, go to the Installation section of Boost.

Installation of Freetype 2.2.1

Avisynth 3.0 displays text with a very efficient font engine, named Freetype. Install it in the /usr/local directory:

cd
cd avs_main_dir
tar jxvf freetype-2.2.1.tar.bz2
cd freetype-2.2.1
./configure --prefix=/usr/local
make
su <type the root password>
make install
<Ctrl-d>

If one wants to install it elsewhere, change the value given to the --prefix parameter.

Installation of Fonconfig 2.3.2

Install Fontconfig in the /usr/local directory:

cd
cd avs_main_dir
tar jxvf fontconfig-2.3.2.tar.bz2
cd fontconfig-2.3.2
./configure --prefix=/usr/local
make
su <type the root password>
make install
<Ctrl-d>

If one wants to install it elsewhere, change the value given to the --prefix parameter.

Installation of Gstreamer 0.10 and al.

Gstreamer is a multimedia framework, similar to DirectShow in the Windows(tm) world. Gstreamer 0.10 is now supported. Gstreamer is only the core of the framework. To decode the streams, you need to install several other pckages : Gst-Plugins-Base, Gst-Plugins-Good, Gst-Plugins-Bad, Gst-Plugins-Ugly, Gst-FFmpeg. In addition, Gstreamer relies now on a small library, that provides several optimized functions that are video-related.

Install these libraries in the /usr/local directory:

cd ..
tar zxvf liboil-0.3.9.tar.gz
cd liboil-0.3.9
./configure --prefix=/usr/local
make
su <type the root password>
make install
<Ctrl-d>

cd ..
tar jxvf gstreamer-0.10.8.tar.bz2
cd gstreamer-0.10.8
./configure --prefix=/usr/local
make
su <type the root password>
make install
<Ctrl-d>

d ..
tar jxvf gst-plugins-base-0.10.8.tar.bz2
cd gst-plugins-base-0.10.8
./configure --prefix=/usr/local
make
su <type the root password>
make install
<Ctrl-d>

cd ..
tar jxvf gst-plugins-good-0.10.3.tar.bz2
cd gst-plugins-good-0.10.3
./configure --prefix=/usr/local
make
su <type the root password>
make install
<Ctrl-d> 

cd ..
tar jxvf gst-plugins-bad-0.10.3.tar.bz2
cd gst-plugins-bad-0.10.3
./configure --prefix=/usr/local
make
su <type the root password>
make install
<Ctrl-d>

cd ..
tar jxvf gst-plugins-ugly-0.10.3.tar.bz2
cd gst-plugins-ugly-0.10.3
./configure --prefix=/usr/local
make
su <type the root password>
make install
<Ctrl-d>

cd ..
tar jxvf gst-ffmpeg-0.10.1.tar.bz2
cd gst-ffmpeg-0.10.1
./configure --prefix=/usr/local
make
su <type the root password>
make install
<Ctrl-d>

If you want to install it elsewhere, change the value given to the --prefix parameter.

Installation of an assembler

Install nasm in the /usr/local directory:

cd ../
tar jxvf nasm-0.98.39.tar.bz2
cd nasm-0.98.39 
./configure --prefix=/usr/local
make
su <type the root password>
make install
<Ctrl-d>

If one wants to install it elsewhere, change the value given to the --prefix parameter.

Installation of Avisynth 3.0

Now, we may build Avisynth 3.0 ! Just after having installed 3 more libraries.

Ok, ok, I'm kidding...

First we have to download the source code which is in cvs:

cd
cd avs_main_dir
cvs -z3 -d:pserver:anonymous@avisynth2.cvs.sourceforge.net:/cvsroot/avisynth2 login
cvs -z3 -d:pserver:anonymous@avisynth2.cvs.sourceforge.net:/cvsroot/avisynth2 co -r avisynth_3_0 avisynth

Avisynth 3.0 needs an extension to boost, not yet included in the current version of boost. This extension is provided in the build directory of avisynth. It suffices to unzip it and copy the files to the boost include directory:

cd avisynth/build
tar jxvf circular_buffer_v3.7.tar.bz2
cd circular_buffer

cp -R circular_buffer* boost $HOME/local/include/boost-1_33_1/

And now, we can configure Avisynth 3.0:

cd ../linux
./booststrap.sh
./configure

If configure is not able to find automatically one or more library, we have to specify its path. Assuming that you have installed everything in /usr/:

./configure --with-stl-path=/usr --with-boost-path=/usr

If you have installed some of the above libraries elsewhere, just replace /usr by the correct path. The configure script should be able to find automatically Freetype.

Note:
If you want to make a debug build of Avisynth 3.0, just pass to the configure script the options --enable-core-debug (for Avisynth itself).

If you want to build this documentation, just pass to the configure script the options --enable-doc

To build Avisynth, we use the usual commands:

make
make install

If you have Gtk+ 2.8 and x264 installed, you can test avisynth with the program avisynth_test. Use the following script file:

And see the result.


Generated on Sun Jul 30 18:46:52 2006 for Avisynth by  doxygen 1.4.7