Skip to content

Instantly share code, notes, and snippets.

@dr-mod
Created August 3, 2021 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dr-mod/6525d69dd5ad36f40bebe8ee7dab951e to your computer and use it in GitHub Desktop.
Save dr-mod/6525d69dd5ad36f40bebe8ee7dab951e to your computer and use it in GitHub Desktop.
#!/bin/bash
ffmpeg -f image2 -framerate 60 -pattern_type glob -i '*.jpg' -filter:v "framestep=1,setpts=N/60/TB,scale=1440:1080" -vcodec libx264 -preset slower -crf 18 -pix_fmt yuv420p ../time-lapse.mp4
#!/bin/bash
take_picture()
{
DATE_TIME=$(date +"%Y-%m-%d_%H-%M")
raspistill -vf -hf -o /home/pi/camera/$DATE_TIME.jpg
}
while true; do
take_picture
sleep 60
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment