Formatting

This commit is contained in:
Nick Mowen 2023-06-15 07:06:21 -06:00
parent c58b8a883e
commit 1c2685515c
2 changed files with 0 additions and 3 deletions

View File

@ -123,11 +123,9 @@ class RecordingMaintainer(threading.Thread):
.order_by(Event.start_time)
)
start = datetime.datetime.now().timestamp()
await asyncio.gather(
*(self.validate_segment(camera, events, r) for r in recordings)
)
logger.error(f"The time took {datetime.datetime.now().timestamp() - start} seconds")
async def validate_segment(
self, camera: str, events: Event, recording: dict[str, any]

View File

@ -1159,7 +1159,6 @@ def get_video_properties(url, get_duration=False):
# Get the frames per second (fps) of the video stream
fps = video.get(cv2.CAP_PROP_FPS)
total_frames = int(video.get(cv2.CAP_PROP_FRAME_COUNT))
logger.error(f"Got values {total_frames} / {fps} == {total_frames / max(fps, 1)}")
if fps and total_frames:
duration = total_frames / fps