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 -del
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
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
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 :
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.
sudo apt install ffmpeg
ImageMagick delegates video processing. I lost more than 5 hours to understand why such a bug NotIdentifiedByImageMagickError
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