Compiling Veejay
Compiling on Ubuntu
Version 1, 17/01/2008
1. Getting started
1.1 Introduction
Veejay consists of 4 parts to be compiled separately:
- veejay-server (the main binary and libraries, a full functioning Veejay without GUI)
- veejay-client (it will install ‘reloaded’, the graphical user interface for Veejay)
- veejay-utils (a collection of command-line programs)
- theme-pack (lets you change the appearance of the GUI)
1.2 Other sources for help
There’s an article in french available here:
http://ubuntufromscratch.wordpress.com/2007/09/02/compiler-veejay/
Also, the veejay-discussion googlegroups contain some pointers:
http://groups.google.com/group/veejay-discussion
Checkout “doc” directory in the veejay source directory
1.3 Using checkinstall
On my ubuntu version, I use a little program called checkinstall to install software compiled from source
A normal compilation run, using the GNU build tools configure and make, would look like this:
$ ./configure && make && sudo make install
On my machine, I substitute the “make install” command with checkinstall:
$ sudo checkinstall -D -y --pkgversion=1.0
This produces a nice, clean .deb package, that will be installed automatically. That’s very nice, because now you can use synaptic to remove the package again if needed, and keep your distro “clean”
The commandline way to remove veejay installed with checkinstall:
$ dpkg -r veejay
Getting checkinstall
$ sudo apt-get install checkinstall
1.4 Getting Ubuntu ready
Unlike other distro’s, ubuntu doesn’t ship with the needed development tools by default. here’s a quick command to help you on your way:
$ sudo apt-get install build-essential autogen autotools-dev autoconf automake1.8 libtool
Next, create a build directory on a partition with sufficient space (about 200 MB), and enter that directory. I’ll assume it’s in your home directory:
$ mkdir ~/veejay_build && cd ~/veejay_build
Get the sources for veejay. If you’re going to use the stable version of veejay 1.0 grab the .tar archives from this site:
$ wget http://www.veejayhq.net/releases/reloaded-1.0.tar.bz2 http://www.veejayhq.net/releases/themepack-1.0.tar.bz2 http://downloads.sourceforge.net/veejay/veejay-utils-1.0.tar.bz2 http://downloads.sourceforge.net/veejay/sendVIMS-0.1.5.tar.bz2 http://www.veejayhq.net/releases/veejay-1.0.tar.bz2
1.5 Dependencies
You’ll need the following software to compile and run veejay:
(lib)SDL
jack audio connection kit
libquicktime
libXML 2
jpeg libraries
mjpegtools
ffmpeg ( libavcodec, libavformat, libswscale)
libdv
libunicap
Additionally, to run Reloaded ( graphical client)
GLADE and GTK
Cairo, GLITZ and GTK-Cairo
Libasound
On Ubuntu, many of these have been installed by default, but we need to install a bunch of other packages, containing special development files for various libraries. these are packages usually ending with -dev. If the configure script fails at any point, you’re propably missing one of these.
Note: This goes for any linux distribution that does not include the header files by default, like mandrake, redhat, etc. etc.
On a fresh ubuntu 7.10 I typed this to install everything I needed:
$ sudo apt-get install libsdl1.2-dev libjack0.100.0-dev libquicktime-dev libxml2-dev libglade2-dev libgtk2.0-dev libmjpegtools-dev libavcodec-dev libjpeg62-dev libavformat-dev libswscale-dev libdv-dev xorg-dev libasound-dev libsamplerate-dev
Also, get the libunicap packages from:
http://www.unicap-imaging.org/download.htm
( installation an download instructions available)
2. Installing veejay-server ( main binary and libraries)
2.1 configure
First, we need to build and install veejay-server, the core. Later, we’ll install reloaded (veejay-client), veejay-utilities and theme packs.
Unpack the sources
$ tar -jxvf veejay-1.XXX.tar.bz2
Enter the source directory
$ cd veejay-1.XXX/
set up the PKG_CONFIG_PATH variable
$ export PKG_CONFIG_PATH=/usr/lib/pkgconfig/
The configure script will try to figure out the settings of your machine and check for all the needed packages.
$ ./configure --prefix=/usr --enable-gl
If you have followed all the above steps, you should get something like the following output:
configure:
configure: Veejay 1.XXX build configuration :
configure:
configure: Compiler flags: -march=pentium4 -mtune=pentium4 -msse -mfpmath=sse
configure: -fif-conversion
configure: -O3
configure:
configure: Architecture: i686
configure:
configure: x86
configure: MMX enabled : yes
configure: MMX2 enabled : yes
configure: SSE enabled : yes
configure: SSE2 enabled : yes
configure: 3DNOW enabled : no
configure: CMOV enabled : yes
configure:
configure: Platform: Linux
configure:
configure: Required dependencies:
configure: - POSIX Threads (pthread) : true
configure: - MJPEGTools : true
configure: - AVI MJPEG playback/recording : true (always)
configure: - FFmpeg AVFormat : true
configure: - FFmpeg AVCodec : true
configure: - FFmpeg Swscaler : true
configure: Optional dependencies
configure: - SDL support : true
configure: - DirectFB support : false
configure: - OpenGL support : true
configure: - libDV (digital video) support : true
configure: - QuickTime support : true
configure: - Unicap Imaging : true
configure: - video4linux : true
configure: - JPEG support : true
configure: - GDK Pixbuf support : true
configure: - Jack Audio Connection Kit : true
configure: - XML c library for Gnome : true
configure: - Freetype support : true
If not, repeat the above steps. You’re propably missing some package.
2.2 make and checkinstall
Type make to compile:
$ make -j2
( I use -j2 to enable compiling in multiple threads. this may speed up the process on multiprocessor systems)
Install using checkinstall
$ sudo checkinstall -D -y --pkgversion=1.0
Alternatively, type “make install”
3. Compiling Reloaded
3.1 Dependencies
Reloaded depends on gtkcairo. Gtkcairo is still under development and will propably be integrated into the GTK library but for now, you’ll have to grab the CVS version and compile it yourself.
Install CVS
$ sudo apt-get install cvs
Download gtkcairo into your veejay build dir
$ cvs -d :pserver:anoncvs@cvs.cairographics.org:/cvs/cairo co gtkcairo
Create the build scripts, run configure and make
$ cd gtkcairo
$ sh autogen.sh && ./configure --prefix=/usr && make
Use checkinstall to create a package and install it
$ sudo checkinstall -y -D --pkgversion 1.0
To enable midi, you’ll need libasound-dev
$ sudo apt-get install libasound-dev
3.2 Running configure, make, and use checkinstall to install Reloaded
Unpack the sources
$ tar -jxvf reloaded-1.0.tar.bz2
Setup the PKG_CONFIG_PATH variable
$ export PKG_CONFIG_PATH=/usr/lib/pkgconfig/
Enter the directory and run configure
$ ./configure --prefix=/usr --with-gdk-pixbuf
Run make…
Run checkinstall…
$ sudo checkinstall -D -y
Done!
4. Installing the veejay-utils
4.1 Unpack, configure and make:
Unpack, configure and make:
$ tar -jxvf veejay-utils-1.0.tar.bz2
$ cd veejay-utils-1.0/
$ ./configure --prefix=/usr && make
And checkinstall
$ sudo checkinstall -D -y
5. Installing the veejay-themepack
The themepack comes with a couple of “example” themes. due to time constraints, these themes aren’t very developed, so contributions are very welcome.
TODO: write something here.
6. Running veejay
6.1 Test if veejay works
$ veejay -d -n
To run veejay without accelerated display
$ veejay -O5 -d -n
To run veejay in verbose mode
$ veejay -O5 -d -n -v
To run veejay with openGL display
$ veejay -O4 -d -n
Start another terminal and type
$ gveejayreloaded
or
$ gveejayreloaded -n
6.2 Stopping veejay
Open another terminal
$ sayVIMS "600:;"
(or press CTRL-C in the terminal running veejay)
Compiling in general
-Required libraries (dev) :
- MJPEG Tools
- FFmpeg
- libxml2 libXML for gnome
- SDL
- libdv
- freetype2
- [http://www.gtk.org GTK-2.4 (GTK 2.8 recommended)
- Unicap API
- Cairo
- GtkCairo
- libsamplerate
-Optional:
- DirectFB
- Jack
- Libquicktime
- openGL library (gl.h and libGL.so)
You should check with the package manager of your distribution to see if all development packages have been installed, among others this includes:
- glib >= 2.4 dev
- automake, autoconf, libtool, gcc, make, etc.
- linux kernel header files
- the -dev packages of the required dependencies
If you are one of those lucky users with a distribution without any compiler pre-installed you will need to setup a build system by installing a gcc, automake, autoconf, etc etc.
2. preparation
Veejay requires a recent ffmpeg.
If veejay fails to build/link with the ffmpeg on your system, remove it and grab ffmpeg from source.
$ svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
$ cd ffmpeg
$ ./configure --enable-shared --enable-swscaler --enable-dts --enable-gpl
$ make
$ make install
You need to set the PKG_CONFIG_PATH environment variable to the directories that contain the .pc files.
$ echo $PKG_CONFIG_PATH
$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
Grab the sources from here and extract them somewhere.
If you want to disable the graphical interfaces for some reason, use:
$ ./configure --without-gveejayreloaded
If you want to use openGL for video playback, use:
$ ./configure --enable-gl
In all other cases, just configure will do fine.
Type ‘make’ to build veejay
$ make
$ sudo make install
or
$ su
# make install
Compiling veejay-current on Ubuntu 6.10
How much time does it take ?
I just wrote this howto and installed veejay on a newly
installed Ubuntu 6.10 system in about half an hour.
Your milage may vary, depending on bandwidth and
experience with building software from source.
Compiling veejay-ng on Ubuntu is left as an exercise
for the reader.
Which packages do I need ?
You will need about 200 megabytes of available diskspace,
this includes the packages below and the space
needed for building veejay.
- subversion
- cvs
- build-essentials
- autogen
- autotools-dev
- autoconf
- automake1.8
- libtool
- libsdl1.2-dev
- libjack0.100.0-dev
- libquicktime-dev
- libxml2-dev
- libglade2-dev
- libgtk2.0-dev
Which packages do I need to compile myself ?
If there is a compile error in Region2D.hh, complaining about ‘assert’
insert a line in top of the file ‘#include <assert.h>’
- libunicap
- FFmpeg
- GTK Cairo
cvs -d :pserver:anoncvs@cvs.cairographics.org:/cvs/cairo co gtkcairo cd gtkcairo sh autogen.sh ./configure && make && sudo make install
WARNING
I use ffmpeg from source, I suggest you do the same.
There are unmet dependencies in libavcodec-dev and libavformat-dev
that relate to ogg,vorbis,theora, *1394* packages in Ubuntu 6.06.
$ sudo apt-get remove libavcodec-dev libavformat-dev $ svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg $ cd ffmpeg $ ./configure --help
Disable what you dont need, then:
$ ./configure --enable-shared --enable-swscaler --enable-gpl $ make && make install
And continue building veejay
Building veejay
Check if the PKG_CONFIG_PATH variable has been set properly.
$ echo $PKG_CONFIG_PATH
If you just ran ‘configure’ and ‘make’ for mjpegtools,libunicap etc,
check if the accompanying .pc files are in /usr/local/lib/pkgconfig
$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
To get the latest veejay:
$ svn co svn://dyne.org/veejay/trunk/veejay-current
USE VEEJAY 1.0
To build a veejay optimized for speed:
$ sh autogen.sh $ ./configure $ make && sudo make install
To build a veejay to send usefull bugreports:
$ sh autogen.sh $ ./configure --enable-debug $ make && sudo make install
January 1st, 2009 at 9:39 am
hi…
nice…