diff --git a/src/main/java/org/example/videoclips/editing/HighlightVisionDirector.java b/src/main/java/org/example/videoclips/editing/HighlightVisionDirector.java index 7433333..5419e80 100644 --- a/src/main/java/org/example/videoclips/editing/HighlightVisionDirector.java +++ b/src/main/java/org/example/videoclips/editing/HighlightVisionDirector.java @@ -107,10 +107,13 @@ public class HighlightVisionDirector { if (payoffIdx < 0 || plan.shots().isEmpty()) { return plan; } + // Caption the CHOSEN PEAK itself — the payoff (slow-mo) shot — not the trailing outcome/button shots. + // Sampling through to the last shot let a post-payoff reaction frame (e.g. the bowler lowering his arms + // and holding his face after the celebration) supply the overlay; confining it to the payoff shot keeps + // the label on the decisive moment the judge picked. MontagePlan.Shot payoffShot = plan.shots().get(payoffIdx); - MontagePlan.Shot last = plan.shots().get(plan.shots().size() - 1); double winStart = payoffShot.sourceStartSeconds(); - double winEnd = last.sourceStartSeconds() + last.durationSeconds() * Math.max(0.05, last.speed()); + double winEnd = payoffShot.sourceStartSeconds() + payoffShot.durationSeconds() * Math.max(0.05, payoffShot.speed()); if (winEnd <= winStart) { winEnd = winStart + 1.0; }