Skip to content

Instantly share code, notes, and snippets.

@positlabs
Created November 1, 2013 20:41
Show Gist options
  • Save positlabs/7271626 to your computer and use it in GitHub Desktop.
Save positlabs/7271626 to your computer and use it in GitHub Desktop.
gphoto2 bash script for taking time-lapse photo sets
echo "attempting to kill all PTPCamera processes..."
# releases camera from the OS so we can use it
killall PTPCamera
gphoto2 \
--folder "time-lapse" \
--capture-image-and-download \
--set-config "/main/imgsettings/imageformat=5" \
--filename "frames/"%Y%m%d%H%M%S.%C \
--interval "5"
# gphoto documentation: http://linuxcommand.org/man_pages/gphoto21.html
# --folder "foldername": save photos to this folder
# --capture-image-and-download: saves the photo to your harddrive, but not the camera
# --set-config "/main/imgsettings/imageformat=5": sets image quality
# --filename %Y%m%d%H%M%S.%C: format for filenames. see docs for more info
# --frames "300": sets the number of frames to capture. defaults to infinite.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment