Create no frills pictures slideshow

Question

I have a few hundred pictures of various sizes, which I want to convert into a slideshow movie. What is a fast, no frills way to do this?

Pre-requisites

You would need to following:

imagemagick
mencoder

Install using this command:

sudo apt-get install imagemagick mencoder

Or click here (imagemagick) and here (mencoder)

Make pictures same sized

Let’s say you want the final slideshow movie to be 640×480. However, your pictures came in various other dimensions. You would want to resize all pictures to fit into 640×480 without distortion (maintain the same aspect ratio), and add blank frames to pad the extra spaces when the pictures don’t fit exactly.

  1. Copy the original pictures into a subdirectory called “inp”.
  2. Make a subdirectory called “out” to hold the output.
  3. Then, run this command:
for a in $( ls inp ); do
convert -verbose -regard-warnings "inp/$a" -resize 640x480 \
	-background black -gravity center -extent 640x480 "out/$a";
done

Make slideshow movie

This will create a slideshow movie:

  1. in xvid avi format
  2. at 1fps
  3. no audio
mencoder "mf://*.jpg" -mf fps=1 -o output.avi -ovc lavc


Post a Comment

Your email is never published nor shared. Required fields are marked *