Briefly looking into the PiCamera documentation (And with 0% knowledge in Python) I think you just may have a syntax error?
syntax error: 'break' outside loop.
Basically you are trying to break (a loop) from a non looped code. Causing a syntax error. Or break is not allowed in that context.
I suggest the following psuedo code changes.
with picamera.PiCamera() as camera:
camera.resolution = (640, 360)
camera.framerate = 24
camera.start_recording('one_day.h264', quality=20, bitrate=750000)
///Above line will start recording. I dont think you explicilty need to use wait recording as its already recording on another thread.
#camera.wait_recording(24 * 60 * 60)
//Psuedo code here- I dont know Python
///start a never ending loop, like while stop!= true?
/// use pause(50) to allow recording to progress
/// see if the user pressed a key in the buffer
/// Not sure if this is correct? key = cv2.waitkey(1) & 0XFF
/// if key == ord("q")
/// exit your loop by setting stop = true (or break, since you are in a loop)
/// no key pressed, start the loop again until broken or another condition is met
/// Now only call stop
In the document it says using
pause() will not raise errors. Only once you call stop recording. So it may result in half your video not being recorded. Maybe instead of
pause() , use the
wait_recording with a small time period (like 5 seconds?) If errors it should raise an error and tell you, instead of pretending to carry on and you only realising long time later.
I hope this helps, from a psuedo logical point of view.