« Snatched | Main | Music for running, part V »

December 12, 2005

Quick slideshow, part II

Quick slideshow, but not too quick. I decided just to guess at the number of frames to hold each photo. Five, about 5 photos/sec, was too quick. Half that fast is okay for us. We have lots of duplicates. Laziness gave me this:

#!/bin/bash
for item in `ls ${1}/dsc[0-9]*.jpg`
do
convert $item /tmp/`basename ${item} .jpg`.ppm
done

rm /tmp/list.photos
touch /tmp/list.photos
for j in `ls /tmp/*.ppm`
do
for i in 1 2 3 4 5 6 7 8 9 10
do
echo $j >> /tmp/list.photos
done
done

cat /tmp/list.photos | xargs -n1 cat | ppmtoy4m | mpeg2enc -o $2.m1v

I wonder if it's worth rewriting for configurability. Takes longer to run the script than to write it. The first MPEG compilation is diane.m1v (16 MB).

Posted by Mark at December 12, 2005 09:42 PM

Trackback Pings

TrackBack URL for this entry:
http://mcraig.org/movabletype/mt-tb.cgi/1132