Movies

From GRASS-Wiki
Revision as of 17:29, 2 October 2006 by Neteler (talk | contribs) (hints from Hamish added)
Jump to navigation Jump to search

Q: If anyone has tips on constructing high-quality MPEG-4 movies (animations) from a series of still frames, I'd be interested in hearing them.

Maris wrote:

Encode all .png files in directory to out.avi with 15 frames per second:

mencoder "mf:///path/to/files/*.png" -mf fps=15 -o out.avi # put -ovc here, see next lines

## for DivX - libavcodec MPEG 4 (DivX5), use (<- seems to be unreadable by MS-Windows player):
-ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=1800
## for XviD, use:
-ovc xvid -xvidencopts bitrate=1024
## for DivX4, use:
-ovc divx4 -divx4opts q=5

Uses mplayer's encoder. Choose one of encoding formats and append to end of "mencoder" line. Unfortunately only way to know quality settings is by encoding, watching result and reendocing with different params.


Q: How to generate an animated GIF, FLI, or MNG?

A: for animations of 300 frames or less, animated GIF, FLI, or MNG formats are smaller files and better quality (ie frames stored as PNG not JPEG). Create with gifsicle, ppm2fli, or for MNG use ImageMagick's 'convert'. With more than 300 frames the players usually have memory issues. Animated GIFs are playable in any web browser of course and also in OpenOffice.