Page 1 of 1

Convert to MPG fails

Posted: 2013-05-05T16:14:23-07:00
by emontezuma
Hi friends.
I have read a lot of information about this error in this forum, but I couldnt find any solution.
Im developing a program which takes jpg images and try to convert them into mpeg video.

This is my command line

convert c:\Images\*.jpg" "c:\myvideo.mpg"

And this is the error:

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.

I read about the delegates, I just run the -format list and this is the result:

MONO* rw- Raw bi-level bitmap
MOV rw+ MPEG Video Stream
MP4 rw+ MPEG-4 Video Stream
MPC* rw+ Magick Persistent Cache image format
MPEG rw+ MPEG Video Stream
MPG rw+ MPEG Video Stream
MRW r-- Sony (Minolta) Raw Image File

And this is my IM version

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


What can I do to resolve ASAP this error?
Do I need to install some program for this goal?

Best regards,

Re: Convert to MPG fails

Posted: 2013-05-05T17:02:05-07:00
by fmw42
install the ffmpeg delegate library and then re-install IM

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

however, I would look for more current version if possible.

As you are on Windows I do not know how delegate libraries are installed. So perhaps on of the Windows users can help further. Or look at http://www.imagemagick.org/Usage/windows/. I do not know if it is described there or not.

Re: Convert to MPG fails

Posted: 2013-05-05T17:19:54-07:00
by emontezuma
Thanks fmw42, but all the answers say the same... "ffmpeg", "delegates", "Dont know Windows", etc.
Just! I don't know what and how delegate install in Windows :(
Can any Windows users help me?

Best regards,

Re: Convert to MPG fails

Posted: 2013-05-05T20:26:01-07:00
by emontezuma
I have read a lot of posts about this problem and no one has a real solution, all of them have the same answer: "install the delegates, but Windows"
I have seem that the last IM version has the ffmpeg.exe file into the IM directory, but it doesn't work.
The error message is the same:

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.

This "windows" issue has a solution?
Is there any other option to make animation (no GIF) ?

Best regards,

Re: Convert to MPG fails

Posted: 2013-05-05T21:35:33-07:00
by snibgo
I use IM and ffmpeg on Windows, but I call ffmpeg directly rather than through IM.

When I have files x-0.jpg to x-4.jpg, the following command...

Code: Select all

convert x-*.jpg x.mpg
... works on IM 6.8.3 and 6.8.4 but not 6.8.5.

My suggestion is to use ffmpeg directly:

Code: Select all

ffmpeg -i x-%01d.jpg x.mpg

Re: Convert to MPG fails

Posted: 2013-05-06T07:38:36-07:00
by emontezuma
Snibgo, you always has the key.
Im running the ffmpeg and it works, but I dont understand some parametres, for instance, I have 100 jpg files into a folder "c:\images\" the images are named IM-001.jpg, IM-002.jpg... IM-100.jpg

How I need to put the images list paramaters to construct the mpg?

I try that
c:\>ffmpeg -i "c:\images\*.IM-%01d.jpg" "c:\myvideo.mpg"

This is the error message:

Could find no file with with path 'c:\Publiscreen\Temporal\V
isor00\IM-%01d.jpg' and index in the range 0-4
c:\Images\IM-%01d.jpg: No such file or directory

Which wildcar I need to use to refers any 100 images?

Best regards,

Re: Convert to MPG fails

Posted: 2013-05-06T08:00:28-07:00
by snibgo
For 3 digits, you need "%03d":

Code: Select all

ffmpeg -i x-%03d.jpg x.mpg
If you use a Windows batch file, double any percentage signs:

Code: Select all

ffmpeg -i x-%%03d.jpg x.mpg

Re: Convert to MPG fails

Posted: 2013-05-06T08:36:21-07:00
by emontezuma
Thanks snigbo, it is working perfectly.

Best regards,