Compile hints for MAC OS/X

Compiling the mjpegtools for MAC OS/X can be a straightforward task.
MAC OS/X has many tools needed for compiling already installed like gcc, g++, m4 and so on.

One problem you will very likely have is if you don't have the the shared libraries (like: SDL, libdv, glib, gtk and so on) that mjpegtools depends on. Without at least some of those libraries it is simply not possible to build mjpegtools while if others are missing then mjpegtools will have limited functionality (without SDL the playback applications yuvplay can not be build, without libdv DV data can not be processed, and so on).

The tools you likely have to install before you can compile the mjpegtools are recent versions of: automake, autoconf, and libtool You have to put the /usr/local/bin first in the path so that you don't get Apple's 'libtool' and 'libtoolize' programs (which despite their names have absolutely nothing to do with the GNU libtool program and will not work with autoconf/automake).
There is apparently a requirement for libglib/libgtk to be present (the 'AM_PATH_GLIB(1.2.0)' in configure.in). That I chose to get from the Opendarwin ports which can be found at http://www.opendarwin.org/projects/darwinports/

For display purposes (yuvplay) the SDL is used and that is very OS/X friendly and uses the native video subsystem so that it is not necessary to have XFree86 installed. Building the SDL is extremely easy and simple (./configure; make; make install). http://www.libsdl.org/index.php

If mjpegtools' DV capability is going to be needed then libdv (http://libdv.sourceforge.net) is going to be needed as well. The library portion builds easily enough but the 'playdv' program is OSS audio specific and either needs to be edited or removed from the Makefile (encodedv also is linux/x86 specific and needs attention). And since libdv needs libpopt that'll have to be built, or download it from the OpenDarwin site.

As an alternative to libdv (which is also needed for MPlayer to play raw DV files) you can also use ffmpeg's libavcodec/dv decoder and the smilutils - both ffmpeg and the smilutils are OS/X friendly and build without trouble.

That should be all the required items. A lot of the items can be found in the Opendarwin ports collection but other than the libglib/gtk you might want to fetch/build most of it from the original sources (or the CVS version). It is almost certainly a good idea to place all of the built/ported libraries and include files in /usr/local/lib and /usr/local/include because that is the default for almost all autoconf based programs such as mjpegtools.

If you want the latest version of the mjpegtools you should check the cvs version of the mjpegtools. Checking out the mjpegtools from the cvs works like that:
cvs -z3 -d:pserver:anonymous@cvs.mjpeg.sourceforge.net:/cvsroot/mjpeg co mjpeg_play

Notes for the mjpegtools on MAC OS/X

The recording part (lavrec) will not work on MAC OS. That part is specific to Linux. Usually you also won't need the movtar library - don't worry about not having libmovtar. You won't also have the jpeg-mmx. The MMX is a X86 specific part. The jpeg-mmx library is primarily used by the MJPEG recording and processing but not by the encoder (mpeg2enc).
But you should see here a yes: checking for PowerPC architecture...
The Altivec optimizations will automatically be enabled on G4 based systems and that greatly speeds up the encoding process.

We don't say that binary packages are bad in every way. We are not that familiar with compiling the binary stuff, and packing it. If someone creates that packages we will welcome them, and add them to the file releases on sourceforge.

For every other user that wants to download binary stuff. Without compiling for the own machine you can download : mpeg2enc and mplex.

If you have problems downloding the versions you shoud hold the "Option" key (labelled with ALT on german keyboards) and press than the link !!
If you click the link and get lines of greek instead of a download, then use "option-click"

If you want a newer version of the mjpegtools. You can download the static compiled CVS version from the 29.August.2004. This is also binary stuff. They should work well on a OSX 10.3.x but might not work on a OSX 10.2. or older. osx.cvs.tar.gz

We also provide two precompiled binaries. Note: If you have problems downloading them e.g. get lines of greek), then hold the "Option" key (labelled with ALT on german keyboards) before you click the link!
So without compiling for the own machine you can download : mpeg2enc.intel and mplex.intel.

Brought into that from by Bernhard Praschinger (waldviertler at users.sourceforge.net).
Steven M. Schultz (sms at 2bsd.com) provided the information.

If you really want to know why we wrote that text. Here is a nice saying that describes why:
Give a man a fish, you feed him for a day. Teach a man how to catch a fish and you feed him for a lifetime.