|
Old
instructions for mjpegtools-1-4-1.
I've gotten partway to getting the instructions in for the newer version
of mjpegools but since I am not finished, I thought it would make sense
to keep the old ones, which did work at least, around for a little while
longer.
You can also return to the main mpeg/vcd page.
A working
path to (S)(X)VCD
Note: This
is slowly getting out of date; mjpegtools has advanced to a newer version
since I put this together, and I haven't tried the existing patch files
on the new version or tried to create new patch files for the new version.
If you happen to have done this, send them to me and I'll post them
here (and if you happen to have interest in helping the mjpegtools development
team keep the Mac OS X port up-to-date, last I heard they were looking
for somebody). Chris Frank--who had previously gotten
a number of useful utilities to compile and had found a path to VCD
from Quicktime files under Mac OS X and who had given me tips on how
to get things to compile--worked through the things he installed from
square one and provided me with a good step-by-step procedure to get
the system he uses up and running. Huge thanks to him. My future projects
will include attempts to tweak the MPEG encoding step, etc., but here's
something that actually seems to work, so I'll recreate his instructions
here with some additional annotations. These instructions rely heavily
on fink, a package distribution
system which is still in its infancy, but is growing quickly, so we'll
start with instructions for installing fink and then proceed from there
(much of this is handled automatically after that). Note: It takes quite
some time to compile some of these packages, so it will take a while
to get it running. What fink does is basically download the source code,
apply necessary patches, compile, and install the packages, so you will
be building everything from scratch (hence the time). If you try
this, let me know how it works. I ran through the steps but I've
been working on this so long that it's possible I had something extra
installed that made it work, or maybe there are typos somewhere. I think
it's working, but confirmation (or "bug reports") would be
helpful.
- Install the Developers Tools for Mac OS X. The Developers Tools
come on a CD with Mac OS X, and there is an update at http://connect.apple.com
for ADC members. The type of membership needed to download the update
is free I'm pretty sure (I don't remember paying anything), you probably
just need to sign up. This was so long ago now I can't quite remember.
You can even download the full CD (May 2001 update) from here, though
it's a big download. I actually hadn't installed the update
by the time I ran through these steps outlined here.
- Install fink.
- Go to the fink
download page and download it (I tested this with fink 0.2.5).
There is a binary installer available, which installs using the
standard OS X package installer, and this is the simplest method.
There are also instructions for how to build and install it yourself
from the source code, if you so desire. My own path to fink 0.2.5
involved installing the binary for a previous version with the
OS X installer and then updating with the source, but I assume
just starting with the binary package installer won't cause any
real trouble. Follow any instructions you are given.
- Several packages are already available via fink, but we need to
add a few more. Perhaps these too will soon become available via fink,
but for now we can do it manually. Fink stores all of its information
in a directory called /sw and its subdirectories.
This includes information on what packages are available and which
of those are stable. What we will be doing is reassigning one package
to "stable" from "unstable" (at some point in
the near future, this will presumably no longer be necessary, as this
package will become stable) and we will be inserting some of our own
package-building descriptions.
- Download the following files (click-and-hold on the link, then Download
file... or whatever is appropriate for your browser). I will assume
you are downloading them straight into your Home directory, and will
refer to them below like ~/filename.
If you put them someplace else (like in a Downloads folder in your
Home directory), you will need to revise the four relevant cp
commands accordingly (e.g., cp ~/Downloads/filename
...).
- Enter the Terminal.
- Become root (using su, or sudo,
see above).
- cp /sw/fink/dists/unstable/main/finkinfo/games/sdl-1.2.2-1.info
/sw/fink/dists/stable/main/finkinfo/games
- cp ~/libmovtar-0.1.2-1.* /sw/fink/dists/stable/main/finkinfo/graphics
- This and the next three commands install unofficial fink installation
instructions for the packages we need
- cp ~/mjpegtools-1.4.1-1.* /sw/fink/dists/stable/main/finkinfo/graphics
- cp ~/quicktime4linux-1.4-1.* /sw/fink/dists/stable/main/finkinfo/graphics
- cp ~/vcdimager-0.7.9-1.info /sw/fink/dists/stable/main/finkinfo/graphics
- Having done that, you are free to remove those files you downloaded
above, we've copied them to where they need to go.
- We're now ready to do the big installation of everything we need.
You can do each step separately, or you can cram it all onto one line.
Note: if you have already used fink to install one of these
you can omit it, or not; fink will not re-compile something that you
already have the most recent version of (as long as you used fink
to install it originally). Do one of the following:
- fink install zlib libpng dlcompat glib
libjpeg readline libxml2 audiofile esound sdl libmovtar quicktime4linux
mjpegtools vcdimager
Once this starts, you may want to go make yourself several sandwiches
or go see a movie or something. I haven't actually tested it this
way, but it should work.
- fink install zlib
- fink install libpng
- fink install glib
(this will also install dlcompat,
it will ask you to confirm)
- fink install libjpeg
- fink install libxml2
(this will also install readline,
it will ask you to confirm)
- fink install esound
(this will also install audiofile,
it will ask you to confirm)
- fink install sdl
- fink install libmovtar
(this only installs a subset of the libmovtar
package, just the parts we need for mjpegtools)
- fink install quicktime4linux
- fink install mjpegtools
(note: the mkvcd/mksvcd
scripts it installs are not functional as installed; see instructions
below)
- fink install vcdimager
- One more thing that needs to be installed is bash.
This is not as yet available via fink. You can download an installer
package from Softrak
(go to the website, search for bash, download the disk image, run
the installer). It will install into /usr/local/bash,
the readme instructs you how to make a link to it. Follow the instructions.
We need this to run the scripts from mjpegtools.
Addendum: Rik Goyton recently informed me that bash
is now available from fink, but even
if you install it this way, you still need to make a symbolic link
from /bin/bash to the place where bash
is actually installed. The following command worked for him (executed
after bash is installed, so that the
bash scripts can find the interpreter):
- sudo ln -s /sw/bin/bash /bin/bash
- Finally, we need to edit the mjpegtools
scripts to point to the right place on your hard drive for its components
(this is necessary because fink installs things into the /sw
directory but many programs look for support programs in /usr/local).
- sudo emacs /sw/bin/mksvcd
- Use arrows to move down to the line which reads
BIN=/usr/local/bin
and change it to
BIN=/sw/bin
- Hit Ctrl-X, hit Ctrl-C,
hit y.
- sudo emacs /sw/bin/mkvcd
(Note: That's different from the previous
filename: This is mkvcd, previous was mksvcd.)
- Use arrows to move down to the line which reads
BIN=/usr/local/bin
and change it to
BIN=/sw/bin
- Hit Ctrl-X, hit Ctrl-C,
hit y.
- And you're done! Just to be sure, close your terminal window and
open a new one.
- You should now be able to do this:
- To make an SVCD:
- Have a Quicktime movie in this format (re-export it from
the Quicktime Player if you need to):
None, Stereo, 44.1 kHz, 16 bits Motion JPEG A, 720 x 480,
Movie FPS: 29.97. Note: For PAL SVCD, use 720 x 576
at 25 fps (thanks to Rik Goyton for pointing this out).
- mksvcd -h -S MyGreatMovie.mov
- vcdxgen -t svcd -o svcd.xml *.mpg
(or replace *.mpg with MyGreatMovie.mpg,
or whatever)
- vcdxbuild --cdrdao-file=MyGreatMovie
svcd.xml
- Burn the .img files (skip the
*_pause.img files) in Toast using
Toast's Multitrack XA mode.
- Note: I haven't personally tested this yet.
- To make a VCD:
- Have a Quicktime movie in this format (re-export it from
the Quicktime Player if you need to. I found that I had to
re-export a movie I had in 320x240 format, but perhaps we
can find a way around that, since probably yuvscale is capable
of scaling the movie itself):
None, Stereo, 44.1 kHz, 16 bits Motion JPEG A, 352 x 240,
Movie FPS: 29.97
- mkvcd -h -V MyGreatMovie.mov
- vcdxgen -t vcd2 -o vcd.xml *.mpg
(or replace *.mpg with MyGreatMovie.mpg,
or whatever)
- vcdxbuild --cdrdao-file=MyGreatMovie
vcd.xml
- Burn the .img files (skip the
*_pause.img files) in Toast using
Toast's Multitrack XA mode.
- Note: Chris Frank reported to me that he's had trouble
making VCDs this way, indicating that the bit rate doesn't
get properly limited. I haven't tested this personally either,
but I've seen it work up to the burning stage.
- FWIW, on my first test, I encoded a 352x240 1:17 movie (2315
frames) this way and it took about an hour (!) to reach the
pre-burning stage on my 400Mhz 384MB G3 Graphite iMac DV/SE
(while I did other things like edit this file, so it was probably
not running at maximum speed). Not great.
- Incidentally, I hacked together a front-end to the ffmpeg
MPEG1 encoder and tried it out on a 10 second movie file and
it got about 5:1 speed (took about a minute), which seems much
more promising. I don't think the output was as good, but it
might be adequate. I'll try to run some real tests on longer
clips and compare them on my DVD player. If the ffmpeg hack
works, I'll post it as an alternate route, though right now
it's really a horrible hack.
Most recent edit:
March 16, 2002 4:32 PM
|