[GRASS-dev] OSX FFMPEG build instructions available

Bob Covill bcovill at tekmap.ns.ca
Mon Dec 3 15:54:10 EST 2007


On Mon, 2007-12-03 at 09:08 +0000, Glynn Clements wrote:
> Hamish wrote:
> 
> > > > > I finally got back to FFMPEG on OSX.  It went fairly smooth this  
> > > > > time.  I added build instructions to the GRASS OSX readme.  My
> > > > > future OSX builds will now have ffmpeg support, yay!
> > > > > 
> > > > > Question: what is the minimum needed in the ffmpeg libraries for  
> > > > > GRASS?  I'm thinking of disabling codecs and formats that GRASS
> > > > > can't use to reduce the library size (a basic universal build
> > > > > without debug symbols added ~6.5MB to libgrass_ogsf!).  Or can
> > > > > GRASS use any codec available in ffmpeg?
> > > > 
> > > > It only uses MPEG-1. There's a compile-time option to use XviD, but
> > > > that gives you a "raw" XviD stream (no AVI etc container), which isn't
> > > > much use.
> > > > 
> > > 
> > > I have attached a patch for gsd_img_mpeg.c (ogsf) which is based on the
> > > later releases of ffmpeg (output_example.c). This uses a function
> > > guess_format to guess the format based upon the file extension given. If
> > > the format is unknown it reverts to mpeg1. With this patch you can save
> > > to any (almost) format supported by ffmpeg. For example you can save to
> > > asf, avi, flv, swf, etc. To use this with nviz the auto name extension
> > > in panel_kanimator.tcl will have to be commented out ...
> > > 
> > > #       if { [string compare $fnameExt ".mpg"] != 0  &&
> > > #               [string compare $fnameExt ".mpeg"] != 0 } then {
> > > #           append keyanimBaseName ".mpg"
> > > #       }
> > > 
> > > The patch needs testing, etc. 
> > > 
> > > Let me know if you have any questions.
> > 
> > I have applied this patch now in 6.3-cvs.
> 
> This patch causes NVIZ compilation to fail.
> 
> It causes the OGSF library to depend upon libavformat, but nothing in
> the patch adds -lavformat to the link command for libogsf.
> 
> I managed to work around the problem by hardcoding -lavformat into
> lib/ogsf/Makefile, but this should be done via configure and
> Platform.make, either by adding the relevant switch(es) to FFMPEGLIB
> or by adding a new variable.

The patch that I had sent out originally was just to upgrade the ogsf
lib. It will require -lavformat be added to configure(.in) so that
FFMPEGLIB in Platform.make includes it. 

The changes to  panel_kanimator.tcl listed above will also have be made
so that output filenames do not have the extension stripped and replaced
with "mpg".

--
Bob





More information about the grass-dev mailing list