I have made good use of this forum over the past year as I have been creating a birdbox with camera for my mother. Until now I have been able to find an answer to all of my questions but this time I feel i need to pose a question directly, as I cannot find the correct answer. I am pretty green when it comes to programming so please be nice!!
I have picamera recording into 10 minute long files, each called vid0x.h264 up to a value of 6 (6x 10 minute video = 1 hour). Another script moves the files to a NAS and then I have a cron that kills the python process and restarts at the top of the hour. What I would like is for the script itself to restart at vid01 at he top of the hour.
Camera recording code that I would like to loop:
import picamera with picamera.PiCamera() as camera: camera.resolution = (1280, 1024) camera.framerate = 24 camera.hflip = True for filename in camera.record_sequence([ 'vid%02d.h264' % (h + 1) for h in range(6) ], quality=20, bitrate=750000): camera.wait_recording(10 * 60)
Can anyone help me getting this to restart after vid06.h264 stops recording?