[GRASS5] RE: [bug #4140] (grass) Nviz doesn't start either from GUI or CLI

Bob Covill bcovill at tekmap.ns.ca
Thu Mar 16 10:33:36 EST 2006


On Thu, 2006-03-16 at 14:36 +1300, Hamish wrote:
> > I dug back into some of my old archives from when I had looked into
> > going back to an nviz start-up script. 
> 
> what's the advantage of starting from a script? disadvantage?

I had originally got rid of the script startup to take better advantage
of G_gisinit to handle command line options, etc. As an example with the
script, typing 'nviz -h' you would get a list of help options for wish.
The disadvantages of not using a script seem to be the reported problem
of running nviz in the background (nviz -q &), and also TCL related
errors are not reported to stderr, which is not very helpful for
tracking problems down. There are also advantages to starting nviz from
a script listed in the "wish" man page at
http://www.tcl.tk/man/tcl/UserCmd/wish.htm .

I am not a script expert, but we probably should go back to a script
startup making sure that everything is properly passed to the GRASS
parser (unless in script mode).


> 
> The attached patch will change the NVIZ animation encoding codec from
> MPEG-1 to the much nicer Xvid. It's a proof of concept hack, but
> functional. Even with a 5x bitrate the Xvid file size isn't all that
> much bigger than the MPEG-1 file, but the quality is way better. I don't
> think the Ogg Theora is working, but I didn't really spend any time on
> that. Also I know the Xvid codec has a "cartoon mode", but I couldn't
> find where to assert that. It might be useful to try.
> 
> I think it's good to give the user the option to use a better codec than
> MPEG-1, either by another Tcl radio button for Xvid or an arbitrary
> codec taken from an environmental variable (or g.gisenv grass variable)
> if given.
> 
> Which approach do you think is best?

I had used the MPEG-1 codec because it comes with FFMPEG and does not
require additional packages. The problem with XVID is that support is
not built by default into FFMPEG. It rquires the xvidcore package. The
same applies for Theora (requires libtheora). If they are available, it
would be good to output a nicer animation. 

What I had hoped was that we could eventually add a "Video Options"
where the user sets the output format, output codec and associated
options. Maybe these could be dynamically created from something like
(ffmpeg -formats) to get the list of available codes?

> 
> 
> Hamish

--
Bob




More information about the grass-dev mailing list