Taking screenshots of your home movies

So by now you are finished Archiving your DV tapes and also finished converting your DVDs to mp4 (h264) . So now you have a big hard disk full of movies and you have no idea what’s in what video.

I would never leave you in such a state so today we will be generating screen shots of the movies so you can browse the images to see what the recordings are about. I got most of the work from Screenshots of a DVD with ‘ffmpeg’ from Peter Forret’s blogg. Then a quick jump to the ffmpeg FAQ How do I encode movie to single pictures? and we were done.

The script will search for all avi files and it uses ffmpeg (our friend) to take a snapshot every 20 seconds.

for i in *.avi;do
  ffmpeg -i ${i} \r
  -r .05 \r
  -s 360x288 \r
  -an \r
  -f image2 \r
  -vcodec mjpeg \r

-r .05 (Frames per seconds so this is every 20 secs)
-s Sets the frame size.
-an Disables the audio recording
-f image2 Forces an image format
-vcodec  Force video codec to mjpeg

The files will be named the same as the parent movie but will have a number tagged on in the range 0001 -> 9999 then .jpg. The option %04d is used to do the numbering.

This entry was posted in General. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *