Sunday 29 July 2012

Making Videos from Images

My daughter collected a nice series of images of the demolition of the old Steetley chimney in Hartlepool:

There are 25 images, so we thought it would be nice to make a little movie of them.
First they need a bit of processing, because the horizontal is not level.   We rotated the images, and trimmed off the edges to straighten them up using ImageMagick using:
mogrify -resize '700' -rotate 4 -shave '50x60' -resize '640' *.JPG 
This re-sizes the images to 700 pixels wide, rotates clockwise by 4 deg, shaves 50 pixels of the top and bottom, and 60 pixels off the sides.  It then re-sizes to 640 pixels wide. We then turned it into an mp4 avi movie file using mplayer's mencoder using:
mencoder "mf://*.JPG" -mf fps=4 -o Steetley.avi -ovc lavc -lavcopts vcodec=msmpeg4v2:vbitrate=800 -vf scale=640:480
This plays nicely using mplayer, and uploads to flickr too.

Final movie is here:
Or on Flickr here








1 comment:

Graham Jones said...

Thanks. I have been looking at the opencv library lately (with the intention of using it to identify birds on our bird table), and it seems to be able to do all sorts of image manipulation, so that might be able to do it. I'll give it a try sometime!

Graham.