From 5c8df5f9d5bc0b83152f9cdf32368722fdd1afd9 Mon Sep 17 00:00:00 2001 From: Shuming Liu Date: Sat, 31 Jan 2026 16:37:31 +0800 Subject: [PATCH] add displaying info --- video_cleaner.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/video_cleaner.py b/video_cleaner.py index 82172ac..6970fba 100644 --- a/video_cleaner.py +++ b/video_cleaner.py @@ -60,6 +60,7 @@ class VideoCleaner: """ Scans the video using YOLO's native stream processing. """ + print(f"[{os.getpid()}] Analyzing: {video_path.name}", flush=True) model = self._get_model() # Use YOLO's generator to handle video decoding efficiently # vid_stride=int(fps*2) could be used but we need consistent logic @@ -114,10 +115,10 @@ class VideoCleaner: keep, reason = self.should_keep_video(video_path, save_preview_path=preview_path) if keep: - print(f"Action: KEEP {video_path.name} - Reason: {reason}") + print(f"[{os.getpid()}] Action: KEEP {video_path.name} - Reason: {reason}", flush=True) self.move_to_processed(video_path, processed_base_dir, input_base_dir) else: - print(f"Action: DELETE {video_path.name} - Reason: {reason}") + print(f"[{os.getpid()}] Action: DELETE {video_path.name} - Reason: {reason}", flush=True) os.remove(video_path) return True # 表示处理了