Convert find>ls>sort output

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
finn

Convert find>ls>sort output

Post by finn »

Hi.

I am trying to convert a subset of images in a directory into a movie. I have had success using the following command to process all images in a directory.

Code: Select all

$CONVERT -quality 90 -delay 10 `$LS -rt $DEST_PATH/*.jpg` $DEST_PATH/sunrise.mpg  2>&1| $TEE -a $LOG
Using a similar method, I tried to use a combination of find/ls/sort to achieve the desired result. When the next command is issued directly, it outputs the desired result.

Code: Select all

find $DEST_PATH/images/ -newer ${DEST_PATH}/newerstart ! -newer ${DEST_PATH}/newerend -exec ls {} \; | sort

[root@smt-web entire_day]# ./make_ravines_sunrise.sh
/home/data/webcams/ravines/entire_day/images/0690.jpg
/home/data/webcams/ravines/entire_day/images/0691.jpg
/home/data/webcams/ravines/entire_day/images/0692.jpg
/home/data/webcams/ravines/entire_day/images/0693.jpg
/home/data/webcams/ravines/entire_day/images/0694.jpg
...
Putting the "find" command in place of the "ls" command previously used, I receive the following:

Code: Select all

convert: unable to open image `none': No such file or directory.
convert: missing an image filename `/home/data/webcams/ravines/entire_day/sunrise.mpg'.
Does anyone know why this will not work and how to fix it?

Thanks for your help,
Finn
anotherprogrammer123
Posts: 36
Joined: 2010-02-21T18:02:40-07:00
Authentication code: 8675308

Re: Convert find>ls>sort output

Post by anotherprogrammer123 »

Hi Finn,

I do not know how to do this with ImageMagick, but I would highly recommend using AviSynth (an open source video processing framework) to do this.
Basically, you would use the ImageSource function and save to any video format you want with a small script like:

Code: Select all

ImageSource($DEST_PATH/%i.jpg)
And then just load it into VirtualDub and save as an .avi file.

Hope that helps.
Post Reply