Hello,
I am trying to use animate to animate a series of CFD images to analyze a changing flow field. The images are PNGs of 1200x700 resolution, about 64kb apiece, totaling 500 images and 30 megs. I am running Ubuntu 8.04, a centrino 1.73ghz, 1 gig of ram, and a 1 gig swap.
Animate hangs on when I enter "animate S*" (the files are named Scene0001, Scene0002, etc. Not exactly that, but similar.) I have waited 25, 30 minutes and nothing happens, except the disk is churning. I tried entered 200 out of the 500 images and it finally launched an x server, but it only made it through image 80 before hanging.
Does anyone have any ideas?
Thanks for your time,
Eric
animate hangs
Re: animate hangs
Try
animate -limit memory 1 -limit map 1 S*
ImageMagick loads all the images in memory and we suspect your computer is thrashing. The limit option forces the pixels to disk but the X pixmaps still consume memory. After a bit, all the images may display. We created mock images to the specifications you posted and they displayed without complaint. However, we have a quad-core 3.2GHZ box with 16GB of memory.
animate -limit memory 1 -limit map 1 S*
ImageMagick loads all the images in memory and we suspect your computer is thrashing. The limit option forces the pixels to disk but the X pixmaps still consume memory. After a bit, all the images may display. We created mock images to the specifications you posted and they displayed without complaint. However, we have a quad-core 3.2GHZ box with 16GB of memory.
Re: animate hangs
That worked! Thanks for the help!
It does launch X after ~5 minutes, and animated all the images, but is still painfully slow. Is this purely a ram issue? I wasn't monitoring its usage because when I thought I should have been, the animation was slugging through at like 60 frames/minute and my system was too unresponsive to launch top. But if you know it to be a ram issue, I will gladly use this as an excuse to load up on memory.
Also, could you comment on whether this is a performance issue specific to animate or if it should affect all animation software equally?
Thanks for your help magic k,
Eric
It does launch X after ~5 minutes, and animated all the images, but is still painfully slow. Is this purely a ram issue? I wasn't monitoring its usage because when I thought I should have been, the animation was slugging through at like 60 frames/minute and my system was too unresponsive to launch top. But if you know it to be a ram issue, I will gladly use this as an excuse to load up on memory.
Also, could you comment on whether this is a performance issue specific to animate or if it should affect all animation software equally?
Thanks for your help magic k,
Eric
Re: animate hangs
The best solution may be to use ImageMagick to convert your images to MPEG4 and use an MPEG4 video player to display which are relatively lightweight:
- convert S* movie.mp4
mplayer movie.mp4
Re: animate hangs
I gave this the old college try and it was looking good (as good as a blinking terminal cursor can look at least) but it eventually locked up my box. I did it on a well-equipped server and it completed, but all my attempts to play this movie have failed.
The first convert I did was of JPEG images. mplayer would not play it (some errors) and totem showed the first image, blinked black, and looped a black screen and the first image (it was probably on repeat). I did convert on the PNG images. Totem wouldn't open it at all and mplayer gave this error:
sippy@sippy:~$ mplayer moviePNG.mp4
MPlayer 1.0rc2-4.2.3 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) M processor 1.73GHz (Family: 6, Model: 13, Stepping:
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing moviePNG.mp4.
libavformat file format detected.
[mp3 @ 0x8804034]Could not find codec parameters (Audio: mp1, 176 kb/s)
LAVF_header: av_find_stream_info() failed
Exiting... (End of file)
I know this isn't the mplayer/totem forum so I'm not going to ask about what's going on there, but for both convert operations, the .mp4 file ended up being only about 64kb large... I don't think convert actually made a movie out of those 30 megs of files, I think it crammed the first image in and gave up after that. Any ideas on what's going on there?
I am really surprised that I'm still fighting to get an animation made but I need this functionality so I'm going to have to keep digging into this issue. I was looking into MNG format... apparently it's basically an animated PNG. Does imagemagick have a way to play back this format?
Thanks again for your help magick,
Eric
The first convert I did was of JPEG images. mplayer would not play it (some errors) and totem showed the first image, blinked black, and looped a black screen and the first image (it was probably on repeat). I did convert on the PNG images. Totem wouldn't open it at all and mplayer gave this error:
sippy@sippy:~$ mplayer moviePNG.mp4
MPlayer 1.0rc2-4.2.3 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) M processor 1.73GHz (Family: 6, Model: 13, Stepping:
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing moviePNG.mp4.
libavformat file format detected.
[mp3 @ 0x8804034]Could not find codec parameters (Audio: mp1, 176 kb/s)
LAVF_header: av_find_stream_info() failed
Exiting... (End of file)
I know this isn't the mplayer/totem forum so I'm not going to ask about what's going on there, but for both convert operations, the .mp4 file ended up being only about 64kb large... I don't think convert actually made a movie out of those 30 megs of files, I think it crammed the first image in and gave up after that. Any ideas on what's going on there?
I am really surprised that I'm still fighting to get an animation made but I need this functionality so I'm going to have to keep digging into this issue. I was looking into MNG format... apparently it's basically an animated PNG. Does imagemagick have a way to play back this format?
Thanks again for your help magick,
Eric
Re: animate hangs
Well, I'm on the trail again. Tried to covert series of PNG images to MNG, but I got a segmentation fault (on a machine that I believe has at least 4 gigs of ram). Was successful in converting a set of smaller JPG images to MNG.
Display failed (it showed the last image, didn't animate, and it didn't seem like the imagemagick gui would let me step back or restart the animation. maybe it "animated" before the x server popped up, I dunno). A program called "showimg" worked very nicely, however.
So I guess I have my methodology now: convert followed by showimg. Pretty simple, I'll just have to watch the filesizes when I do convert.
Thanks for your help magick, I would still be lost had you not set me on the right track.
Eric
Display failed (it showed the last image, didn't animate, and it didn't seem like the imagemagick gui would let me step back or restart the animation. maybe it "animated" before the x server popped up, I dunno). A program called "showimg" worked very nicely, however.
So I guess I have my methodology now: convert followed by showimg. Pretty simple, I'll just have to watch the filesizes when I do convert.
Thanks for your help magick, I would still be lost had you not set me on the right track.
Eric
Re: animate hangs
ImageMagick uses memory mapping which can produce a fault if the pixel cache is mapped to disk and there is not enough free disk space to expand the file. This should not happen if you use the -limit memory 0 -limit map 0 options. If you are using this option and you still get a fault we'd like to investigate further. Post your command line here and let us know what width / height your images are and how many images you are processing. In general, ImageMagick can process as many images that your free space on disk can support. See http://www.imagemagick.org/script/architecture.php for details about the pixel cache disk resource requirements.