[GRASS-dev] Re: Nviz animation wish
Hamish
hamish_nospam at yahoo.com
Thu Jan 25 18:22:35 EST 2007
William Kyngesburye wrote:
> > Michael - there is a file sequencing tool for that in nviz - I have
> > been doing it for years (I also had some of it at your workshop),
> > just check my website. My slides for the lausanne workshop should
> > have a description how to do it along with a sample data set. I need
> > to run now but I can write you more later.
> > It may be broken in the latest CVS but it worked well in 6.1
A link to that should be added to the animations help page on the wiki.
http://grass.gdf-hannover.de/wiki/Movies
(please)
[slight change of topic]
> As an alternative to directly in nviz, there is the r.out.mpeg
> module. You could create the ppms in nviz, then run those thru
> r.out.mpeg.
No, that is much more than is needed. Create series of PPM images with
NVIZ keyframe animator, then use mencoder (or similar [transcode?]) to
create the MPEG. see Maris's example:
http://grass.ibiblio.org/grass63/manuals/html63_user/nviz/nviz_panel_kanim.html
If less than 100 frames an animated GIF or PNG(MNG) might be a
preferable option.
> But that has a similar problem - no Mac binaries for the mpeg-encode
> program that it uses. And ancient code - I haven't tried building it
> yet, but I expect problems.
Again, not needed. r.out.mpeg will work fine with "ppmtompeg" which
comes with NetPBM tools. AFAIK this comes with MacOSX already.
ppmtompeg is mpeg-encode renamed; r.out.mpeg should work out of
the box, ie without ffmpeg.
> A possibility would be to rewrite the r.out.mpeg module to use the
> ffmpeg program or other mpeg encoder, which has readily available
> binaries. Or just run them manually thru ffmpeg.
IMO it would be much better to de-emphasise r.out.mpeg and rewrite as a
shell/python/perl script depending on mencoder (or similar FFMPEG tool).
Most of that module deals with creating the MPEG-1 encode spec file,
which is not needed with newer encoders.
Certainly MPEG-1 is too cruddy to consider using for new development.
What it has going for it is a (the only?) truly patent-safe encoder
and widespread codec use. The movies it makes are huge and of poor
quality.
> A question about the ffmpeg support - is it limited to just the
> mpeg-1 output, or can it use any format supported by ffmpeg?
Glynn:
> There is a compile-time option (USE_XVID) to use XviD instead. It
> should be straightforward to allow the user to specify the codec by
> name; there is already some (commented-out) code which attempts to do
> this, although it should be using avcodec_find_encoder_by_name().
> See lib/ogsf/gsd_img_ppm.c for details.
WRT the USE_XVID option -- I didn't finish that, it only writes the raw
stream and the output seems to be missing some header info. As such the
only player I found that would play the result was mplayer, which is
more forgiving. TODO: test with "mplayer -forceidx" & attempt fix with
mencoder (see -forceidx help in mplayer man page). Help appreciated.
Hamish
More information about the grass-dev
mailing list