how to make an avi from a series of images

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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

Well as you did not give an example, I assume you have a set of numbered files and the order is comming out all wrong because of the numbering.

Eg 1.jpg 2.jpg ... 9.jpp 10.jpg 11.jpg
etc..

You need to try to load the smaller image first. eg:
convert ?.jpg ??.jpg ???.jpg ..... output.mpg

Alturnativeally you need to rename all your images to add zeroes in front of the numbers that are too small. I use simple perl script called mv_renum for this..
http://www.cit.gu.edu.au/~anthony/software/mv_renum.pl

EG mv_renum images_*.jpg
will find the largest number in the given filenames, and prepend zeros to the number found in the other filesnames so they list in the correct order.

Or you can specfiy the number of digits you want each number to be
mv_renum -8 images_*.jpg

If you copy the script to be called mv_reseq it will also change all the numbers to remove any gaps, or with the right arguments add gaps to the sequence. It is a VERY handy script.


While we are looking at 'handy' scripts, you may also like to search for a
mv_perl script on the web. This lets you use a small perl RE to rename files.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
emontezuma
Posts: 19
Joined: 2011-09-28T10:17:45-07:00
Authentication code: 8675308

Re: how to make an avi from a series of images

Post by emontezuma »

Hi Anthony, I have tried your sample code but this message appear:

C:\Users\Elvis>convert "c:\MyImage.jpg" "c:\MyAniFile.mpg"

convert.exe: Delegate failed `"ffmpeg.exe" -v -1 -mbd rd -trellis 2 -cmp 2 -subc
mp 2 -g 300 -i "%M%%d.jpg" "%u.%m"' @ error/delegate.c/InvokeDelegate/1065.

C:\Users\Elvis>convert -version
Version: ImageMagick 6.8.4-10 2013-04-13 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: bzlib fontconfig freetype jng jp2 jpeg lcms lzma pango png ps tiff x
xml zlib


Best regards,
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: how to make an avi from a series of images

Post by fmw42 »

Looks like you need to install the ffmpeg delegate library and then reinstall IM. As you are on Windows, you may need some one else's help in installing the delegate library.

see
http://www.imagemagick.org/download/delegates/

though I would search for the most current version.
User avatar
whugemann
Posts: 289
Joined: 2011-03-28T07:11:31-07:00
Authentication code: 8675308
Location: Münster, Germany 52°N,7.6°E

Re: how to make an avi from a series of images

Post by whugemann »

If you want to create an AVI, I assume that you are working under Windows.

In this case, the duo AVIsynth/VirtualDub is probably the easiest solution, see http://www.imagemagick.org/Usage/windows/#auxiliary. In AVIsynth there is a special function called ImageSource that does this job most easily. The PlugIn CoronaSequence even allows for wildcards being used in filenames.
Wolfgang Hugemann
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: how to make an avi from a series of images

Post by snibgo »

emontezuma says he wants to make an mpg. Not that the type matters; doing it directly in ffmpeg is as easy as it can be:

Code: Select all

ffmpeg -i c:\MyImage.jpg c:\MyAniFile.mpg
ffmpeg -i c:\f_%06d.jpg c:\MyAniFile.mpg
etc.
snibgo's IM pages: im.snibgo.com
Post Reply