Movies: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
(new question)
(hints from Hamish added)
Line 20: Line 20:


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


A: todo
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 [http://www.lcdf.org/gifsicle/ gifsicle], [http://vento.pi.tu-berlin.de/fli.html ppm2fli], or for MNG use [http://www.imagemagick.org/ 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.


[[Category:FAQ]]
[[Category:FAQ]]

Revision as of 17:29, 2 October 2006

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.