[GRASSLIST:358] Re: NVIZ : getting a script to run

H Bowman hamish_nospam at yahoo.com
Wed Jun 11 22:40:44 EDT 2003


> * I now have nice '.RGB' or '.PPM ' files (well, the ones that are
> usable), weighting each several hundreds of kb, if not several Mb,
> which causes a problem of space. Is there a trick to run a conversion
> command in the nviz script ? I'd like to store the pictures as .PNG,
> as I can always transform a PNG in PPM during the creation of a MPEG
> (quality is less important than size in my case), and cannot really
> wait for the exportation to end before startng the conversion.

Use the ImageMagick tools:
pnmtopng < dump.ppm > dump.png
sgitopnm < dump.rgb | pnmtopng > dump.png

and to make YUV files for mpeg2enc (mjpeg tools) use:
ppmtoyuv

mencoder from the mplayer people may also be helpful to you.

gifsicle is pretty good for making GIF animations as well..


Also there is ppmtompeg for creating poor-quality MPEG-1s. (aka UCB's
mpeg_encode, as requried by r.out.mpeg: make a symlink somewhere in
$PATH to get this working)


I'll get around to writing a small GRASS/NVIZ MPEG1/2/4 howto at some
point.


re. double buffered screen dumps and key-frame animation scripting- you
might try the CVS version of NVIZ.. there seems to be a lot of good
things happening there right now.


> * I'm embedding the nviz script in a larger bash script,as a here
> document. Everything runs pretty smoothly (after escaping the $ of
> course), but how do I quit nviz (still staying  in the parent script)
> ?

killall nviz
;)
but maybe you want something cleaner.



regards,
Hamish




More information about the grass-user mailing list