[Paraview] compiling ffmpeg for paraview on mac os x

Michael Wild themiwi at gmail.com
Sat Apr 26 10:40:55 EDT 2008


Hi all


I tried to get ffmpeg to compile the way as described in http://www.vtk.org/files/support/ffmpeg_source.tar.gz 
  for use in ParaView 3.3.0 CVS. But the instructions are quite stale  
and the included source does not compile on intel macs. So I pulled  
the current HEAD from ffmpeg subversion repository, but found it to be  
in a state which doesn't compile. I then extracted the tar.gz provided  
by fink (versioned ffmpeg-0.4.20071217) which compiles cleanly.  
However, there seems to be a change in the API which required me to  
remove the & in the expression url_fclose(&this->avFormatContext->pb)  
of the file VTK/IO/vtkFFMPEGWriter.cxx.

Things compiled now, but whenever I try to export a movie, ffmpeg  
reports on the command line that "[msmpeg4 @ 0x581c810]bitrate  
tolerance too small for bitrate" and ParaView tells me that  
"vtkFFMPEGWriter (0x1ce649b0): Error initializing video stream."

Ok, but in binary distribution of ParaView-3.2.1 things work, so I  
tried to figure out which version of ffmpeg has been used for the  
creation of that particular binary. I figured out that the ffmpeg  
revision used must be in the range 6350-6639, because otherwise the  
library versions don't match. But which of these 290 revisions? I  
tried some, namely 6350 and 6639, but both do not compile properly.  
For the latter I had to hack the configure script to create a valid  
config.mak and the common.mak I had to change in order to prevent the  
thing trying to link libavutil against itself (quite idiotic...).  
Finally things failed when the assembler choked on non-relocatable  
assembly code in libavcodec/cabac.h. Configuring ffmpeg to create  
static libraries however worked. But then linking libvtkIO requires  
the "-read_only_relocs suppress" flag to be set (which I'm not quite  
sure about what it does)...

At that point compiling succeeded, and I could even create an avi  
movie. However, the output is just black.

I hope that someone from the developer team can shed some light on how  
to get ffmepg working with paraview on Mac OS X.

Michael


More information about the ParaView mailing list