Skip to content

Reverse-engineer any video, shot by shot: filmed, AI-generated or coded, and how to remake it. Breakdowns in the open VIDEO.md format. 逆向一切视频,逐个镜头看是拍的、AI 生成的还是代码做的,再告诉你怎么复刻;拆解结果按 VIDEO.md 格式输出。

Keep a dissolve's measured span when shots are rebuilt from the survey

heojunfo4440430ee3bb
diff --git a/rea_video/shots.py b/rea_video/shots.py
index 3dd2263..8a754e5 100644
--- a/rea_video/shots.py
+++ b/rea_video/shots.py
@@ -543,7 +543,9 @@ def shots_from_cuts(track: FrameTrack, detected: list[Shot], cuts: list[dict], m
if c:
old = by_frame.get(f)
kind = c.get("kind") or "cut"
- if old is not None and kind in ("cut", "effect"):
+ # the detector's own boundary (a cut, or the dissolve / fade / wipe it measured) keeps what it measured;
+ # only a kind the survey named for it replaces that
+ if old is not None and (kind in ("cut", "effect") or c.get("by") == "tool" or kind == old.transition_in):
trans, score, tdict = old.transition_in, old.boundary_score, dict(old.transition)
else:
trans, score = kind, float(c.get("p") or 0.5)