[osg-users] ffmpeg plugin on OS X / DarwinPorts

Ulrich Hertlein u.hertlein at sandbox.de
Tue Mar 3 01:25:46 PST 2009

Hi Robert,

On 3/3/09 7:51 PM, Robert Osfield wrote:
> The print out of the FFMPEG_INCLUDE_DIRS and FFMPEG_LIBRARIES is a bit misleading, as
> it is actually composed on separate strings like CMake picks up on correctly when

Thanks for that!  (Cmake is still a bit of a black box to me.)

> cd src/osgPlugins/ffmpeg ; make VERBOSE=1
> What errors do you see some errors in the compilation?   What version of the ffmpeg are
> you using?

ffmpeg version is a bit hard to say, DarwinPorts pulls SVN revision 15261...

I'm getting this error:
/usr/bin/c++   -DOSG_DEBUG_POSTFIX=d -Dosgdb_ffmpeg_EXPORTS  -Wall -Wparentheses 
-Wuninitialized -Wno-long-long -Wno-import -pedantic -Wreturn-type -Wmissing-braces 
-Wunknown-pragmas -Wunused -fpermissive -mmacosx-version-min=10.5 -ftree-vectorize 
-fvisibility-inlines-hidden -O3 -DNDEBUG -fPIC
-o CMakeFiles/osgdb_ffmpeg.dir/FFmpegClocks.cpp.o
-c /Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegClocks.cpp
In file included from 
error: avformat.h: No such file or directory
/opt/local/include/libavutil/mathematics.h:49: warning: comma at end of enumerator list

So it's not finding "avformat.h".  DarwinPorts puts 'avformat.h' in

(ffmpeg/avformat.h is a symlink to ../libavformat/avformat.h)

Since "pkg-config --cflags libavformat" is returning
-I/opt/local/include -I/opt/local/include/dirac

it appears that the required #include (in FFmpegHeaders.hpp) would be:
#include <ffmpeg/avformat.h>

rather than what it is now:
#include <avformat.h>

Can we change that without breaking compiles on other systems?

There are follow-up errors that I'm currently looking at.


More information about the osg-users mailing list