Adding fixes to the stitcher

This commit is contained in:
2026-07-05 12:16:35 +02:00
parent b9b5a8e77d
commit f9ff847f6b
11 changed files with 1019 additions and 167 deletions
+10 -6
View File
@@ -831,11 +831,15 @@ def build_render_plan(
)
)
# Offset all events that come AFTER this pause
# Offset all events that come AFTER this pause.
# Use >= so a slide that transitions at exactly narration_time is
# pushed past the pause (matching the >= already used for video events).
# Also extend the end_time of the current slide so it stays visible
# as the background behind the pause-video overlay, avoiding a gap.
for slide_event in slide_events:
if slide_event.start_time > narration_time:
if slide_event.start_time >= narration_time:
slide_event.start_time += pause_duration
if slide_event.end_time > narration_time:
if slide_event.end_time >= narration_time:
slide_event.end_time += pause_duration
for vid_event in video_events:
@@ -1100,7 +1104,7 @@ def _extract_video_events(
(p for p in _SHORTHAND_PREFIXES if mid.startswith(p)), None
)
if shorthand_match:
video_id = mid[len(shorthand_match) :]
video_id = mid[len(shorthand_match) :].lower()
if video_id not in videos:
warnings.append(
f"[{mid}] references unknown video '{video_id}' — skipped. "
@@ -1121,7 +1125,7 @@ def _extract_video_events(
# --- legacy [video:xxx] ---
if mid.startswith("video:"):
video_id = mid[6:]
video_id = mid[6:].lower()
if video_id not in videos:
warnings.append(
f"[video:{video_id}] references unknown video '{video_id}' — skipped."
@@ -1138,7 +1142,7 @@ def _extract_video_events(
# --- [narration:xxx] ---
if mid.startswith("narration:"):
video_id = mid[10:]
video_id = mid[10:].lower()
if video_id not in videos:
warnings.append(
f"[narration:{video_id}] references unknown video '{video_id}' — skipped."