9

I'm trying to convert 200 .jpg files that were .ppm files into one .mp4 file.

In the same directory as the .jpg files, I ran this code:

convert -delay 6 -quality 95 test*ppm movie.mp4

and received this error message:

convert: no images defined `movie.mp4' @ error/convert.c/ConvertImageCommand/3210.

What caused this error?

kittykittybangbang
  • 2,380
  • 4
  • 16
  • 27
fmartin
  • 231
  • 1
  • 2
  • 5
  • Do the images in the directory you are running the command from have a .jpg extension? – Bryan Reilly Aug 03 '15 at 03:35
  • 1
    Do you have ffmpeg as a delegate in your ImageMagick install. MPEG formats require that ImageMagick have ffmpeg as a delegate library. You should see mpeg listed in Delegates section from `convert -version`. See the comment in the MPEG section of http://www.imagemagick.org/script/formats.php#supported – fmw42 May 09 '18 at 00:16

5 Answers5

14

Nevermind, I just ended up using ffmpeg. This is the code that I used:

ffmpeg -framerate 1 -pattern_type glob -i '*.jpg' -c:v libx264 out.mp4
fmartin
  • 231
  • 1
  • 2
  • 5
3

From what I am reading the images you are running the command on have a .jpg extension.

Try

convert -delay 6 -quality 95 *.jpg movie.mp4
Bryan Reilly
  • 114
  • 4
2

sudo apt install ffmpeg


ImageMagick delegates video processing. I lost more than 5 hours to understand why such a bug NotIdentifiedByImageMagickError

kenorb
  • 155,785
  • 88
  • 678
  • 743
Yaroslav Malyk
  • 409
  • 5
  • 15
0

TL;DR

Use \ls or ls --color=never to get uncolored files list

Failing command...

for f in $( ls *.JPG ); do convert -resize 1920x $f re_$f ; done

... becomes

for f in $( ls --color=never *.JPG ); do convert -resize 1920x $f re_$f ; done

Details

I got same error, due to colored output of ls command :

Error I got (in french):

$ for f in $( ls *.JPG ); do convert -resize 1920x $f re_$f ; done
convert: pas de délégué pour décoder ce format d'image `JPG' @ error/constitute.c/ReadImage/501.
convert: pas d'images définies `IMG_5235.JPG' @ error/convert.c/ConvertImageCommand/3210.
convert: impossible d'ouvrir l'image `IMG_5236.JPG': Aucun fichier ou dossier de ce type @ error/blob.c/OpenBlob/2712.

Filenames are colored like in this screenshot :

enter image description here

My ls command is aliased to a ls --color=auto which leads convert file parameters to contain color sequences.

Disable ls colored output by using \ls :

for f in $( \ls *.JPG ); do convert -resize 1920x $f re_$f ; done

or :

for f in $( ls --color=never *.JPG ); do convert -resize 1920x $f re_$f ; done

Then convert may not give previous errors. Hope this can help.

el-teedee
  • 1,293
  • 1
  • 15
  • 27
0

The proper syntax is:

convert src_file [options] dst_file

So in your case, it should be like:

convert movie.mp4 -delay 6 -quality 95 test*ppm movie_converted.mp4
kenorb
  • 155,785
  • 88
  • 678
  • 743