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 格式输出。

review: accept split_suggestion for multi-cut merged shots

Jayden2fce9451d460
diff --git a/rea_video/pipeline.py b/rea_video/pipeline.py
index 3dee7b0..d8f3ec3 100644
--- a/rea_video/pipeline.py
+++ b/rea_video/pipeline.py
@@ -373,6 +373,11 @@ def finalize(breakdown: dict, out: Path, engine: str = "seedance2.0") -> dict:
img_src = src if src and src != "unknown" else image_source_guess(rec["features"], rec["deterministic"]["facts"])
evidence = (list(rec["deterministic"]["evidence"]) + [f"[VLM] {e}" for e in (rec.get("vlm") or {}).get("evidence", [])[:6]]
+ [f"[{(rec.get('review') or {}).get('_by', 'agent')} 看图] {e}" for e in (rec.get("review") or {}).get("evidence", [])[:6]])
+ split = (rec.get("review") or {}).get("split_suggestion")
+ if split and split.get("cuts"):
+ evidence.append("[看图复核] 本镜头疑为多刀合并,建议在 "
+ + "、".join(fmt_time(c) for c in split["cuts"][:6]) + " 处按 " + "→".join(split["labels"][:6]) + " 拆分"
+ + (f"({split['note']})" if split.get("note") else ""))
decided = "fused" if rec.get("vlm") else ("fused_agent" if rec.get("review") else "deterministic")
user = rec.get("user") or {}
if user.get("label") in LABEL_ZH: # the user said what this shot is: that is the answer
diff --git a/rea_video/review.py b/rea_video/review.py
index d22e40f..ea90138 100644
--- a/rea_video/review.py
+++ b/rea_video/review.py
@@ -160,9 +160,15 @@ def _clean(ans: dict) -> tuple[dict | None, str | None]:
if isinstance(e, dict) and e.get("kind") in ASSET_KINDS:
assets.append({"kind": e["kind"], "description": str(e.get("description", "")),
"is_real_material": bool(e.get("is_real_material", e["kind"] != "ai_image"))})
+ sp = ans.get("split_suggestion")
+ split = ({"cuts": [float(c) for c in sp.get("cuts", [])][:12],
+ "labels": [str(x) for x in (sp.get("labels") or [])][:12],
+ "note": str(sp.get("note", ""))[:300]}
+ if isinstance(sp, dict) and sp.get("cuts") else None)
return {"label_probs": soft, "raw_probs": {k: round(v / total, 3) for k, v in vals.items()}, "image_source": src,
"evidence": [str(x) for x in (ans.get("evidence") or [])][:8], "description": str(ans.get("description", "")),
"embedded_assets": assets, "replication": rep, "aspects": aspects.clean_answers(ans.get("aspects")),
+ "split_suggestion": split,
"ai_edits": [{"kind": e["kind"], "evidence": str(e.get("evidence", ""))} for e in (ans.get("ai_edits") or [])
if isinstance(e, dict) and e.get("kind") in EDIT_KINDS]}, None
diff --git a/skills/rea-video/SKILL.md b/skills/rea-video/SKILL.md
index e619619..dbacaee 100644
--- a/skills/rea-video/SKILL.md
+++ b/skills/rea-video/SKILL.md
@@ -41,7 +41,7 @@ rea-video summary out/ref/breakdown.json
```bash
rea-video review out/ref # 写出 review_tasks.json(每镜要看的图、工具判断、优先级)和 review_answers.json(答案模板)
-# 读 review_tasks.json 的 instructions,逐镜看 images 里的图(priority=high 必看),把 label_probs / evidence / description / embedded_assets 填进 review_answers.json
+# 读 review_tasks.json 的 instructions,逐镜看 images 里的图(priority=high 必看),把 label_probs / evidence / description / embedded_assets 填进 review_answers.json;若某镜头实为多刀合并(dark 底的图形与口播互相交替时容易合并成一个镜头),可加 split_suggestion(cuts 秒点 + labels + note),报告会标注拆分建议
rea-video apply-review out/ref --by <你的名字> # 并入:重写 breakdown.json、report.md、report.html,打印改判了哪些镜头
rea-video summary out/ref/breakdown.json # 用并入后的结果写回复
```
diff --git a/tests/test_review.py b/tests/test_review.py
index a9aaee2..a3ab67a 100644
--- a/tests/test_review.py
+++ b/tests/test_review.py
@@ -73,3 +73,14 @@ def test_two_of_three_beat_one_confident_model():
# hard constraints still win: a frozen shot is never a generated video
frozen = fuse(p(static_hold=0.6), p(ai_video=0.9), "frozen", majority="ai_video")
assert max(frozen, key=frozen.get) == "static_hold" or frozen["ai_video"] < 0.5
+
+
+def test_split_suggestion_kept_when_valid_and_dropped_when_empty():
+ from rea_video.review import _clean
+
+ ok, err = _clean({"id": "shot_001", "label_probs": {"ai_video": 1.0},
+ "split_suggestion": {"cuts": [12.5, 40], "labels": ["code_render", "live_action"], "note": "n"}})
+ assert err is None and ok["split_suggestion"]["cuts"] == [12.5, 40.0]
+ assert ok["split_suggestion"]["labels"] == ["code_render", "live_action"]
+ bad, err2 = _clean({"id": "shot_001", "label_probs": {"ai_video": 1.0}, "split_suggestion": {"cuts": []}})
+ assert err2 is None and not bad.get("split_suggestion")