# timelapse using the Bullseye "libcamera" library import os import time # Usage: "-t " is the duration to be capturing frames in milliseconds. (ex: 30000 is 30 seconds. 60000 is one minute.) # "timelapse " is thre delay between capturing frames. (ex: "--timelapse 5000" captures a frame every 5 seconds.) os.system(f'libcamera-still --nopreview -t 30000 --timelapse 2000 --framestart 1 -o frames/image%04d.jpg --width 1280 --height 720') # the following flips the image vertically and horizontally. #os.system(f'libcamera-still --nopreview -t 30000 --vflip --hflip --timelapse 2000 --framestart 1 -o frames/image%04d.jpg --width 1280 --height 720') # Code for stitching frames together with ffmpeg: # ffmpeg -r 10 -f image2 -pattern_type glob -i 'image*.jpg' -s 1280x720 -vcodec libx264 timelapse.mp4