[vtkusers] compiling VTK with FFMPEG support on MacOSX 10.6

Nicolas Rannou nicolas_rannou at hms.harvard.edu
Wed Mar 17 16:36:17 EDT 2010


Hi Alex,

which version of FFMPEG do you use?
I had this error but I can't reproduce it...

You can try to configure FFMPEG without matroska...
I also noticed that configuring/building FFMPEG with shared libraries 
can solve some compilation errors and it seems that vtkFFMPEGWriter is 
working properly at runtime.

Moreover, for some reason the test for the FFMPEG writer in VTK, 
IOCxxTests #4 doesn't always succeed (floating point exception, 
depending on  machine used), even if I can use the vtkFFMPEGWriter 
properly in my project...

    Nicolas

Alexandre GOUAILLARD wrote:
> hi all,
>
> I compiled FFMPEG with default configuration.
> WHen trying to compile VTK with USE_FFMPEG flag ON, it did not find
> some symbols.
> Undefined symbols:
>   "_BZ2_bzDecompressEnd", referenced from:
>       _matroska_decode_buffer in libavformat.a(matroskadec.o)
>   "_BZ2_bzDecompress", referenced from:
>       _matroska_decode_buffer in libavformat.a(matroskadec.o)
>   "_BZ2_bzDecompressInit", referenced from:
>       _matroska_decode_buffer in libavformat.a(matroskadec.o)
>
> adding bz2 to the list of libraries in /IO/CMakeLists.txt did the job.
>
> Maybe there is something cleaner ( APPLE flags, checking if bz2
> exists, ...) to do to make it work out of the box?
>
> #-----------------------------------------------------------------------------
> # FFMPEG
> # If the ffmpeg library is available, compile vtkFFMPEGWriter.
> IF (VTK_USE_FFMPEG_ENCODER)
>   INCLUDE(${VTK_CMAKE_DIR}/vtkTestFFMPEG.cmake)
>
>   CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/vtkFFMPEGConfig.h.in
>                  ${CMAKE_CURRENT_BINARY_DIR}/vtkFFMPEGConfig.h @ONLY)
>   INCLUDE_DIRECTORIES(${VTK_BINARY_DIR}/IO)
>   INSTALL(FILES vtkFFMPEGConfig.h
>     DESTINATION ${VTK_INSTALL_INCLUDE_DIR_CM24}
>     COMPONENT Development)
>
>   INCLUDE_DIRECTORIES(${FFMPEG_INCLUDE_DIR})
>   SET(Kit_SRCS ${Kit_SRCS} vtkFFMPEGWriter.cxx)
>   SET(KIT_LIBS ${KIT_LIBS}
>     ${FFMPEG_avformat_LIBRARY}
>     ${FFMPEG_avcodec_LIBRARY}
>     ${FFMPEG_avutil_LIBRARY}
>     bz2)        ####### <<=== ######### MODIFIED ##################
>   IF (NOT VTK_FFMPEG_HAS_IMG_CONVERT)
>     SET(KIT_LIBS ${KIT_LIBS}
>       ${FFMPEG_swscale_LIBRARY})
>   ENDIF (NOT VTK_FFMPEG_HAS_IMG_CONVERT)
> ENDIF (VTK_USE_FFMPEG_ENCODER)
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>   




More information about the vtkusers mailing list