mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-09 08:37:37 +03:00
Fix missing previews
This commit is contained in:
parent
9b800a45e3
commit
02263bc0a3
@ -463,6 +463,13 @@ class ReviewDescriptionProcessor(PostProcessorApi):
|
|||||||
thumbs = []
|
thumbs = []
|
||||||
for idx, thumb_path in enumerate(frame_paths):
|
for idx, thumb_path in enumerate(frame_paths):
|
||||||
thumb_data = cv2.imread(thumb_path)
|
thumb_data = cv2.imread(thumb_path)
|
||||||
|
|
||||||
|
if thumb_data is None:
|
||||||
|
logger.warning(
|
||||||
|
"Could not read preview frame at %s, skipping", thumb_path
|
||||||
|
)
|
||||||
|
continue
|
||||||
|
|
||||||
ret, jpg = cv2.imencode(
|
ret, jpg = cv2.imencode(
|
||||||
".jpg", thumb_data, [int(cv2.IMWRITE_JPEG_QUALITY), 100]
|
".jpg", thumb_data, [int(cv2.IMWRITE_JPEG_QUALITY), 100]
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user