|
[Sponsors] |
Paraview 3.12 - How to compile with ffmpeg for animation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 17, 2012, 00:08 |
Paraview 3.12 - How to compile with ffmpeg for animation
|
#1 |
New Member
Eric
Join Date: Aug 2010
Posts: 14
Rep Power: 16 |
Hello, In the previous version of OpenFoam 1.7.1 and paraview 3.8, I could easily create an animation of my results in AVI format.
I have recently upgraded to OpenFoam 2.1.0 / Paraview 3.12. Now when I try to save an animation in paraview, the only options are jpg, png, tif. There is no option for AVI. However Paraview does create a whole series of jpgs in the case folder. I think I need to recompile paraview with ffmpeg support. I already have ffmpeg installed. In the file /mnt/data3/OpenFOAM/ThirdParty-2.1.0/ParaView-3.12.0/VTK/CMakeLists.txt, I changed the following line to TRUE: OPTION (VTK_USE_FFMPEG_ENCODER "If the FFMPEG library is available, should VTK use it for saving .avi animation files?" TRUE) but now I'm getting a compilation error when I rebuild paraview: Code:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: /mnt/data3/OpenFOAM/ThirdParty-2.1.0/ParaView-3.12.0/VTK/FFMPEG_INCLUDE_DIR used as include directory in directory /mnt/data3/OpenFOAM/ThirdParty-2.1.0/ParaView-3.12.0/VTK/IO FFMPEG_avcodec_LIBRARY linked by target "vtkIO" in directory /mnt/data3/OpenFOAM/ThirdParty-2.1.0/ParaView-3.12.0/VTK/IO FFMPEG_avformat_LIBRARY linked by target "vtkIO" in directory /mnt/data3/OpenFOAM/ThirdParty-2.1.0/ParaView-3.12.0/VTK/IO FFMPEG_avutil_LIBRARY linked by target "vtkIO" in directory /mnt/data3/OpenFOAM/ThirdParty-2.1.0/ParaView-3.12.0/VTK/IO FFMPEG_swscale_LIBRARY (ADVANCED) linked by target "vtkIO" in directory /mnt/data3/OpenFOAM/ThirdParty-2.1.0/ParaView-3.12.0/VTK/IO -- Configuring incomplete, errors occurred! Thanks, Eric |
|
January 17, 2012, 04:19 |
|
#2 |
Disabled
Join Date: Mar 2011
Posts: 174
Rep Power: 15 |
Why not create a movie from the jpg files (=frames)?
I used the command: mencoder -ovc copy -mf w=1164:h=752:fps=20:type=jpg 'mf://*.jpg' -o output.avi and then you can convert it to anything you want. |
|
January 17, 2012, 19:07 |
|
#3 |
New Member
Eric
Join Date: Aug 2010
Posts: 14
Rep Power: 16 |
Your suggestion works well! Thanks anon_a
|
|
January 18, 2012, 09:50 |
|
#4 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
Or, if you want to take the long way out and actually compile ParaView with ffmpeg support, toggle advanced options during ccmake (if you have CMake installed with libcurses support, or use the -D[option-name] at the command line), and search/specify the FFMPEG-related entries, where you have to specify the location of your ffmpeg headers and libraries.
After cycling through configuration in cmake, generate the Makefile and compile ParaView as usual. You should then see avi output support for animations. |
|
January 19, 2012, 21:49 |
|
#5 |
New Member
Eric
Join Date: Aug 2010
Posts: 14
Rep Power: 16 |
Hi Sandeep, Thanks for the tip, I installed ccmake and now the cmake gui works. If I run ccmake in the main folder /mnt/data3/OpenFOAM/ThirdParty-2.1.0/ParaView-3.12.0 and toggle advanced options, I get a list of the following configuration flags, but none of them seem related to ffmeg. Maybe the paraview that comes with the openfoam thirdparty tools is somehow packaged differently? Any ideas?
Code:
CMAKE_AR /usr/bin/ar CMAKE_BUILD_TYPE CMAKE_COLOR_MAKEFILE ON CMAKE_CXX_COMPILER /usr/bin/c++ CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG -g CMAKE_CXX_FLAGS_MINSIZEREL -Os -DNDEBUG CMAKE_CXX_FLAGS_RELEASE -O3 -DNDEBUG CMAKE_CXX_FLAGS_RELWITHDEBINFO -O2 -g CMAKE_C_COMPILER /usr/bin/gcc CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG -g CMAKE_C_FLAGS_MINSIZEREL -Os -DNDEBUG CMAKE_C_FLAGS_RELEASE -O3 -DNDEBUG CMAKE_C_FLAGS_RELWITHDEBINFO -O2 -g CMAKE_EXE_LINKER_FLAGS CMAKE_EXE_LINKER_FLAGS_DEBUG CMAKE_EXE_LINKER_FLAGS_MINSIZE CMAKE_EXE_LINKER_FLAGS_RELEASE CMAKE_EXE_LINKER_FLAGS_RELWITH CMAKE_INSTALL_PREFIX /usr/local CMAKE_LINKER /usr/bin/ld CMAKE_MAKE_PROGRAM /usr/bin/make CMAKE_MODULE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS_DEBU CMAKE_MODULE_LINKER_FLAGS_MINS CMAKE_MODULE_LINKER_FLAGS_RELE CMAKE_MODULE_LINKER_FLAGS_RELW CMAKE_NM /usr/bin/nm CMAKE_OBJCOPY /usr/bin/objcopy CMAKE_OBJDUMP /usr/bin/objdump CMAKE_RANLIB /usr/bin/ranlib CMAKE_SHARED_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS_DEBU CMAKE_SHARED_LINKER_FLAGS_MINS CMAKE_SHARED_LINKER_FLAGS_RELE CMAKE_SHARED_LINKER_FLAGS_RELW CMAKE_SKIP_RPATH OFF CMAKE_STRIP /usr/bin/strip CMAKE_USE_RELATIVE_PATHS OFF CMAKE_VERBOSE_MAKEFILE OFF GIT_EXECUTABLE GIT_EXECUTABLE-NOTFOUND |
|
January 20, 2012, 09:45 |
|
#6 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
Not sure if you're doing the build process correctly. Follow the instructions at:
http://www.paraview.org/Wiki/ParaView:Build_And_Install Hope this helps. |
|
January 21, 2012, 22:08 |
|
#7 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
Here's a few more solutions:
Code:
FFMPEG_INCLUDE_DIR:PATH=$WM_THIRD_PARTY_DIR/build/linux64Gcc/SuperBuild/include FFMPEG_avcodec_LIBRARY:FILEPATH=$WM_THIRD_PARTY_DIR/build/linux64Gcc/SuperBuild/lib/libavcodec.so FFMPEG_avformat_LIBRARY:FILEPATH=$WM_THIRD_PARTY_DIR/build/linux64Gcc/SuperBuild/lib/libavformat.so FFMPEG_avutil_LIBRARY:FILEPATH=$WM_THIRD_PARTY_DIR/build/linux64Gcc/SuperBuild/lib/libavutil.so FFMPEG_dc1394_LIBRARY:FILEPATH=FFMPEG_dc1394_LIBRARY-NOTFOUND FFMPEG_dts_LIBRARY:FILEPATH=FFMPEG_dts_LIBRARY-NOTFOUND FFMPEG_gsm_LIBRARY:FILEPATH=FFMPEG_gsm_LIBRARY-NOTFOUND FFMPEG_swscale_LIBRARY:FILEPATH=$WM_THIRD_PARTY_DIR/build/linux64Gcc/SuperBuild/lib/libswscale.so FFMPEG_theora_LIBRARY:FILEPATH=FFMPEG_theora_LIBRARY-NOTFOUND FFMPEG_vorbis_LIBRARY:FILEPATH=FFMPEG_vorbis_LIBRARY-NOTFOUND FFMPEG_vorbisenc_LIBRARY:FILEPATH=FFMPEG_vorbisenc_LIBRARY-NOTFOUND FFMPEG_z_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libz.so Bruno
__________________
Last edited by wyldckat; January 23, 2012 at 16:26. Reason: blog post has been approved. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
paraview installation woes | vex | OpenFOAM Installation | 15 | January 30, 2011 08:11 |
Cmake cannot recognize gcc to compile ParaView | CAVT | OpenFOAM | 3 | July 27, 2010 21:38 |
paraFoam reader for OpenFOAM 1.6 | smart | OpenFOAM Installation | 13 | November 16, 2009 22:41 |
Can someone PLEASE document the development version installation | bernd | OpenFOAM Installation | 76 | November 14, 2008 22:51 |
[OpenFOAM] Steps to compile paraview from source | hsieh | ParaView | 12 | March 21, 2008 20:45 |