CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [OpenFOAM] ParaFoam how to create a movie (https://www.cfd-online.com/Forums/paraview/61067-parafoam-how-create-movie.html)

klausjuergen November 27, 2008 19:20

ParaFoam how to create a movie
 
Dear OpenFOAM user,

I am new to OpenFOAM (using version 1.5) and I have a question:
How can I create a movie (.avi or .mp2) from paraFoam? The save animation dialog box allows only to save images.

Thank you for your help.

Klaus

liuyang November 27, 2008 22:27

Perhaps you should open multip
 
Perhaps you should open multiple data file at one time.

sxhdhi November 27, 2008 22:33

I got the same problem. Could
 
I got the same problem. Could you please let me know how to open multiple data file at one time? thanks

Regards

Su Xiaohui

reza November 28, 2008 00:59

Hi, I dont know what your ver
 
Hi,
I dont know what your version of paraview is.
but to make a movie first select all the times you want in the first dialog box, meaning start time, e.g zero and also end time like 2 s and click accept then go to view menu and select key frame then another dialog opens at which you should switch off cashe and keeping property button and select the last button from the right which is the reocd button and in the dialog box appearing type the name of the movie which may be yourmovie.mpg. It takes some time to generate it.

tian November 28, 2008 02:59

Hi, have a look to here: Po
 
Hi,

have a look to here: Point 6.1.10

http://www.opencfd.co.uk/openfoam/doc/paraFoam.html

Bye
Tian

sxhdhi November 28, 2008 03:12

Many thanks, Tian. Xiaohui
 
Many thanks, Tian.

Xiaohui

martinr December 5, 2008 09:59

Dear colleagues How do you s
 
Dear colleagues
How do you save a movie in real time??
I have saved movies but its duration is lower than the real.
Any clue?

thank you in advance
Martín.

sradl December 5, 2008 11:27

dear martin, first you need
 
dear martin,

first you need to know the number of frames per second that you have saved. E.g. if you have dT = 0.05 [s], you have 20 fps.

Then export images (e.g. in jpgs format), use what ever you like to generate the raw movie (I use ImageJ which works nicely). Then I use virtual dub 1.8.6 under windows to set the frame rate and to compress the stuff.

br
Stefan

erik023 December 5, 2008 11:47

martin, you could also save
 
martin,
you could also save as .png, from what i understand this is better for figures that are not photos (short of a better way to explain) and then use animate.
in parafoam you have three different option on how to save the pictures: timestep, sequence and something more.
takes a bit of time but the movies look nice!

good luck!
Erik

klausjuergen December 8, 2008 16:17

Hi, thank you for your answ
 
Hi,

thank you for your answers.
I could create the desired movie.

First I used convert (as recommended from tian, thanks).
But now I use ffmpeg (under linux) with the following options
-r (here you can specify the number of frames per second, e.g. 20)
-b (here you can specify the bitrate in bit/s, e.g. 2500000)
-i (here you have to specify the input files, e.g. frame.%04d.jpg)
moviefile (the name of the movie file. It specifies the format of the movie, e.g. movie.mov).

Regards

Klaus

sxhdhi December 8, 2008 20:16

Hi Klaus I have tried the f
 
Hi Klaus

I have tried the ffmpeg you mentioned. but I got some errors:
user@ubuntu:~/OpenFOAM/OpenFOAM-1.5/sxh-1.5/run/turbFoam/cavity$ ffmpeg -i turbFoam_cavity_animation.002*.jpg out.avi
FFmpeg version r11872+debian_3:0.svn20080206-12ubuntu3, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler --enable-x11grab --prefix=/usr --enable-libgsm --enable-libtheora --enable-libvorbis --enable-pthreads --disable-strip --enable-libfaad --enable-libfaadbin --enable-liba52 --enable-liba52bin --enable-libdc1394 --disable-armv5te --disable-armv6 --disable-altivec --disable-vis --enable-shared --disable-static
libavutil version: 49.6.0
libavcodec version: 51.50.0
libavformat version: 52.7.0
libavdevice version: 52.0.0
built on Oct 3 2008 22:40:31, gcc: 4.3.2
Input #0, image2, from 'turbFoam_cavity_animation.0020.jpg':
Duration: 00:00:00.0, start: 0.000000, bitrate: N/A
Stream #0.0: Video: mjpeg, yuvj420p, 1048x636 [PAR 1:1 DAR 262:159], 25.00 tb(r)
Unable to find a suitable output format for 'turbFoam_cavity_animation.0021.jpg'

Have you met these before? How to solve them? Thanks

Xiaohui

klausjuergen December 9, 2008 20:01

Hi Xiaohui, you should spec
 
Hi Xiaohui,

you should specify the input files in the way I did in my previous post. Here "%04d" is a format like the format string of a printf() statement of the C programming language. "%04d" matches an integer with 4 digits.
I hope this will work!

Klaus

sxhdhi December 9, 2008 21:10

Hi Klaus, Many thanks for y
 
Hi Klaus,

Many thanks for your reply.
I tried following your instruction. But I got the error like this

user@ubuntu:~/OpenFOAM/OpenFOAM-1.5/sxh-1.5/run/interFoam/damBreak$ ffmpeg -r 20 -b 2500000 -i VOFDamBreaking.%04d.jpg damBreakingVOF.mov
FFmpeg version r11872+debian_3:0.svn20080206-12ubuntu3, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler --enable-x11grab --prefix=/usr --enable-libgsm --enable-libtheora --enable-libvorbis --enable-pthreads --disable-strip --enable-libfaad --enable-libfaadbin --enable-liba52 --enable-liba52bin --enable-libdc1394 --disable-armv5te --disable-armv6 --disable-altivec --disable-vis --enable-shared --disable-static
libavutil version: 49.6.0
libavcodec version: 51.50.0
libavformat version: 52.7.0
libavdevice version: 52.0.0
built on Oct 3 2008 22:40:31, gcc: 4.3.2
Input #0, image2, from 'VOFDamBreaking.%04d.jpg':
Duration: 00:00:03.0, start: 0.000000, bitrate: N/A
Stream #0.0: Video: mjpeg, yuvj420p, 860x632 [PAR 1:1 DAR 215:158], 20.00 tb(r)
File 'damBreakingVOF.mov' already exists. Overwrite ? [y/N] y
Output #0, mov, to 'damBreakingVOF.mov':
Stream #0.0: Video: 0x0000, yuvj420p, 860x632 [PAR 1:1 DAR 215:158], q=2-31, 2500 kb/s, 20.00 tb(c)
Stream mapping:
Stream #0.0 -> #0.0
Unsupported codec for output stream #0.0

Have you met this error before? Thanks a lot.

Regards,

Xiaohui

martinr December 10, 2008 07:26

Dear friends Thank you for
 
Dear friends

Thank you for your answers. I could create movies in real time using ffmpeg as Klaus posted.

Greetings
Martin

sega January 26, 2009 01:56

Hello. I would like to crea
 
Hello.

I would like to create a movie as well.
At my home-computer I have ffmpeg which works well, but at the university I only have access to the 'convert'-tool (like they said in the user guide).

Unfortunately I could not get it to work.
Maybe it's because the output images from ParaView are created with dots (.) and not underscores (_)?
This is how an images lookes like:
blahblah.00000.jpg

If I run 'convert *.jpg movie.mpg' I get the errormessage that there are too many input arguments. The same for 'convert blahblah* movie.mpg'

What am I doing wrong?
Have a nice day!

maruthamuthu_venkatraman January 27, 2009 09:16

Hello, I followed the i
 
Hello,
I followed the instructions given in OPENFOAM userguide to make movies. But the frames appear in Black colour and there is no data saved on it. If anyone knows how to make the movie, let me hear from you...

Thanks

lth April 7, 2010 16:37

error disappears with update
 
Install the libavcodec-unstripped-51 package. This will enable ffmpeg support for
mpeg4 encoding
found at
http://ubuntuforums.org/showthread.php?t=1037286

after I followed klausjuergen's suggestion with
ffmpeg -r 4 -b 800 -i %03d.jpg test.mov or
ffmpeg -r 4 -b 800 -i %03d.jpg test.avi

before then I kept getting and error with noData movies.

Thanks for the thread, lth


All times are GMT -4. The time now is 16:38.