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)