[GRASS-dev] Re: Nviz animation wish

Glynn Clements glynn at gclements.plus.com
Thu Jan 25 23:42:02 EST 2007


Hamish wrote:

> > 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.

Right. I suspect that you need to use libavformat to wrap the stream
inside an AVI (or similar) container.

Ultimately, the only sane approach to generating animation is to write
out a sequence of image files then use a dedicated encoding program
such as ffmpeg. Video encoding is a complex task with many parameters.
Any built-in encoding functionality is inevitably going to do a
half-baked job.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list