From 89528a6c4ab4714de41e9ef084882ab6253d99f9 Mon Sep 17 00:00:00 2001 From: TNTwise Date: Wed, 25 Sep 2024 21:26:01 -0500 Subject: [PATCH] make counter less confusing --- backend/src/RenderVideo.py | 2 +- backend/src/SceneDetect.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/RenderVideo.py b/backend/src/RenderVideo.py index ebc6e43c..53e16360 100644 --- a/backend/src/RenderVideo.py +++ b/backend/src/RenderVideo.py @@ -207,7 +207,7 @@ def getTransitionFrame(self): def render(self): self.currentTransitionFrameNumber = self.getTransitionFrame() - counter = -1 + counter = 0 while True: if not self.isPaused: frame = self.readQueue.get() diff --git a/backend/src/SceneDetect.py b/backend/src/SceneDetect.py index 02b3a78a..ced041ea 100644 --- a/backend/src/SceneDetect.py +++ b/backend/src/SceneDetect.py @@ -84,7 +84,7 @@ def getPySceneDetectTransitions(self) -> Queue: # sceneChangeList += detectedFrameList match len(detectedFrameList): case 1: - sceneChangeQueue.put(detectedFrameList[0] - 1) + sceneChangeQueue.put(detectedFrameList[0]) return sceneChangeQueue def getMeanTransitions(self): @@ -96,7 +96,7 @@ def getMeanTransitions(self): self.readQueue.get(), width=self.width, height=self.height ) if detector.sceneDetect(frame): - sceneChangeQueue.put(frame_num - 1) + sceneChangeQueue.put(frame_num ) return sceneChangeQueue def getTransitions(self) -> Queue: