From 003d4ff6c803cbd8c7a3e54c84b07268a21d301d Mon Sep 17 00:00:00 2001 From: Chev Date: Mon, 26 Jan 2026 17:18:22 -0800 Subject: [PATCH] Don't let duplicated clips go past the final video duration Forgot to account for the clip's duration --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 9c18362..cd014be 100644 --- a/main.py +++ b/main.py @@ -195,7 +195,7 @@ with tqdm(desc="Compiling sounds", total=len(randomSounds)) as pbar: dupe_clip_position = clipPosition + ((i * 0.9) * rng.uniform(0.8, 1.2)) # If the duplicate clip goes over the final video duration, simply discard that duplicate clip - if dupe_clip_position > finalVideo.duration: + if (dupe_clip_position + newClip.duration) > finalVideo.duration: continue """# Max 0 and clip position - 2 so it doesn't go into negative clip position (if near beginning of video)