[GRASSLIST:4572] NVIZ output to MPEG animations: I'm lost in version hell

H. Bowman ihatejunkyabastards at yahoo.com
Tue Sep 24 08:28:43 EDT 2002


Hellos-

I've been experimenting with NVIZ animations, gotten very confused, and 
have come out the other end a little wiser, with it almost working, after 
a lot of dead ends, broken web links, and expired documentation.

E.g.  You convert RGB files into PPM files with the SGI to PNM converter 
(sgitopnm). ?!!?!  How logical. Many many man pages later...


I picked up the mpeg_encode program from the Berkeley FTP site as 
suggested in Neteler/Mitasova's Open Source GIS: A GRASS GIS Approach, and 
noticed the program is pretty old (circa 1995). I later discovered the 
ppmtompeg program, which came with my Linux distribution as part of the 
netpbm package. It seems to be a more modern version of the same project, 
by the same people.

Both seem to report being about version 1.5.
[ mpeg_encode: 1.5b Release August 1995          ]
[ ppmtompeg:   version 1.5 Updated: 14 July 2001 ]

Ok. They seem to be identical in usage, so I'll use the seemingly newer 
and already installed Netpbm version..

***
There's a massive help section at the Netpbm project's homepage which is 
definitely worth a look for those interested using the encoder:
http://netpbm.sourceforge.net/doc/ppmtompeg.html
***


I also searched for the make.mpeg script mentioned in section 8.2.3, which 
does not seem to exist anywhere. Is the idea that I should call my script 
make.mpeg??

A google search for make.mpeg did come back with a lot of helpful 
tutorials though, so not a total loss.


Now, the book (in section 8.1.4) also talks about using r.out.mpeg, which 
seems to require the same mpeg_encode program as suggested above, but the 
man page asks for Version 1.3; March 14, 1994. Shrug.

So I just made a symlink for mpeg_encode which points to ppmtompeg. And 
r.out.mpeg now runs! Hurrah! My first attempt doesn't seem to play in 
xine, but I haven't really tried properly yet.


Might checking for ppmtompeg be something to include in the ./configure 
script so a symlink gets created for mpeg_encode in the $GRASS/bin 
directory or somewhere more appropriate?? I assume all Linux 
distributions, at least, will probably pass the test, making the 
r.out.mpeg module work right out of the box for many people. Or change 
r.out.mpeg to look for ppmtompeg?


In section 8.2.3, the book also talks about rgb2gifanim, which as far as 
google is concerned, only exists in a couple of GRASS documents!?!


Has anyone had success encoding to MPEG-2 ? MPEG-1's are not very big or 
pretty, and these days whipping huge animation files off onto CD-R is no 
problem.. Or what about MPEG-4 - using an open codec like Xvid? NVIZ can 
make some stunning images, and it seems a pity for them to be trapped in a 
VHS quality movie format..


Thanks.



More information about the grass-user mailing list