Fixing problem where the video narration got repeat due to chunking

This commit is contained in:
2026-07-16 13:58:11 +02:00
parent 316441ccb8
commit 24b04fd55e
+6 -2
View File
@@ -662,11 +662,15 @@ def preprocess_video(
# No filters defined, return original file # No filters defined, return original file
return videos_dir / video_source.source_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: if custom_gnommo_scratch:
gnommo_scratch = custom_gnommo_scratch / video_id gnommo_scratch = custom_gnommo_scratch / video_id
else: else:
gnommo_scratch = videos_dir / "intermediate" gnommo_scratch = videos_dir / "intermediate" / video_id
gnommo_scratch.mkdir(parents=True, exist_ok=True) gnommo_scratch.mkdir(parents=True, exist_ok=True)
# Start with the source file (relative to videos_dir) # Start with the source file (relative to videos_dir)