Fix cutter compare fallback for single-shot matches
This commit is contained in:
Binary file not shown.
@@ -463,9 +463,21 @@ def collect_rows(
|
||||
|
||||
# Frame-locked compare video
|
||||
cmp4 = clips_dir / f"beat_{bid:02d}_compare.mp4"
|
||||
compare_segs = segs
|
||||
if not compare_segs:
|
||||
seg_dur = max(0.04, min(beat_dur, rec["out_point_s"] - rec["in_point_s"]))
|
||||
compare_segs = [{
|
||||
"trailer_offset_s": 0.0,
|
||||
"duration_s": seg_dur,
|
||||
"scene_id": rec.get("scene_id"),
|
||||
"in_point_s": rec["in_point_s"],
|
||||
"out_point_s": rec["in_point_s"] + seg_dur,
|
||||
"match_score": rec.get("match_score", 0.0),
|
||||
"is_confirmed": rec.get("is_confirmed", False),
|
||||
}]
|
||||
if build_compare_clip(
|
||||
trailer_path, beat["start_s"], beat_dur,
|
||||
source_path, segs if num_segs >= 1 else [],
|
||||
source_path, compare_segs,
|
||||
cmp4,
|
||||
):
|
||||
compare_clip = cmp4
|
||||
|
||||
Reference in New Issue
Block a user