Project

tlapse

0.0
No commit activity in last 3 years
No release in over 3 years
Automated time lapse photography via gphoto2
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 8.2
~> 10.0
~> 3.0
~> 0.15
~> 0.8
~> 2.1

Runtime

 Project Readme

Tlapse

Automated time lapse photography using gphoto2.

Installation

  1. Install gphoto2 and ffmpeg
  • macOS: brew install gphoto2 ffmpeg
  • Debian/Ubuntu: sudo apt install gphoto2 ffmpeg
  1. gem install tlapse

Example: Integrate with cron

  • From 9 AM to 1 PM, capture one image every 10 minutes
0 9 * * * cd $HOME && tlapse alpha capture --until 1pm --interval 10
  • From 3 PM to sunset, capture an image every minute. Compile the result into a video.
    • You should configure your coordinates to accurately determine sunset in your location
0 15 * * * cd $HOME && tlapse alpha capture --until sunset --interval 10 --compile

CLI

Find better documentation by running tlapse help or tlapse help SUBCOMMAND

  • tlapse capture_single - Capture an image using the tethered camera
  • tlapse until_sunset - Generate a gphoto2 command which captures images until sunset
    • You should configure your coordinates to accurately determine sunset in your location

Alpha CLI

These are early-stage features which are likely to change quite a bit before they're ready for prime time.

  • tlapse alpha capture - Capture a series of timelapse images (see tlapse alpha capture --help for options)

API

Mostly useful for cronjobs and the like.

  • Capture images between given hours

    Tlapse::Capture.timelapse_command({
      from: Time.now,
      to: Time.now + 6.hours,
      interval: 30.minutes
    }) # => "gphoto2 --capture-image-and-download -I 1800 -F 12 --filename '%Y-%m-%d_%H-%M-%S.jpg'"
  • Capture images from sunset to sunrise

    Tlapse::Capture.timelapse_command_while_sun_is_up(interval: 30.minutes)
    # => "gphoto2 --capture-image-and-download -I 1800 -F 11 --filename '%Y-%m-%d_%H-%M-%S.jpg'"

Configuration

So sunrise and sunset calculations are correct for your location, it is advisable to configure your (approximate) coordintes using the CLI. Defaults are for Raleigh, NC, which is probably not where you live.

You can get rough coordinates from https://www.iplocation.net/

tlapse config set lat YOUR_LATITUDE
tlapse config set lon YOUR_LONGITUDE

# Optionally also configure your timezone to make date formatting nicer
tlapze config set tz YOUR_TIMEZONE (e.g. America/New_York)

License

The gem is available as open source under the terms of the MIT License.