From 24c8021bd362f608031869176574d709ca3821f6 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Thu, 4 Sep 2025 21:47:56 +0200 Subject: [PATCH] refactor(main.py): update video preloading comment to reflect new approach and improve readability --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 97e9909..655d569 100644 --- a/main.py +++ b/main.py @@ -529,14 +529,14 @@ class MediaGrader: self.segment_current_frames[i] = start_frame # Start each segment at its position print(f"Segment positions: {self.segment_positions}") - # Preload the entire video into memory with threaded I/O + # Preload the entire video into memory - simple and fast print("Preloading entire video into memory...") preload_start = time.time() if self.current_cap and self.current_cap.isOpened(): self.current_cap.set(cv2.CAP_PROP_POS_FRAMES, 0) - # Read all frames in one shot - let OpenCV and OS handle buffering + # Simple, fast sequential read frames = [] frame_count = 0