Steven M. Schultz:
 [was: Maximum video buffer size with mpeg2enc, Mac options]
 > <http://mjpeg.sourceforge.net/MacOS/>
 > Is someone updating those mpeg2enc and mplex Mac OS X binaries or
 > should I bite the bullet and learn to do it myself?

 I forget when I tweeked the Makefiles to get a static linked version of
 the encoder and mplex - quite some time ago.

 The situation is quite a bit more complex now though because mpeg2enc
 _and_ mplex have been split into frontends and shared libraries - not
 sure if a simple static build is possible (it might be but that would
 end up defeating the purpose of the work done to create shared libraries
 that can be used with other programs).

 Ideally the rest of the mjpegtools (except for the V4L specific parts of
 course) would be a good thing to have - lav2yuv, yuvdenoise,
 yuvmedianfilter, yuvplay, lavplay, and all the rest. Now things get
 messy. Bundling in libdv (which I have), libSDL (for the video out, SDL
 is a breeze to build and it takes advantage of the Quartz graphics
 subsystem), possibly libglib and libgtk, libpng, and possibly others
 I've overlooked.

 Oh, probably also want y4mscaler too. Packaging bunches of stuff
 together into whatever format for binary installation isn't something
 I'm familiar with - maybe it's easier than it sounds but maybe it's
 harder.

 Creating everything as a static executables makes the files a lot bigger
 of course.

 > Are there many other Mac OS X users on this list? How do you use
 > mjpegtools? Via a GUI front-end or via the terminal?

 I don't know if I count or not ;) I've been building mjpegtools,
 mplayer, libdv, ffmpeg, smilutils, mpeg2dec, SDL, and a bunch of other
 stuff on OS/X since I got my Powerbook back in Feb/Mar of this year.
 Don't do a lot of encoding on it other than for testing though because a
 1GHz G4 gets pretty darn slow - mpeg2enc itself can get around 7
 frames/sec on preprocessed YUV4MPEG2 data. If any conversion (lav2yuv or
 smil2yuv) and scaling or filtering is done then that slows it down a lot
 (although "smilutils" built using ffmpeg's DV codec is Altivec enabled
 and is a lot faster than libdv's on a G4). Most of the encoding is done
 on dual Athlon-2800 or P4-2.2GHz systems. One of those nice dual 2GHz G5
 tower systems is on the "toy/wish list" for next year though ;)

I use mjpegtools (not just mpeg2enc+mplex) like this:

 ----------
 #!/bin/sh

 smil2yuv -a foo.wav -i 2 fire-master.dv | \
     y4mscaler -v 0 -O chromass=420_MPEG2 | \
     bfr -b 10m | \
     mpeg2enc -f 8 -E -5 -M 2 -R 0 -q 4 -K tmpgenc -4 2 -2 1 -o foo.m2v
 toolame -b 192 -o foo.wav foo.mpw
 mplex -f 8 -o foo.mpg foo.m2v foo.mp2
 ------------

Thanks for the info, I'm making slow progress but I'm not there yet because I'm still stuck at an old version of mjpegtools 1.6.1 without newer -K -N options.


(I first tried to compile everything <http://mjpeg.sourceforge.net/MacOS/> suggested myself but the dependencies seemed so overwhelming that I then tried Fink package manager with better success. I compiled many packages but then got stuck somewhere between libdv, JPEG-MMX, libquicktime and finally messed the system by mixing both Fink and Opendarwin ports which apparently is bad. I then reinstalled only Fink).

So far I have successfully compiled an old version of mjpegtools 1.6.1 with:

- Mac OS X 10.2 and the latest Developers Tools (Dec2002DevToolsCD.dmg) and the latest gcc updater (August2003gccUpdater.dmg).

<https://connect.apple.com/>

- Fink package manager (Fink 0.6.2 Installer.dmg).

<http://fink.sourceforge.net/>
<http://fink.sourceforge.net/download/bindist.php>

- Activated all of unstable in Fink:

Trees: local/main stable/main stable/crypto local/bootstrap unstable/main unstable/crypto

- Fink succesfully compiled an older version of mjpegtools 1.6.1:

fink install mjpegtools [chose xfree86]

The following package will be installed or updated:
 mjpegtools
The following 45 additional packages will be installed:
 audiofile audiofile-bin audiofile-shlibs autoconf2.5 automake
 automake1.6 dlcompat dlcompat-dev dlcompat-shlibs esound esound-bin
 esound-shlibs glib glib-shlibs gtk+ gtk+-data gtk+-shlibs libdv4
 libdv4-shlibs libgnugetopt libgnugetopt-shlibs libjpeg libjpeg-bin
 libjpeg-shlibs libmovtar libogg libogg-shlibs liboss1 liboss1-shlibs
 libpng3 libpng3-shlibs libquicktime0 libquicktime0-bin
 libquicktime0-shlibs libvorbis0 libvorbis0-shlibs m4 mjpegtools2-shlibs
 pkgconfig popt popt-shlibs sdl sdl-shlibs xfree86 xfree86-shlibs

Compiling stopped to an error message:

ld: table of contents for archive: /sw/lib/libintl.a is out of date; rerun ranlib(1) (can't load from it)

<http://fink.sourceforge.net/faq/comp-general.php#toc-out-of-date>

...read the instructions and fixed it with:

sudo ranlib /sw/lib/libintl.a

Then continued compiling:

fink install mjpegtools [chose xfree86]

The following package will be installed or updated:
 mjpegtools
The following 19 additional packages will be installed:
 autoconf2.5 automake automake1.6 gtk+ gtk+-data gtk+-shlibs libdv4
 libdv4-shlibs libmovtar libquicktime0 libquicktime0-bin
 libquicktime0-shlibs mjpegtools2-shlibs popt popt-shlibs sdl sdl-shlibs
 xfree86 xfree86-shlibs

- Fink successfully installed mjpegtools-1.6.1.tar.gz while the latest version is mjpegtools-1.6.1.93.tar.gz. I then activated CVS:

fink selfupdate-cvs
fink install mjpegtools
/usr/bin/sudo /sw/bin/fink  install mjpegtools
Information about 2928 packages read in 2 seconds.
No packages to install.

...So it seems that CVS is not be updated to the latest version in Fink.

Fink-beginners mailing list guru suggested that I write to the Fink mjpegtools package maintainer James Watson <[EMAIL PROTECTED]> (address from "fink info mjpegtools") but I haven't got a reply yet.

I then tried to follow the compile-myself FAQ entry but the instructions are somewhat obscure to a newbie like me.

<http://fink.sourceforge.net/faq/usage-general.php#compile-myself>:

 Q: How do I compile something myself using Fink-installed software? A:
 When compiling something yourself outside of Fink, the compiler and
 linker need to be told where to find the Fink-installed libraries and
 headers. For a package that uses standard configure/make process, you
 need to set some environment variables:

 setenv CFLAGS -I/sw/include
 setenv LDFLAGS -L/sw/lib
 setenv CXXFLAGS $CFLAGS
 setenv CPPFLAGS $CXXFLAGS
 setenv ACLOCAL_FLAGS "-I/sw/share/aclocal"
 setenv PKG_CONFIG_PATH "/sw/lib/pkgconfig"

 It is often easiest just to add these to your .tcshrc or .cshrc so they
 are set automatically. If a package does not use these variables, you
 may need to add the "-I/sw/include" (for headers) and "-L/sw/lib" (for
 libraries) to the compile lines yourself. Some packages may use similar
 non-standard variables such as EXTRA_CFLAGS or --with-qt-dir= configure
 options. "./configure --help" will usually give you a list of the extra
 configure options.

 In addition, you may need to install the development headers (e.g.
 foo-1.0-1-dev for the library packages that you are using, if they
 aren't already installed.

I did add the setenv lines to my .cshrc but after "./configure" "make" stops to an error:


[...]
cpu_accel.c: In function `bufalloc':
cpu_accel.c:255: error: `_SC_PAGESIZE' undeclared (first use in this function)
cpu_accel.c:255: error: (Each undeclared identifier is reported only once
cpu_accel.c:255: error: for each function it appears in.)
cpu_accel.c:268: warning: int format, size_t arg (arg 2)
cpu_accel.c:270: warning: int format, size_t arg (arg 2)
cpu_accel.c:270: warning: int format, size_t arg (arg 3)
make[3]: *** [cpu_accel.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

thanks for any help,

--
Matti Haveri <[EMAIL PROTECTED]> <http://www.sjoki.uta.fi/~shmhav/>


------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Mjpeg-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to