[Thread Prev][Thread Next][Index]
Re: Movies/Animations (gif to mpeg)
Hi Jeremy,
I've used mpeg_encode and it works fine. One difference, however, is that
I use giftopnm to convert the GIF input to PNM before creating the movie.
The utility giftopnm comes with the Debian and RedHat Linux distributions
(should also be available with Suse). On RedHat 6.1, it is bundled in
libgr-progs-2.0.13-20. I couldn't figure out how to use YUV on Linux.
I am attaching my parameter file, but before doing anything, check if you
are playing the MPEG on a 24 or 16 bit display. The GIFs are 8-bit, as is
the MPEG animation. Playing on a better display requires use of the option
"-dither color" (normally, mpeg_play should do this itself).
My parameter file (attached) is similar to yours, except for changes
made (after considerable experimentation) to the *QSCALEs and to the
PSEARCH algorithm --- EXHAUSTIVE gave best quality.
Note that MPEG animations consist of I, P, and B frames. The I frames
simply convert the GIF (or whatever) without doing any compression,
resulting in the best possible quality (comparable to the original GIFs).
Compression increases on using P and B frames. The following table from
the mpeg_encode users guide may help you decide how to mix these frames.
(I stuck to IBBPBBPBBPBBPBB, the default, because the result was
acceptable to me. I had to burn many movies on to a CD, necessitating
compression.)
Frame type Compression Speed Quality
I 1000 1000 1000
P 409 601 969
B 72 260 919
Using P and B frames forces the MPEG player to interpolate between frames
to play the animation. Another flip side to using P and B frames, so
necessary for compression, is that not all MPEG players seem capable of
playing them; all can, however, play the I frames. The UN*X/Linux program,
mpeg_play, can play whatever you encode with mpeg_encode.
Regards, Shankar.
P.S.: I've created MPEG animations from ferret GIFs on Debian GU/Linux 1.3
and 2.1, and on RedHat 6.1. Whirlgif is good too, especially for web
movies, but it does not permit compression.
D. Shankar Ph. (O): [91](832) 22 6253 * 4312/4400
Physical Oceanography Division, 22 1322 * 4312/4400
National Institute of Oceanography, (R): [91](832) 23 8208
Dona Paula, Fax : [91](832) 22 3340/9102
Goa 403 004, email : shankar@csnio.ren.nic.in
India. shankar@darya.nio.org
# parameter file with good default values
#
# use this as a guideline for any parameters you don't really understand
# or don't care about
#
PATTERN IBBPBBPBBPBBPBB
OUTPUT nonlinear.mpg
BASE_FILE_FORMAT PNM
GOP_SIZE 30
SLICES_PER_FRAME 1
PIXEL HALF
RANGE 10
#PSEARCH_ALG LOGARITHMIC
PSEARCH_ALG EXHAUSTIVE
BSEARCH_ALG CROSS2
#IQSCALE 8
#PQSCALE 10
#BQSCALE 25
IQSCALE 1
PQSCALE 1
BQSCALE 1
GAMMA 1.2
FORCE_ENCODE_LAST_FRAME
REFERENCE_FRAME DECODED
INPUT_DIR .
INPUT_CONVERT giftopnm *
INPUT
s.gif.~*~ [1-122]
END_INPUT
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement