bug squashing

This commit is contained in:
Micha Albert 2024-10-05 15:16:45 -04:00
parent fa4bd9e7c1
commit 8b4f6b8d26
4 changed files with 9 additions and 5 deletions

View file

@ -48,7 +48,7 @@ async def rotate_fernet_key():
def get_recording_duration(timestamp, stream_key):
vid = cv2.VideoCapture(
f"/home/onboard/recordings/{stream_key}/{datetime.strptime(timestamp, '%Y-%m-%dT%H:%M:%S.%fZ').strftime('%Y-%m-%d_%H-%M-%S-%f')}.mp4"
f"/recordings/{stream_key}/{datetime.strptime(timestamp, '%Y-%m-%dT%H:%M:%S.%fZ').strftime('%Y-%m-%d_%H-%M-%S-%f')}.mp4"
)
return int(
(vid.get(cv2.CAP_PROP_FRAME_COUNT) / vid.get(cv2.CAP_PROP_FPS)) / 60