diff --git a/camera.py b/camera.py index 10806aa..0a595cf 100644 --- a/camera.py +++ b/camera.py @@ -153,4 +153,12 @@ def upload_to_firebase(file_path, blob_name): print(f'File {file_path} uploaded to {blob_name}.') upload_to_firebase(mp4_video_path_macbook, f'motion_detected_macbook_{timestamp}.mp4') -upload_to_firebase(mp4_video_path_iphone, f'motion_detected_iphone_{timestamp}.mp4') \ No newline at end of file +upload_to_firebase(mp4_video_path_iphone, f'motion_detected_iphone_{timestamp}.mp4') + +# Clean up +macbook_camera.release() +out_macbook.release() +if iphone_camera.isOpened(): + iphone_camera.release() + out_iphone.release() +cv2.destroyAllWindows() \ No newline at end of file