final razeradjustments

main
Shoofle 2 months ago
parent 9265070f9b
commit 4aeb99009f
  1. 5
      webcam.py

@ -7,13 +7,12 @@ from gpiod.line import Direction, Value
#from wakepy import keep
def minute_segment_from(the_time):
# this is mocked out too be a one minute segment instead
return the_time.replace(second=0, microsecond=0)
#return the_time.replace(minute=(the_time.minute // 1)*1, second=0, microsecond=0)
def path_to_video_at(time_stamp):
return 'videos/' + str(time_stamp) + '.mp4' # mkv required for h264 encoding
return 'videos/' + str(time_stamp) + '.mp4'
#delay for long delay
long_delay = timedelta(minutes=1)
@ -28,8 +27,8 @@ if not camera.isOpened():
# video writer
fourcc = cv2.VideoWriter_fourcc(*'mp4v')
camera.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter_fourcc(*'MJPG'))
camera.set(cv2.CAP_PROP_FPS, 60.0)
camera_fps = camera.get(cv2.CAP_PROP_FPS)
camera.set(cv2.CAP_PROP_FRAME_WIDTH, 1280)

Loading…
Cancel
Save