Paraview 3.12 - How to compile with ffmpeg for animation
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. Thanks, Eric |
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. |
Your suggestion works well! Thanks anon_a
|
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. |
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 |
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. |
Greetings to all!
Here's a few more solutions:
Code:
FFMPEG_INCLUDE_DIR:PATH=$WM_THIRD_PARTY_DIR/build/linux64Gcc/SuperBuild/include Bruno |
All times are GMT -4. The time now is 00:07. |