Converting 6000+ still images into an animation...

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Ic3Knight

Converting 6000+ still images into an animation...

Post by Ic3Knight »

Hiya people, I've just downloaded imagemagick as I think it may do what I need, but I have absolutely no experience using it, so I'm not sure how to do what I want!

Basically, I'm doing some numerical modelling of acoustic waves interacting with "stuff". The modelling package I'm using produces a graphical output and I have the option to dump said ouput every "n" timesteps and it creates a .png file of the graphic at that time.

So, once the simulation is complete I have a folder full of .png files which are sequentially numbered along the lines of "stub0001.png, stub0002.png" etc.

I want to "stitch" all of these together into a video sequence. Is this possible with image magick, and if so... er.... how do I do it?!

Thanks for your help!

Paul
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

ImageMagick supports MPEG-1, MPEG-2, and MNG video sequences. For MPEG-1 and MPEG-2 you need the mpeg2encode program delegate. Also for 6000 images you would need gigabytes of temporary disk space because ImageMagick caches the images to disk while it assembles the video.
Ic3Knight

Post by Ic3Knight »

Thanks for the info... could you outline the sort of thing I'd have to enter in the command line to convert to MPEG-1(2)? also, where do I get a hold of the mpeg2encode program?

Thanks again for your help!



Oh... one other thing... would it be quicker/possible to do some kind of "loop" to save IM from having to load all of the image files in one go? for example, could it add file 2 to file one and then stop and add file 3 to what it did previously? Does that make any sense?

Thanks

Paul
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

ImageMagick may not be the best choice for video since it does require all 6000+ images be read in one command. For example,
  • convert *.jpg image.m2v
You can track down mpeg2encode with Google.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

It may be better to use IM for batch processing the individual frames of the video, then use the mpeg encoders to do the final conversion to a video format.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply