Differences between revisions 1 and 2
Revision 1 as of 2011-09-03 14:51:45
Size: 1240
Editor: SamatJain
Comment: Dump contents of shell scripts
Revision 2 as of 2011-09-05 06:46:46
Size: 1228
Editor: SamatJain
Comment: Fix indentation
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
       gphoto2 --capture-image-and-download &
        sleep 60
  gphoto2 --capture-image-and-download &
  sleep 60

Using a DSLR

Assuming camera is supported with gphoto2:

#!/bin/bash
while (true); do
  gphoto2 --capture-image-and-download &
  sleep 60
done

or perhaps only --capture-image to take a photo and save to internal media (but not transfer to PC).

Using a Webcam

If you've a Webcam that supports Linux UVC, you can use ffmpeg w/ the device directly. E.g.:

MJPEG

# qmin indicates best frame quality (1 is best)
# qmax indicates worst frame quality
ffmpeg -f video4linux2 -s 1600x900 -r 5 -i /dev/video0 -vcodec mjpeg -qmin 2 -qmax 5 `time-stamp`.avi

XviD

ffmpeg -f video4linux2 -s 1600x900 -r 5 -i /dev/video0 -vcodec mpeg4 -qmin 2 -qmax 5 `time-stamp`.avi

Lossless H.264

# `locate ffpreset` to see x264 presets
# http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/#comment-14952
* order of bitrate: ultrafast, fast, medium, slow, slower, max
ffmpeg -f video4linux2 -s 1600x900 -r 5 -i /dev/video0 -vcodec libx264 -vpre lossless_fast -threads 0 `time-stamp`.avi


CategoryCheatSheet

SamatsWiki: CheatSheet/Photointervalometry (last edited 2012-10-20 05:32:54 by SamatJain)