Configures a timelapse camera for a Raspberry Pi.
- Use sunrise/sunset times for your location to decide when to record
- Automatically generate a video from the images
- Backup images/videos to Dropbox
- Automatically tweet the video once generated
This is based on an idea by Alex Ellis
This uses Sunrise Sunset to calculate when it's daylight
For full instructions on installing Docker on a Raspberry Pi, take a look at Alex Ellis's blog
View on Docker Hub
There are some optional volumes:
/opt/app/config.json: the config file. You will probably want to set your own config./opt/app/pilapse.sql: the SQLite file. If you want this stored on your Pi, you will need to do this./var/image: the image store. If you want to have the images stored on your Pi, you will need to do this.
docker run --name pilapse -v /path/to/image/store:/var/image -v $PWD/config.json:/opt/app/config.json --privileged --restart=always -d riggerthegeek/pilapse:$(uname -m)
The config allows granular control over the timelapse pictures and videos.
{
"lat": 52.482154,
"long": -1.894503,
"schedule": [{
"cleanup": {
"disabled": false,
"interval": "* */6 * * *"
},
"dropbox": {
"disabled": false,
"accessToken": "some token",
"savePath": "/Timelapses/daily",
"interval": "*/15 * * * *"
},
"photo": {
"disabled": false,
"group": "D",
"interval": "* * * * *",
"savePath": "/var/image/daily",
"startTime": "04:00",
"endTime": "22:00",
"raspistillOpts": [
"-hf",
"-vf"
]
},
"video": {
"disabled": false,
"interval": "0 23 * * *",
"savePath": "/var/image/daily-video"
}
}]
}Get lat/long coords from www.latlong.net
lat: The Pi's latitude. This is used to calculate sunrise/sunset timeslong: The Pi's longitude. This is used to calculate sunrise/sunset timesschedule: An array of different schedule objects
cleanup: Specifies how to cleanup uploaded/generated imagesdropbox: Specifies how to save to dropboxphoto: Specifies how to take photosvideo: Specifies how to generate a video from the photos
disabled: If you want to disable it, set totrueinterval: Cron notation to decide when this should run
accessToken: The Dropbox access token, which you can get from Dropboxdisabled: If you want to disable it, set totrueinterval: Cron notation to decide when this should runsavePath: Specifies where in your Dropbox account to save the files
disabled: If you want to disable it, set totrueendTime: Time to stop taking photos - will use sunset time if not setgroup: Decides how to group the photos. By default, it'sD(daily). Can also haveM(monthly) andY(yearly)interval: Cron notation to decide when this should runraspistillOpts: Array of options sent with the raspistill commandsavePath: Specified where to save your files locallystartTime: Time to start taking photos - will use sunrise time if not set
disabled: If you want to disable it, set totrueinterval: Cron notation to decide when this should runsavePath: Specified where to save your files locally