Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a large number of paper sheets to scan. Instead of an autofeed or flatbed scanner, I'd like to use my photo camera. After a while, it occurred to me that instead of making a photo for each page, I could install the camera on a tripod, set it to record video and then extract the images from the video.

That way, I'd just have to handle the papers: Pick one, place it in front of the camera, wait a moment, replace it.

Is there a Linux software to get all images without motion out of a movie? Kind of a non-motion-detection.

share|improve this question

1 Answer 1

I like your idea. I guess I've found a way to do what you want.

Using ffmpeg to export frames at a given interval

You could install ffmpeg and then convert the video into still frames.

ffmpeg -i input_file.mp4 -r 1 image_%4d.png

Controlling frame rate

The -r option takes one number as a parameter, namely the frame rate. So the argument for this option would be 1 divided by the time you hold the sheets in front of the camera.

For example:

  • Picking a paper every second, use -r 1.
  • Picking a paper every two seconds, use -r 0.5 – because 0.5 frames per second mean 2 seconds per frame.
  • ...

You would only have to synchronize this with your start time, so I'd suggest using a stopwatch.

Shifting the starting position

You can also "shift" the video by using -ss <some number>, where <some number> is the time in seconds from the start of the video. So using -ss 5 would start at five seconds.

If you need to shift it more precisely, using a hh:mm:ss.xxx syntax, thus specifying milliseconds in xxx, for example like 00:00:00.500.

Controlling output names and format

You can change the image_%4d.png to use more digits. %4d will output images like 0001, 0002, and so on. So this should be enough for most cases.

ffmpeg can also output to JPG, so you'd just have to change the suffix accordingly. I suggest using PNG though, for quality reasons.

Some tips

Try to use proper lighting. Set up a direct light source to the paper and set the camera to high contrast. You would maybe need to batch-edit the output files in order to crop them, remove color tint and sharpen them up.

You could use IrfanView to batch process them, or use a trial version of Adobe Lightroom.

share|improve this answer
+1 for the general direction of the answer. What I'd like is a way to find duplicate/very similar frames and keep only those. –  Aaron Digulla Jun 26 '11 at 18:02
I'll have to look into that! If you keep to the time though you shouldn't get duplicates. –  slhck Jun 26 '11 at 18:08
But it's hard to keep to the time. Sometimes, I have to leaf through pages or check the backside, etc. It would be much more comfortable, if the software could simply extract the first frame of all duplicates. –  Aaron Digulla Jun 27 '11 at 7:56
I understand :) Well, I have an idea that uses ImageMagick, but it would involve a bit of programming -- unfortunately don't have the time for it in the next days. –  slhck Jun 27 '11 at 7:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.