mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 10:45:21 +03:00
Formatting
This commit is contained in:
parent
c58b8a883e
commit
1c2685515c
@ -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]
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user