[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Best Movie/Animation Format for LARGE files
- Subject: Re: Best Movie/Animation Format for LARGE files
- From: steve <steves(at)ruska.nrel.gov>
- Date: Tue, 22 Feb 2000 10:26:26 -0700
- Newsgroups: comp.lang.idl-pvwave
- References: <88q12k$44l$1@nnrp1.deja.com>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:18553
wcapehar@my-deja.com wrote:
> I have been working on some large image time series (long in time and
> large in size) and am wondering what the best format (jpeg/mpeg) for
> saving them with the least distortion to the frames.
>
> Ideas? (I'm already breaking up the time series into smaller clips.)
>
> Thanks much
> Bill Capehart
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Hi Bill:
Well, this is the one issue in this NG that I can add something to
the discussion (though I program in IDL for 5 years or so, I'm no
expert). I use direct graphics (too lazy to learn Object graphics) and
make animations from 1 MB to 300MB (mpeg's and mjpeg's). I don't
know if you can fix IDL's image quality problems, but I do know that
there is a default 'quality' factor of 50 or 75 % written into the MPEG
routines provided with IDL. I use a separate encoder, already mentioned
by another poster here, and generate frames in IDL. The quality is much
better than those produced in IDL (btw, IDL makes MPEG-2, while the
Stanford encoder, is MPEG-1, an older standard, but more common).
I use PPM or GIF format for the frames, as I recall, JPEG didn't give as
nice of results. I think the reason is JPEG is a lossy compression, and
the
Stanford encoder will take that JPEG and convert it to PPM and then to
.Y .U .V component files, then use the MPEG compression, so you are
compressing something that has already undergone compression. I could
be wrong about that, but my experience is JPEG gave lower quality
MPEG's.
GIF gives you nice clean colors and a small file size. PPM is akin to
TIFF
in that it is not compressed and has the full color palette included,
but is
much larger that GIF. I didn't see a difference for my animations in
terms
of quality when using GIF instead of PPM, though the frame file size is
much reduced.
I got to the stage where I couldn't hold all the frames of my animations
on disk,
and began to use MJPEG. I make each frame and then have IDL run a
shell script that compresses each frame into MJPEG format. The MJPEG
compression does not use intra-frame statistics, like MPEG does, so you
can avoid having to save all the frames on disk before encoding, like
you
would need to do if you make an MPEG. The exact format of MJPEG
will depend on your playback hardware, and you would need that hardware
to view the animation. If you have $$$, you could write the MJPEG to
DVD, though I hear the DVD writer is a small fortune. The MJPEG will
ultimately not achieve any more compression than MPEG, but you can
avoid the huge slew of frames in production. For instance, for my
animations,
with 30 frames/second, 720x480-24bit frames, that's 1.8GB / minute !
You can use lower frame rates, smaller frames, maybe lower color quality
to conserve disk space. Generally MPEG gives you about 30:1 compression.
In an ideal world, I would always use MPEG, as the movies look the best.
Since MPEG only uses a few frames for statistics, it should in principle
be possible to generate only a short sequence of frames and send these
to your own custom-compiled mpeg encoder, and get around having
to generate all the frames beforehand, but I don't know of an encoder
you could use for this. I haven't looked in detail into the Stanford
encoder
source, but it is freely available.