From 24b04fd55e6afaaafd4816e342ae98b800396674 Mon Sep 17 00:00:00 2001 From: jenstandstad Date: Thu, 16 Jul 2026 13:58:11 +0200 Subject: [PATCH] Fixing problem where the video narration got repeat due to chunking --- gnommo/preprocessor.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gnommo/preprocessor.py b/gnommo/preprocessor.py index 568ccd9..09c9662 100644 --- a/gnommo/preprocessor.py +++ b/gnommo/preprocessor.py @@ -662,11 +662,15 @@ def preprocess_video( # No filters defined, return original file return videos_dir / video_source.source_file - # Use custom intermediate dir if provided, otherwise default to videos_dir/intermediate + # Use custom intermediate dir if provided, otherwise default to videos_dir/intermediate. + # Always namespace by video_id so segments processed in parallel (or across + # overlapping runs) never share the chunks/ dir and concat.txt — otherwise + # they overwrite each other's chunk_NNNN.mov and one segment's footage bleeds + # into another's processed output (duplicated/inflated narration). if custom_gnommo_scratch: gnommo_scratch = custom_gnommo_scratch / video_id else: - gnommo_scratch = videos_dir / "intermediate" + gnommo_scratch = videos_dir / "intermediate" / video_id gnommo_scratch.mkdir(parents=True, exist_ok=True) # Start with the source file (relative to videos_dir)