Compiling xjadeo on osx

I've just managed to run xjadeo on an Apple. It's yet very basic - only X11 (RGB rendering) and picky about video codecs (not if you invest some time in getting all the development dependencies for ffmpeg) , but else works like a charm.

Building xjadeo is easy - the crux is to get a working devel system and a ffmpeg installation on OSX. Luckily fink provides a good fundament for Darwin development and made me feel at home immediately… If you've never built applications on osX read my Fink Installation Notes.

Prerequisites

You need the Apple Developer Tools (Xcode) from Apple Developer Connection. (registration is free) - I installed XCode-1.5 (incl. the X11SDK) on OSX-10.3.9. and XCode-2.4.1_8 on OSX-10.4.8.

Use http://fink.sourceforge.net/ to get the listed GNU packages by running apt-get install <package-name> .1) - you need the -dev and -shlibs of the library packages.

  • automake-1.9
  • autoconf2.5
  • pkgconfig + m4
  • make I've been using /usr/bin/gnumake from the apple xtools
  • freetype2-dev optional - on screen display - better to use osX freetype (/usr/X11R6/bin/freetype-config)
  • Imlib + libjpeg + libpng3 + libtiff + libungif
  • imlib2 not yet required - but will replace imlib1 soon
  • svn
  • cvs you might already have one in /usr/bin/ ?
  • SDL - (this version of SDL seems to be broken with ffmpeg, but it provides pkg-info so that the xjadeo's configure script will not complain…)
  • gdk-pixbuf only needed for generating the build system - see footnote xjadeo OS-X
  • gcc4 will work just as fine as gcc-3.3 - you might experience some unintentional behaviour with gcc-4.0.0 and ffmpeg-0.4.9 though.

You'll need the jack-audio-devel-kit - alas there's no fink package for that. Meanwhile get if from http://www.jackaudio.org/. Also install qjackctl (dmg available at http://ardour.org/requirements_osx) - If you want to be able to directly sync to an external MIDI device - you can install the portmidi shared library to be used with xjadeo.

ffmpeg

ffmpeg binaries

You can try the unstable ffmpeg package: http://pdb.finkproject.org/pdb/package.php/ffmpeg-dev or the binary from http://ffmpeg.darwinports.com/

I've been sticking to the source…

compile and install ffmpeg on OSX 10.3

ffmpeg won't compile properly without mp3 support. so get that first:

cd /tmp
cvs -d:pserver:anonymous@lame.cvs.sourceforge.net:/cvsroot/lame login
cvs -z3 -d:pserver:anonymous@lame.cvs.sourceforge.net:/cvsroot/lame co -P lame
cd lame
./configure
make
sudo make install

Then download the ffmpeg source (0.4.9-pre1)

Note: I had problems with recent ffmpeg svn versions - they compile allright but all applications (ffplay,ffmpeg,xjadeo) crash with some AVCodecCtx null ptr - maybe that's due to the fact that I'm using Panther. - Tiger's might just be happy with the latest ffmpeg svn.

download via subversion:

cd /tmp
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg -r 3298
cd ffmpeg

…or download the compressed tar-ball

cd /tmp
tar xzf DOWNLOADS/ffmpeg-0.4.9-pre1.tar.gz
cd ffmpeg-0.4.9-pre1

Get the last ingredient: OSX-patch for ffmpeg-0.4.9-pre1.2) (file-mirror) thanks to christophseibert.de and Stephen Jungels!.

apply the patch and compile:

zcat DOWNLOADS/ffmpeg-0.4.9-pre1-macosx-10-2.patch.gz | patch -p1 

./configure --enable-shared --enable-pthreads --disable-vhook
make
sudo make install

compile and install ffmpeg on OSX 10.4

ffmpeg won't compile properly without mp3 support. so get that first:

cd /tmp
cvs -d:pserver:anonymous@lame.cvs.sourceforge.net:/cvsroot/lame login
cvs -z3 -d:pserver:anonymous@lame.cvs.sourceforge.net:/cvsroot/lame co -P lame
cd lame
./configure
make
sudo make install

Get the ffmpeg source and compile it: - svn revision 22301 is known to work..

cd /tmp
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg -r 22301
cd ffmpeg
#svn update
./configure --enable-shared --enable-pthreads --disable-vhook --enable-mp3lame
make
sudo make install

building xjadeo

svn checkout the latest xjadeo.

cd /tmp
svn co http://svn.sourceforge.net/svnroot/xjadeo xjadeo
cd xjadeo/trunk/
./autogen.sh

autogen3)

or get the latest tar-ball from Sourceforge

PKG_CONFIG_PATH=/sw/lib/pkgconfig/:/usr/local/lib/pkgconfig/ ./configure --disable-qtgui
make
sudo make install

try it:

./src/xjadeo/xjadeo -v -t contrib/xjadeo-example.avi
./src/xjadeo/xjadeo -x 3 -R
./src/xjadeo/xjadeo -x 3 contrib/xjadeo-example.avi

Testing

  • Start up X11 (Applications → Utilities → X11)
  • launch qjackctl
  • xjadeo -x 3 -f 25 -v videofile.mov
  • press play in qjackctl.

You'll always need the -x 3 option to select X11 output. Due to the rather old version of ffmpeg, every frame in the video file needs to be a keyframe. Read the the documentation on how to encode the video file. Quick hint for the impatient:

mencoder -idx -ovc lavc -lavcopts keyint=1 -lavcopts vcodec=mjpeg -ofps 25 \
 -nosound -vf  scale=480:360 input_file.xxx -o output_file.avi

Binaries

I do not (yet) see how I can make a binary-package without either statically linking xjadeo or including all dependant libraries. I dislike both options, and try to see whether I can make a fink package for xjadeo…

Resources

1) you can use sudo dselect for package administration and consult apt-cache search <pattern>
2) later versions of ffmpeg in the svn repository do no longer require this patch.
3) if you don't have the gdk-pixbuf package installed, you will get an configure.ac:60: error: possibly undefined macro: AM_PATH_GDK_PIXBUF when running ./autogen.sh - simply remove line 60 from configure.ac to fix this issue
 
oss/xjadeo/osx.txt · Last modified: 21.08.2008 00:21 (external edit)