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

Break down acting and carry it into remakes

june3efe2ce86b32
diff --git a/docs/videomd.md b/docs/videomd.md
index 2b4d783..d2dc429 100644
--- a/docs/videomd.md
+++ b/docs/videomd.md
@@ -21,13 +21,13 @@
| 文件 | 内容 |
|---|---|
| `VIDEO.md` | 卡片带 `made_mix`(按时长的制作方式占比)、`confidence`、`readers`(工具 / 看图模型 / agent / 人工)、`source.sha256`;正文是结论、讲什么、叙事线、复刻概要、要拿到的真实素材、不确定点、地图 |
-| `video/timeline.md` | `story` 叙事作用 · `seen` 画面 · `camera` 运镜 · `overlay` 叠加层 · `made~` 制作方式 · `material~` 素材来源 · `remake` 复刻路线 · `flag` 需要复核 |
+| `video/timeline.md` | `story` 叙事作用 · `seen` 画面 · `act` 表演 · `camera` 运镜 · `overlay` 叠加层 · `made~` 制作方式 · `material~` 素材来源 · `remake` 复刻路线 · `flag` 需要复核 |
| `video/content.md` | 内容与结构、叙事线、台词 |
| `video/cast.md` | 角色、场景、道具 |
| `video/sound.md` | 人声、BGM、音效、节拍和来源 |
| `video/look.md` | 实拍镜头的景别、机位、打光、剪辑和器材(有实拍镜头时) |
| `video/packaging.md` | 字幕、花字、贴纸、画中画的时间和样式 |
-| `video/remake.md` | 复刻方案:生成单元、拍摄场次、代码合成、要准备的真实素材 |
+| `video/remake.md` | 复刻方案:生成单元、拍摄场次、代码合成、要准备的真实素材、表演与情绪 |
| `video/shots/<编号>.md` | 每镜的 `inferred`(制作方式、概率、次选、由谁判定、有没有真实素材)、`flags`、`frames`;正文是看得到的、推断和依据、提示词 |
| `breakdown.json`、`shots/`、`stems/`、`sfx/`、`packaging/`、`frames/`(有代码渲染镜头时才有)、`storyboard.jpg`、`audio.png` | 完整数据和媒体文件,地图里都列着 |
diff --git a/rea_video/audio.py b/rea_video/audio.py
index 686dd5f..6fc6d8c 100644
--- a/rea_video/audio.py
+++ b/rea_video/audio.py
@@ -528,8 +528,10 @@ def merge_audio_with_vlm(audio: dict, whole: dict | None) -> dict:
plan.append({"track": "voice", "rule": "A01-narration",
"what": ((T("TTS 旁白", "TTS voice-over") if n.get('type') == 'tts' else T("真人口播/对白", "human talking head / dialogue") if n.get('type') == 'human' else T("人声", "voice"))
+ f"{T(',', ', ')}{n.get('voice') or voice.get('gender_hint') or ''}{T(',', ', ')}{n.get('style') or ''}").strip(T(",", ", ")),
- "how": T("capsule-cinema DoubaoTTSTool / UniversalTTSTool(或 MiniMax 克隆音色);需要卡原时间窗时用时长可控 TTS",
- "capsule-cinema DoubaoTTSTool / UniversalTTSTool (or a MiniMax cloned voice); use duration-controlled TTS when it must fit the original time window"),
+ "how": T("capsule-cinema DoubaoTTSTool / UniversalTTSTool(或 MiniMax 克隆音色);需要卡原时间窗时用时长可控 TTS;"
+ "按「脚本」里每句的语气生成,只在情绪转折的句子加语气标签,台词按说话的样子写(停顿、语气词),不按书面稿念",
+ "capsule-cinema DoubaoTTSTool / UniversalTTSTool (or a MiniMax cloned voice); use duration-controlled TTS when it must fit the original time window; "
+ "follow each line's delivery in the script, add tone tags only on the lines where the emotion turns, and write lines the way they are spoken (pauses, fillers), not as written copy"),
"segments": voice.get("segments", [])[:40], "lines": n.get("lines", [])[:60],
"real_material": n.get("type") == "human"})
if music.get("present") or m.get("present"):
diff --git a/rea_video/entities.py b/rea_video/entities.py
index 1cacbe0..857fd79 100644
--- a/rea_video/entities.py
+++ b/rea_video/entities.py
@@ -105,10 +105,15 @@ def script(b: dict) -> list[dict]:
w = b.get("whole_video_vlm") or {}
who = b.get("speakers") or {}
turns = who.get("turns") or [] if who.get("count", 0) >= 2 else []
+ from .performance import delivery_at
+
rows = []
for ln in ((w.get("narration") or {}).get("lines") or []):
if isinstance(ln, dict) and _s(ln, "text"):
rows.append({"start": ln.get("start"), "end": ln.get("end"), "speaker": _s(ln, "speaker", 20), "text": _s(ln, "text", 200)})
+ how = _s(ln, "delivery", 60) or delivery_at(b, ln.get("start"), ln.get("end"))
+ if how:
+ rows[-1]["delivery"] = how
if turns and isinstance(ln.get("start"), (int, float)) and isinstance(ln.get("end"), (int, float)):
from .speakers import speaker_at
@@ -120,8 +125,10 @@ def script(b: dict) -> list[dict]:
for ln in ((b.get("speech") or {}).get("lines") or []): # machine transcript: below the VLM's, above segment copy
if isinstance(ln, dict) and _s(ln, "text"):
voice = _s(ln, "speaker", 8) if turns else ""
+ how = delivery_at(b, ln.get("start"), ln.get("end"))
rows.append({"start": ln.get("start"), "end": ln.get("end"), "speaker": speaker_label(b, voice) if voice else "",
- "text": _s(ln, "text", 200), "source": "asr", **({"voice": voice} if voice else {})})
+ "text": _s(ln, "text", 200), "source": "asr", **({"voice": voice} if voice else {}),
+ **({"delivery": how} if how else {})})
if rows:
return rows
for seg in w.get("segments") or []:
diff --git a/rea_video/performance.py b/rea_video/performance.py
new file mode 100644
index 0000000..ff20d08
--- /dev/null
+++ b/rea_video/performance.py
@@ -0,0 +1,175 @@
+"""How the people in a shot act: the main emotion, how strong it is, what the face and body do, how the voice sounds,
+and how it changes inside the shot.
+
+A remake that keeps the picture and the words but not the acting comes out flat. Video models handle emotion words
+poorly: "sad" or "very angry" tends to give a mask face, a forced smile or glowing eyes. What works is the visible
+part: eyes, brows, mouth, head and hands, at a modest strength, written as a change over time. So the emotion
+word is kept for the reader, and the prompt gets the visible cues.
+
+Nothing here is measured. It comes from a reader looking at the frames: the agent's review (`review_answers.json`,
+per shot `performance`) or the per-shot VLM pass. The agent's answer wins where both exist.
+"""
+from __future__ import annotations
+
+from .i18n import LangDict, T, semi
+
+INTENSITY = ("low", "mid", "high")
+INTENSITY_ZH = LangDict({"low": "轻", "mid": "中", "high": "强"}, en={"low": "light", "mid": "medium", "high": "strong"})
+_INTENSITY_ALIASES = {"轻": "low", "弱": "low", "小": "low", "1": "low", "2": "low", "中": "mid", "适中": "mid", "medium": "mid", "3": "mid",
+ "强": "high", "大": "high", "strong": "high", "4": "high", "5": "high"}
+
+# labels whose picture can hold a performance; screens, code graphics and stills cannot
+ACTING_LABELS = ("live_action", "ai_video", "avatar", "cg_3d", "anim_2d", "stop_motion", "film_footage")
+
+# shared by the VLM prompt and the review instructions so both readers answer the same question
+GUIDE = """画面里有人物、动物、卡通角色或数字人在表演(脸或肢体看得清)时填 performance,否则写 null(空镜、商品特写、只有手、远景看不清脸):
+- who:谁在演(和角色表里的编号或称呼一致)
+- emotion:一个主情绪词(平静 / 开心 / 期待 / 好奇 / 惊讶 / 委屈 / 生气 / 紧张 / 得意 / 无奈 …);一个镜头只写一个主情绪
+- intensity:low|mid|high,按看到的幅度写;多数口播、带货是 low 或 mid
+- face:看得见的面部动作,不写情绪词:眼睛(睁大、眯起、看镜头、眼神躲开、眨眼)、眉(上扬、皱起、眉心收紧)、嘴(嘴角上扬或下压、抿嘴、张嘴)、脸颊和下巴
+- body:头、肩、手、姿态、呼吸(点头、歪头、耸肩、手捂嘴、身体前倾、深吸一口气)
+- arc:镜头里情绪有变化时按秒写,t 是相对镜头开头的秒:[{"t": 0.0, "state": "这一刻看得见的表情和动作"}];没变化写 []
+- voice:画面里的角色在这一镜开口(说话、笑、叹气)时写语气、语速、音量、停顿("压低声音,语速慢,句尾带笑");画外旁白或没人开口留空
+- key:true = 表演是这一镜的看点(反应镜头、情绪爆发、反转时的表情),复刻时要专门保证"""
+
+
+def intensity_code(v) -> str:
+ s = str(v or "").strip().lower()
+ if s in INTENSITY:
+ return s
+ return _INTENSITY_ALIASES.get(s, "")
+
+
+def _txt(v, n: int = 160) -> str:
+ return " ".join(str(v or "").split())[:n] if isinstance(v, (str, int, float)) else ""
+
+
+def clean(v) -> dict | None:
+ """One answer to stored form; None when it says nothing about acting."""
+ if not isinstance(v, dict):
+ return None
+ arc = []
+ for a in v.get("arc") or [] if isinstance(v.get("arc"), list) else []:
+ if isinstance(a, dict) and _txt(a.get("state")):
+ try:
+ t = round(max(0.0, float(a.get("t", 0) or 0)), 2)
+ except (TypeError, ValueError):
+ t = 0.0
+ arc.append({"t": t, "state": _txt(a.get("state"), 80)})
+ out = {"who": _txt(v.get("who"), 30), "emotion": _txt(v.get("emotion"), 20), "intensity": intensity_code(v.get("intensity")),
+ "face": _txt(v.get("face")), "body": _txt(v.get("body")), "arc": sorted(arc, key=lambda a: a["t"])[:6],
+ "voice": _txt(v.get("voice"), 100), "key": v.get("key") is True or str(v.get("key")).lower() == "true"}
+ if not any(out[k] for k in ("emotion", "face", "body", "arc", "voice")):
+ return None
+ return out
+
+
+def of(rec: dict) -> dict | None:
+ """The shot's performance: the agent's review wins over the VLM (it is the later, checked pass)."""
+ for src in ("review", "vlm"):
+ got = clean((rec.get(src) or {}).get("performance"))
+ if got:
+ return got
+ return None
+
+
+def _strength() -> dict[str, str]:
+ # "open it to about a third": full-strength words give mask faces and forced smiles
+ return {"low": T("幅度很小,几乎看不出", "very subtle, barely visible"),
+ "mid": T("幅度适中,不夸张", "moderate, not exaggerated"),
+ "high": T("情绪外放,但五官不变形", "openly expressed, features stay natural")}
+
+
+def prompt_line(p: dict | None) -> str:
+ """The acting as prompt words: visible cues, strength and the change over time; no bare emotion word."""
+ if not p:
+ return ""
+ bits = [x for x in (p.get("face"), p.get("body")) if x]
+ if p.get("arc"):
+ bits.append(T(",", ", ").join(T("开头{s}", "at the start {s}", s=a["state"]) if a["t"] < 0.05 else
+ T("{t:.1f} 秒时{s}", "at {t:.1f}s {s}", t=a["t"], s=a["state"]) for a in p["arc"]))
+ if not bits:
+ return ""
+ head = T("表演", "Acting") + (T("({s})", " ({s})", s=_strength()[p["intensity"]]) if p.get("intensity") else "")
+ return head + T(":", ": ") + T(";", "; ").join(bits)
+
+
+def image_line(p: dict | None) -> str:
+ """The expression for a first-frame image: the face at the start of the shot."""
+ if not p:
+ return ""
+ face = p["arc"][0]["state"] if p.get("arc") and p["arc"][0]["t"] < 0.3 else p.get("face")
+ return T("表情:{f}", "Expression: {f}", f=face) if face else ""
+
+
+FILMED = ("live_action", "stop_motion", "film_footage") # acted in front of a camera: the cues direct the actor
+ROUTE_ZH = LangDict({"voice": "先配音再驱动", "transfer": "首帧 + 表演迁移", "first_frame": "首帧定表情", "shoot": "演员照着演"},
+ en={"voice": "voice first, then drive", "transfer": "first frame + performance transfer",
+ "first_frame": "expression in the first frame", "shoot": "actor plays it"})
+
+
+def route_kind(p: dict | None, label: str = "") -> str:
+ """How this acting is best reproduced: by a real actor, from the voice, from the first frame, or by transferring
+ a real performance when the emotion itself is the point."""
+ if not p:
+ return ""
+ if label in FILMED:
+ return "shoot"
+ if p.get("voice"):
+ return "voice"
+ if p.get("key") and p.get("intensity") == "high":
+ return "transfer"
+ return "first_frame"
+
+
+def route_text(kind: str) -> str:
+ return {
+ "voice": T("有台词:先按语气做配音(TTS 只在情绪转折处加语气标签,或真人录),再用音频驱动的模型出口型和表情"
+ "(Kling Avatar、OmniHuman);用能直接出声的视频模型时,把台词和语气一起写进提示词",
+ "Speaking: make the voice with its delivery first (TTS with tone tags only where the emotion turns, or a real recording), "
+ "then drive mouth and face from that audio (Kling Avatar, OmniHuman); with a video model that makes sound itself, "
+ "put the line and its delivery in the prompt together"),
+ "transfer": T("情绪是这一镜的看点:首帧图先把表情做到位;还不够就真人对着镜头演一遍,用表演迁移到角色上(Runway Act-Two、Kling 动作控制、Wan Animate)",
+ "The emotion is the point of the shot: get the expression right in the first frame; if that is not enough, act it once "
+ "on camera and transfer the performance to the character (Runway Act-Two, Kling Motion Control, Wan Animate)"),
+ "first_frame": T("首帧图里先把表情做到位,提示词只写动作和变化", "Get the expression right in the first frame; the prompt only describes the motion and the change"),
+ "shoot": T("实拍:把表情、动作、语气当表演提示给演员,对着原片先练一遍停顿和语气",
+ "Filmed: hand the face, movement and delivery to the actor as direction, and rehearse the pauses and tone against the original once"),
+ }.get(kind, "")
+
+
+def summary(p: dict) -> str:
+ """One short reader line: "开心(轻)· 眼睛眯起,嘴角上扬"."""
+ head = p.get("emotion") or ""
+ if p.get("intensity"):
+ head += T("({i})", " ({i})", i=INTENSITY_ZH[p["intensity"]])
+ return " · ".join(x for x in (head, p.get("face") or p.get("body")) if x)
+
+
+def delivery_at(b: dict, start, end) -> str:
+ """The voice of the shot under a line, for the script's delivery column when no reader gave one per line."""
+ if not isinstance(start, (int, float)) or not isinstance(end, (int, float)):
+ return ""
+ mid = (start + end) / 2
+ for r in b.get("shots", []):
+ if r["start"] <= mid < r["end"]:
+ return (of(r) or {}).get("voice") or ""
+ return ""
+
+
+def table(b: dict) -> tuple[list[list], list[str]]:
+ """Report rows (shot, who, emotion, face, movement, delivery, how) and the routes used, in first-seen order."""
+ rows, kinds = [], []
+ for r in b.get("shots", []):
+ p = of(r)
+ if not p:
+ continue
+ emo = (p.get("emotion") or "—") + (T("({i})", " ({i})", i=INTENSITY_ZH[p["intensity"]]) if p.get("intensity") else "")
+ if p.get("key"):
+ emo += T(" ★看点", " ★key")
+ moves = semi().join(x for x in [p.get("body") or ""] + [f"{a['t']:.1f}s {a['state']}" for a in p.get("arc") or []] if x)
+ kind = route_kind(p, (r.get("base") or {}).get("label", ""))
+ if kind not in kinds:
+ kinds.append(kind)
+ rows.append([f"#{r['index']}", p.get("who") or "—", emo, p.get("face") or "—", moves or "—", p.get("voice") or "—", ROUTE_ZH[kind]])
+ return rows, kinds
diff --git a/rea_video/plan.py b/rea_video/plan.py
index b366f94..d526fc7 100644
--- a/rea_video/plan.py
+++ b/rea_video/plan.py
@@ -92,6 +92,21 @@ def _where(cx: float | None, cy: float | None) -> tuple[str, str] | None:
f"subject in the {(v[1] + ' ') if v[1] else ''}{h[1]} of the frame".replace("upper centre", "upper middle").replace("lower centre", "lower middle")
+def with_acting(prompt: str, act: dict | None, image: bool = False) -> str:
+ """Add the visible acting (face, body, change over time, strength) to a shot prompt, unless the prompt already
+ carries it. Readers' prompts tend to name the emotion or leave the face out, which gives a flat or mask-like remake."""
+ from .performance import image_line, prompt_line
+
+ line = image_line(act) if image else prompt_line(act)
+ if not prompt or not line:
+ return prompt
+ cue = (act or {}).get("face") or ""
+ if cue and cue in prompt:
+ return prompt
+ end = "" if prompt.rstrip().endswith(("。", ".", ";", ";")) else T("。", ". ")
+ return prompt.rstrip() + end + line
+
+
def framing_words(shot: dict) -> tuple[str, str]:
"""Shot size, camera angle, subject position and camera move as a prompt prefix, (report language, English).
The readers' free-text prompts tend to keep the style words and drop these, which flattens the camera in a remake."""
@@ -304,11 +319,14 @@ class Planner:
# the measured / seen framing goes in front, so a remake keeps the camera height, angle and subject position
fw, fw_en = framing_words(shot)
still = T(",", ", ").join(w for w in fw.split(T(",", ", ")) if not w.startswith(T("镜头", "camera ")))
+ from .performance import of as _acting
+
+ act = _acting(shot)
plan["capsule"] = {
"engine": engine, "generation_type": gen_type, "duration": gen_dur,
"trim_to": round(dur, 3), "aspect_ratio": video.get("aspect_ratio", "9:16"),
- "prompt": _with_framing(prompt, fw), "prompt_en": _with_framing(rep.get("video_prompt_en", ""), fw_en),
- "image_prompt": _with_framing(rep.get("image_prompt", ""), still), "framing": fw,
+ "prompt": with_acting(_with_framing(prompt, fw), act), "prompt_en": _with_framing(rep.get("video_prompt_en", ""), fw_en),
+ "image_prompt": with_acting(_with_framing(rep.get("image_prompt", ""), still), act, image=True), "framing": fw,
"needs_split": dur > hi,
}
if not prompt:
diff --git a/rea_video/production.py b/rea_video/production.py
index 79e33e1..45adacd 100644
--- a/rea_video/production.py
+++ b/rea_video/production.py
@@ -22,7 +22,8 @@ from .util import read_image
from .classify import LABEL_ZH
from .aspects.camera import SUPPORT_ZH
from .aspects.vocab import canon, show
-from .plan import CODE_STYLES, Planner, code_scene, shot_prompts
+from .plan import CODE_STYLES, Planner, code_scene, shot_prompts, with_acting
+from . import performance
GEN_LABELS = ("ai_video", "cg_3d", "anim_2d")
SHOOT_LABELS = ("live_action", "stop_motion")
@@ -399,7 +400,7 @@ def _unit(seg: list[dict], k: int, lim: dict, model: dict | None, style: str, ca
head.append(T("参考 @视频1 的动作、运镜和剪辑节奏", "Follow the action, camera movement and cutting rhythm of @视频1"))
if len(seg) > 1:
head.append(T("镜头之间硬切", "Hard cuts between shots"))
- lines, lines_en, missing = [], [], []
+ lines, lines_en, missing, acting = [], [], [], []
acc = 0.0
for i, r in enumerate(seg, 1):
p = shot_prompts(r)
@@ -407,6 +408,11 @@ def _unit(seg: list[dict], k: int, lim: dict, model: dict | None, style: str, ca
if not text:
missing.append(r["index"])
text = T("(缺提示词:开 --vlm 或 agent 看图补写)", "(prompt missing: run --vlm or have the agent write one from the frames)")
+ act = performance.of(r)
+ text = with_acting(text, act)
+ if act:
+ acting.append({"shot": r["index"], "line": performance.summary(act), "key": act["key"],
+ "how": performance.ROUTE_ZH[performance.route_kind(act, r["base"]["label"])]})
a, z = acc, acc + r["duration"]
acc = z
lines.append(T("镜头{i}({a:.1f}–{z:.1f}s):{text}", "Shot {i} ({a:.1f}–{z:.1f}s): {text}", i=i, a=a, z=z, text=text) if len(seg) > 1 else text)
@@ -423,7 +429,9 @@ def _unit(seg: list[dict], k: int, lim: dict, model: dict | None, style: str, ca
"generate_s": max(dur, lim["min"], unit_min if len(seg) == 1 else 0), "refs": refs, "continuity": cont,
"prompt": T("。", ". ").join(head) + T("。\n", ".\n") + "\n".join(lines),
"prompt_en": "\n".join(lines_en) if len(lines_en) == len(seg) else "",
- "image_prompt": shot_prompts(seg[0]).get("image_prompt", "")}
+ "image_prompt": with_acting(shot_prompts(seg[0]).get("image_prompt", ""), performance.of(seg[0]), image=True)}
+ if acting:
+ unit["acting"] = acting
unit["method"], unit["inputs"] = _inputs(seg, lim, refs, prev_unit["id"] if chained else None, parts)
if missing:
unit["prompt_missing"] = missing
@@ -807,6 +815,8 @@ def report_md(plan: dict) -> list[str]:
for k in ("note", "alt"):
if u.get(k):
L.append(f"- {u[k]}")
+ for a in u.get("acting") or []:
+ L.append(T("- 表演 #{s}{k}:{l}({h},见「表演与情绪」)", "- Acting #{s}{k}: {l} ({h}, see “Acting and emotion”)", s=a["shot"], k=T("(看点)", " (key)") if a["key"] else "", l=a["line"], h=a["how"]))
if u.get("prompt_missing"):
L.append(T("- 镜头 {sh} 缺提示词", "- Shots {sh} have no prompt", sh=shot_ids(u["prompt_missing"])))
L += ["", "```text", u["prompt"], "```"]
diff --git a/rea_video/report.py b/rea_video/report.py
index 96938c3..5c7527d 100644
--- a/rea_video/report.py
+++ b/rea_video/report.py
@@ -11,7 +11,7 @@ import html
import re
from pathlib import Path
-from . import aspects, entities, narrative
+from . import aspects, entities, narrative, performance
from .classify import LABEL_ZH
from .i18n import LangDict, T, join, lang, semi, shot_ids
from .packaging import layer_name, anchor_text
@@ -466,6 +466,11 @@ def _plan_md(b: dict) -> list[str]:
if parts.get(key):
steps.append(step)
sub(title, parts[key])
+ acting = _acting_md(b)
+ if acting:
+ steps.append(T("**表演与情绪**:每镜的表情、动作和语气,见下方「表演与情绪」",
+ "**Acting and emotion**: each shot's expression, movement and delivery, see “Acting and emotion” below"))
+ sub(T("表演与情绪", "Acting and emotion"), acting)
steps.append(T("**剪辑**:见下方「剪辑」", "**Edit**: see “Edit” below"))
sub(T("剪辑", "Edit"), _edit_md(b))
files = ((b.get("packaging") or {}).get("files") or {})
@@ -482,6 +487,23 @@ def _plan_md(b: dict) -> list[str]:
+ [f"{i}. {x}" for i, x in enumerate(steps, 1)] + subs)
+def _acting_md(b: dict) -> list[str]:
+ """Who acts in which shot, with what emotion, face, body and voice, and how to get it in a remake."""
+ rows, kinds = performance.table(b)
+ if not rows:
+ return []
+ L = [T("情绪写进提示词时用看得见的表情和动作,不写「开心」「难过」这类词,幅度宁小勿大(强情绪词容易出面具脸、假笑);"
+ "首帧图先把表情做到位;有台词的镜头先做有语气的配音,再让画面跟着声音演。AI 生成的镜头,下面的「表情」「动作」已经写进生成单元的提示词。",
+ "In a prompt, describe the visible expression and movement rather than words like “happy” or “sad”, and keep it smaller rather "
+ "than bigger (strong emotion words tend to give mask faces and forced smiles); get the expression right in the first frame; "
+ "for shots with lines, make the voice with its delivery first and let the picture act to it. For generated shots the Face and "
+ "Movement below are already in the generation-unit prompts."), ""]
+ L += _table([T("镜头", "Shot"), T("谁", "Who"), T("情绪(强度)", "Emotion (strength)"), T("表情", "Face"), T("动作 / 变化", "Movement / change"),
+ T("语气", "Delivery"), T("复刻怎么做", "How to get it")], rows, fold_title=T("全部 {n} 镜", "all {n} shots", n=len(rows)))
+ L += [""] + [f"- **{performance.ROUTE_ZH[k]}**{_colon()}{performance.route_text(k)}" for k in kinds]
+ return L
+
+
def _content_md(b: dict, user: bool = False) -> list[str]:
"""user=True: the summary and hook are already at the top of the reader's report."""
w = b.get("whole_video_vlm") or {}
@@ -520,8 +542,10 @@ def _content_md(b: dict, user: bool = False) -> list[str]:
if lines[0].get("source") == "asr":
head += T("(本地语音识别,未校对;同音字和专有名词以画面字幕为准)", " (local speech recognition, unchecked; trust on-screen subtitles for names and homophones)")
L += ["", head]
- L += _table([T("时间", "Time"), T("谁", "Who"), T("台词 / 旁白", "Line")],
- [[_span(ln["start"], ln["end"]), ln["speaker"] or T("旁白", "narration"), ln["text"]] for ln in lines], fold_title=T("全部 {n} 句", "all {n} lines", n=len(lines)))
+ tone = any(ln.get("delivery") for ln in lines)
+ L += _table([T("时间", "Time"), T("谁", "Who"), T("台词 / 旁白", "Line"), *([T("语气", "Delivery")] if tone else [])],
+ [[_span(ln["start"], ln["end"]), ln["speaker"] or T("旁白", "narration"), ln["text"], *([ln.get("delivery") or "—"] if tone else [])]
+ for ln in lines], fold_title=T("全部 {n} 句", "all {n} lines", n=len(lines)))
if any(ln.get("voice") for ln in lines) and lines[0].get("source") == "asr":
L.append(T("- 「谁」这一列按音色分出来的说话人填写,对应的单人音轨见「声音」",
"- The “Who” column is filled from the voices separated by timbre; each one's own track is under “Sound”"))
@@ -853,6 +877,9 @@ def _remake_md(b: dict) -> list[str]:
T("这些镜头的画面是生成或拍摄出来的,下面是画面里出现、复刻时应作为参考图 / 道具准备的东西(不是嵌入的真实像素):",
"These shots were generated or filmed; the items below appear in them and should be prepared as reference images / props for the remake (they are not embedded real pixels):"), ""]
L += _grouped_assets(b, lambda r: (r.get("material") or {}).get("references", []), with_where=False)
+ acting = _acting_md(b)
+ if acting:
+ L += ["", T("### 表演与情绪", "### Acting and emotion"), ""] + acting
return L
@@ -921,6 +948,10 @@ def _shot_detail_md(r: dict) -> list[str]:
v = r.get("vlm") or r.get("review") or {}
if v.get("description"):
L.append(T("- 画面:{d}", "- Picture: {d}", d=v["description"]))
+ act = performance.of(r)
+ if act:
+ L.append(T("- 表演:{a}", "- Acting: {a}", a=performance.summary(act))
+ + (T(";语气:{v}", "; delivery: {v}", v=act["voice"]) if act.get("voice") else ""))
cl = aspects.shot_text(r) if base["label"] in aspects.PHOTOGRAPHIC else ""
if cl:
L.append(T("- 拍法/打光:{c}", "- Camera / lighting: {c}", c=cl))
diff --git a/rea_video/review.py b/rea_video/review.py
index 5918cfa..786248b 100644
--- a/rea_video/review.py
+++ b/rea_video/review.py
@@ -9,10 +9,11 @@ import shlex
import time
from .classify import LABEL_ZH, LABELS, top
-from . import aspects, narrative
+from . import aspects, narrative, performance
from .narrative import ROLE_GUIDE
from .vlm import SHOT_PROMPT, shot_hints
+PERF_TEMPLATE = {"who": "", "emotion": "", "intensity": "", "face": "", "body": "", "arc": [], "voice": "", "key": False}
SHOOT_LIKE = ("live_action", "avatar", "stop_motion", "film_footage") # shots where "how was it shot / lit" applies
AGENT_WEIGHT = 0.85 # agent answers are softened toward uniform before fusion
IMAGE_SOURCES = ("ai_image", "photo", "graphic", "screenshot", "unknown")
@@ -24,6 +25,7 @@ LABEL_GUIDE = re.search(r"底层画面类别.*?\n\n", SHOT_PROMPT, re.S).group(0
CONFUSIONS = re.search(r"注意区分:.*?\n\n", SHOT_PROMPT, re.S).group(0).strip()
ASPECT_GUIDE = aspects.review_guide()
+PERF_GUIDE = performance.GUIDE
INSTRUCTIONS = f"""你是这次的 VLM:逐个镜头看图,判断「底层画面」的制作方式,把答案写进 review_answers.json,然后运行
rea-video apply-review <输出目录> --by <你的名字>
把你的判断并入结论(会重写 breakdown.json、report.md、report.html)。
@@ -49,8 +51,8 @@ kind 取 {"|".join(ASSET_KINDS)},is_real_material 为 true/false)。
画面里拍到了带字的东西(手机屏幕、包装、招牌)时填 overlay_text:这一镜后期加上去的字幕、花字、标注原文列表(画面本身的字不要写),报告会把其余 OCR 文字当成画面内容;没有这种情况就不填。
同一段成片在片中出现不止一次(开头先放一段成片当预告、结尾完整放;或中途回放),在较短的那一处填 same_clip_as:另一处的镜头号(整数),复刻时只生成一次;不是就不要填。
实拍或定格镜头被 AI 二次加工过时填 ai_edits:[{{"kind": "{"|".join(EDIT_KINDS)}", "evidence": "看到的破绽"}}](换脸、对口型、风格化、换装、换背景、加删物体、美颜);没有就留空。
-AI 生成 / 3D / 实拍镜头再填 replication:image_prompt(复刻首帧的<PROMPT_LANG>图像提示词:景别、机位高度和俯仰角、主体在画面里的位置和朝向、主体、光线、风格,具体可执行)、
-video_prompt(复刻该镜头的<PROMPT_LANG>视频提示词:先写景别、机位角度、主体在画面里的位置,再写动作过程和结束状态、运镜;只写想要的内容,不写否定句)、video_prompt_en(英文版)。
+AI 生成 / 3D / 实拍镜头再填 replication:image_prompt(复刻首帧的<PROMPT_LANG>图像提示词:景别、机位高度和俯仰角、主体在画面里的位置和朝向、主体、光线、风格,有人物时写首帧的表情,具体可执行)、
+video_prompt(复刻该镜头的<PROMPT_LANG>视频提示词:先写景别、机位角度、主体在画面里的位置,再写动作过程和结束状态、运镜;人物表演写看得见的表情和动作,不写情绪词,幅度宁小勿大;只写想要的内容,不写否定句)、video_prompt_en(英文版)。
这些提示词会被合并进「生成单元」的多镜头提示词,所以每镜只写这一镜的内容,统一的风格和场景描述写在 description 里即可。
实拍/写实镜头再填 aspects(怎么拍、怎么打光;纯图形/界面画面不填),像素测不出的部分靠你看:
@@ -60,6 +62,10 @@ video_prompt(复刻该镜头的<PROMPT_LANG>视频提示词:先写景别、
拍摄方式(自拍/支架)、主光是什么光源、眼神光、轮廓光/背景灯、画面里可见的光源;和测量冲突时写明依据。
最后在答案顶层的 aspects 里写整片:机位/场景、推测设备、整体布光、剪辑手法、视频形式。
+有人在表演的镜头填 performance(表演和情绪;报告「表演与情绪」一节和生成单元的提示词都用它,复刻时表情、动作、语气靠它还原)。
+看 sheet 的首 / 中 / 尾三帧,表情变化快的镜头用 zoom_cmd 抽帧细看;有 said 的镜头结合台词写 voice:
+{PERF_GUIDE}
+
每个镜头再填 narrative(这个镜头在讲什么):role 选它在叙事上的作用,point 用一句话写它讲的那一点(去掉具体的人和产品也成立的写法,
例如"用反常识的数字开场"而不是"说水豚每天睡 12 小时")。先通读 storyboard.jpg 和每镜的 said(这一镜里的字幕;没有字幕时是语音识别听到的话,可能有同音错字)再填,作用是相对整片说的:
{ROLE_GUIDE}
@@ -153,6 +159,7 @@ def build_tasks(breakdown: dict, out_dir: str) -> tuple[dict, dict]:
**({"said": said[rec["index"]]} if said.get(rec["index"]) else {}),
"images": {"sheet": rec["assets"]["sheet"], **({"strip": rec["assets"]["strip"]} if rec["assets"].get("strip") else {})},
"_shoot_like": shoot_like,
+ "_acting": any(l in performance.ACTING_LABELS for l, _ in ranked[:2]),
})
pack = breakdown.get("packaging") or {}
pk_tasks, pk_answers = None, None
@@ -168,6 +175,7 @@ def build_tasks(breakdown: dict, out_dir: str) -> tuple[dict, dict]:
pk_answers = {"stickers": [{"id": st["id"], "is_overlay": None, "what": ""} for st in sts],
"text": [{"id": c["id"], "kind": ""} for c in txt[:80]], "missed": []}
shoot = {s["id"]: s.pop("_shoot_like") for s in shots}
+ acting = {s["id"]: s.pop("_acting") for s in shots}
# whole-video evidence (frame rate, transcode) repeats on most shots: state it once at the top
from collections import Counter
@@ -194,7 +202,8 @@ def build_tasks(breakdown: dict, out_dir: str) -> tuple[dict, dict]:
"label_probs": {}, "image_source": "unknown",
"evidence": [], "description": "", "narrative": {"role": "", "point": ""}, "embedded_assets": [], "ai_edits": [], "same_clip_as": None,
"replication": {"image_prompt": "", "video_prompt": "", "video_prompt_en": ""},
- **({"aspects": aspects.review_template()} if shoot[s["id"]] else {})} for s in shots],
+ **({"aspects": aspects.review_template()} if shoot[s["id"]] else {}),
+ **({"performance": dict(PERF_TEMPLATE)} if acting[s["id"]] else {})} for s in shots],
"aspects": aspects.review_template(video=True),
"story": {"summary": "", "hook": "", "highlights": [""]},
"cast": {"style": "", "characters": [{"id": "A", "name": "", "kind": "", "look": "", "role": "", "voice": "", "shots": []}],
@@ -260,6 +269,7 @@ def _clean(ans: dict) -> tuple[dict | None, str | None]:
"evidence": [str(x) for x in ev][:8], "description": str(ans.get("description", "")),
"embedded_assets": assets, "replication": rep, "aspects": aspects.clean_answers(ans.get("aspects")),
"split_suggestion": split, "narrative": narrative.clean(ans.get("narrative")),
+ "performance": performance.clean(ans.get("performance")),
"same_clip_as": int(ans["same_clip_as"]) if str(ans.get("same_clip_as", "")).strip().isdigit() else None,
# the words added in post (subtitles, styled text, labels), like the VLM's overlay_text: OCR text in the
# shot that matches none of them is part of the picture (a filmed phone screen, a gift box)
diff --git a/rea_video/videomd.py b/rea_video/videomd.py
index 28c51db..1dcc919 100644
--- a/rea_video/videomd.py
+++ b/rea_video/videomd.py
@@ -19,7 +19,7 @@ from pathlib import Path
import yaml
-from . import entities, narrative
+from . import entities, narrative, performance
from .classify import LABEL_ZH
from .i18n import T, join
@@ -39,7 +39,7 @@ TRANSITION_ID = {"jump": "jump_cut", "fade": "fade_through", "dissolve": "dissol
"shake": "shake", "effect": "effect"}
# timeline keys, in line order; `~` = inferred by the tools
-KEYS = ("story", "seen", "layers", "camera", "transition", "overlay", "made~", "material~", "remake", "flag")
+KEYS = ("story", "seen", "act", "layers", "camera", "transition", "overlay", "made~", "material~", "remake", "flag")
# ------------------------------------------------------------------ helpers ---------------------------------------
@@ -113,6 +113,9 @@ def timeline_line(r: dict, roles: dict, units: dict) -> str:
desc = (r.get("vlm") or r.get("review") or {}).get("description")
if desc:
f["seen"] = _one_line(desc, 60)
+ act = performance.of(r)
+ if act:
+ f["act"] = _one_line(performance.summary(act), 40)
f["camera"] = CAMERA_ZH.get((r.get("features") or {}).get("camera", "unknown"), "—")
trans = TRANSITION_ID.get(r.get("transition_in") or "cut")
if trans:
@@ -145,9 +148,9 @@ def timeline_line(r: dict, roles: dict, units: dict) -> str:
def _legend() -> list[str]:
return [T("每行一个镜头:`#编号 起-止(秒) | 键 值 | …`。键后带 `~` 的是工具推断,不带的是画面里看得到或直接测得的。",
"One shot per line: `#<n> start-end (s) | key value | …`. A key ending in `~` is the tools' inference; keys without it are visible on screen or measured directly."),
- T("`story` 在叙事里的作用和讲的点 · `seen` 画面里看到的 · `camera` 运镜 · `overlay` 叠加层 · `made~` 制作方式(推断)· "
+ T("`story` 在叙事里的作用和讲的点 · `seen` 画面里看到的 · `act` 表演(情绪、强度、表情)· `camera` 运镜 · `overlay` 叠加层 · `made~` 制作方式(推断)· "
"`material~` 素材来源(推断)· `remake` 复刻路线 · `flag` 需要复核",
- "`story` job in the story and the point · `seen` what is on screen · `camera` camera move · `overlay` overlays · `made~` how it was made (inferred) · "
+ "`story` job in the story and the point · `seen` what is on screen · `act` acting (emotion, strength, face) · `camera` camera move · `overlay` overlays · `made~` how it was made (inferred) · "
"`material~` where the material came from (inferred) · `remake` remake route · `flag` needs a second look"),
T("某一镜的全部细节在 `{d}/shots/编号.md`(如 `{d}/shots/07.md`)。", "Full detail for a shot is in `{d}/shots/<n>.md` (e.g. `{d}/shots/07.md`).", d=DIR)]
@@ -187,7 +190,7 @@ def _topics(b: dict) -> list[tuple[str, str, str, list[str]]]:
("sound", T("声音", "Sound"), T("人声、BGM、音效、节拍和来源", "voice, music, sound effects, beats and sources"), _audio_md(b)),
("look", T("拍法、打光与剪辑", "Camera, lighting and editing"), T("有实拍镜头时:景别、机位、布光、器材", "for filmed shots: framing, camera, lighting, kit"), _visual_md(b)),
("packaging", T("剪辑包装", "Packaging"), T("字幕、花字、贴纸、画中画的时间和样式", "subtitles, styled text, stickers, picture-in-picture: timing and style"), packaging_md(b)),
- ("remake", T("复刻方案", "Remake plan"), T("生成单元、拍摄场次、代码合成、要准备的真实素材", "generation units, shoots, code builds, real material to collect"), _remake_md(b)),
+ ("remake", T("复刻方案", "Remake plan"), T("生成单元、拍摄场次、代码合成、要准备的真实素材、表演与情绪", "generation units, shoots, code builds, real material to collect, acting and emotion"), _remake_md(b)),
]
diff --git a/rea_video/vlm.py b/rea_video/vlm.py
index d8598b6..2c1c08b 100644
--- a/rea_video/vlm.py
+++ b/rea_video/vlm.py
@@ -329,6 +329,8 @@ AI 仿定格风格(材质在帧间漂移)与真正的定格动画(同一
实拍(或定格)画面如果被 AI 二次加工过,在 ai_edits 里逐个列出:换脸、对口型/改台词、整段风格化重绘、AI 换装、抠像换背景/绿幕、
加删换物体、美颜瘦脸。依据要写看得到的破绽(脸部边缘、嘴型和下巴不跟、头发与背景交界、光线不一致)。没有就写 []。
+<<PERFORMANCE>>
+
确定性分析给出的参考信号(可能有误,以画面为准):
{hints}
@@ -347,9 +349,10 @@ AI 仿定格风格(材质在帧间漂移)与真正的定格动画(同一
"material_origin": "real|ai_generated|rendered|mixed(画面主要来自真实素材 / AI 生成 / 制作方渲染 / 混合)",
"embedded_assets": [{{"kind": "real_footage|photo|screenshot|screen_recording|product_photo|logo|ai_image", "description": "是什么、在画面哪里", "is_real_material": true}}],
"ai_edits": [{{"kind": "face_swap|lip_sync|restyle|outfit_swap|bg_replace|object_edit|beautify", "evidence": "看到的破绽"}}],
+ "performance": {{"who": "", "emotion": "", "intensity": "low|mid|high", "face": "", "body": "", "arc": [], "voice": "", "key": false}},
"replication": {{
- "image_prompt": "复刻首帧的中文图像提示词(主体、构图、光线、风格,具体可执行)",
- "video_prompt": "复刻该镜头的中文视频提示词:写清动作过程和结束状态、运镜;只写想要的内容,不写否定句",
+ "image_prompt": "复刻首帧的中文图像提示词(主体、构图、光线、风格,具体可执行;有人物时写首帧的表情)",
+ "video_prompt": "复刻该镜头的中文视频提示词:写清动作过程和结束状态、运镜;人物表演写看得见的表情和动作(眼、眉、嘴、头、手),不写「开心」「难过」这类情绪词,幅度宁小勿大;只写想要的内容,不写否定句",
"video_prompt_en": "same video prompt in English"
}}
}}"""
@@ -402,7 +405,8 @@ WHOLE_PROMPT = """你是短视频拆解专家。完整观看并**仔细收听**
"highlights": ["这条视频能火 / 能卖货的关键做法,2–4 条,每条写手法 + 在哪一秒 + 为什么有效,不写空话"],
"segments": [{{"start": 0.0, "end": 3.0, "role": "<<NARRATIVE_ENUM>>", "beat": "这一段在讲什么(一句话,换个题材也能照着写的那种)", "copy": "这一段的旁白/字幕文案", "audio": "人声/音乐/音效"}}],
"narration": {{"type": "tts|human|none|mixed", "voice": "性别/年龄感/音色", "style": "语速、情绪、口癖", "language": "zh|en|...",
- "lines": [{{"start": 0.0, "end": 2.0, "speaker": "角色编号或 旁白", "text": "台词/旁白原文"}}]}},
+ "lines": [{{"start": 0.0, "end": 2.0, "speaker": "角色编号或 旁白", "text": "台词/旁白原文",
+ "delivery": "这句的语气、语速、音量、停顿(压低声音 / 带笑 / 急促 / 叹气);和上一句一样就留空"}}]}},
"music": {{"present": true, "segments": [{{"start": 0.0, "end": 10.0}}], "style": "风格", "genre": "流派", "mood": "情绪",
"instruments": ["主要乐器"], "bpm_estimate": 0, "has_vocals": false,
"source_guess": "ai_generated|stock_library|popular_song|original|unknown", "song_guess": "若是知名歌曲写歌名,否则空",
@@ -435,7 +439,9 @@ from .narrative import ROLE_GUIDE as _ROLE_GUIDE, ROLES as _ROLES # noqa: E402
WHOLE_PROMPT = WHOLE_PROMPT.replace("<<NARRATIVE_ROLES>>", _ROLE_GUIDE).replace("<<NARRATIVE_ENUM>>", "|".join(_ROLES))
-SHOT_PROMPT = SHOT_PROMPT.replace("<<SHOT_ASPECTS>>", _aspect_block(video=False))
+from .performance import GUIDE as _PERF_GUIDE # noqa: E402
+
+SHOT_PROMPT = SHOT_PROMPT.replace("<<SHOT_ASPECTS>>", _aspect_block(video=False)).replace("<<PERFORMANCE>>", _PERF_GUIDE.replace("{", "{{").replace("}", "}}"))
WHOLE_PROMPT = WHOLE_PROMPT.replace("<<VIDEO_ASPECTS>>", _aspect_block(video=True))
@@ -539,6 +545,10 @@ def normalize_shot_result(raw: dict) -> dict:
for k in ("aspects", "replication"):
if k in raw and not isinstance(raw[k], dict):
del raw[k]
+ if "performance" in raw:
+ from .performance import clean as _perf
+
+ raw["performance"] = _perf(raw["performance"])
if "replication" in raw:
raw["replication"] = {k: v if isinstance(v, str) else _text(v) for k, v in raw["replication"].items()}
return raw
diff --git a/skills/rea-video/SKILL.md b/skills/rea-video/SKILL.md
index ca54cf5..ab86536 100644
--- a/skills/rea-video/SKILL.md
+++ b/skills/rea-video/SKILL.md
@@ -44,6 +44,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 / narrative / embedded_assets 填进 review_answers.json;narrative 是「这个镜头在讲什么」:role 选叙事作用(抓注意 / 交代背景 / 补信息 / 给证据 / 转折 / 给结论 / 引导行动 / 渲染情绪),point 一句话写它讲的那一点,报告会连成「叙事线」;若某镜头实为多刀合并(暗底图形与暗底口播交替时容易被合成一个长镜头),可加 split_suggestion(cuts 切点秒数 + labels 各段类别 + note),报告会在该镜头标注拆分建议,镜头边界本身不变
+# 有人在演的镜头填 performance:主情绪、强度、看得见的表情和动作、镜头里的变化、说话的语气;复刻提示词和配音会照它还原表演
# 顶层 cast 填整片的角色 / 场景 / 道具(同一个角色跨镜头认成同一个,外观写到能据此复刻)和一句视觉风格;没开 VLM 时报告的「角色、场景与道具」一节全靠这里
# 顶层 story 填报告开头的「核心看点」:summary 一句话、hook 开头几秒怎么抓人、highlights 2–4 条能火的做法(手法 + 第几秒 + 为什么有效)
# 画面里拍到带字的东西(手机屏幕、包装、招牌)时,每镜填 overlay_text:这一镜后期加的字幕 / 花字原文,其余 OCR 文字报告当成画面内容
diff --git a/skills/rea-video/references/output-template.md b/skills/rea-video/references/output-template.md
index b91e7ca..ffd7187 100644
--- a/skills/rea-video/references/output-template.md
+++ b/skills/rea-video/references/output-template.md
@@ -6,6 +6,7 @@
- 复刻方案按实际制作的组织方式写,不按剪辑镜头逐个写:
- AI 镜头 → **生成单元**:几个连续镜头一次生成、用哪个模型、参考素材(`@图片` 产品/人物、`@视频` 原片片段)、合并后的多镜头提示词、单元之间怎么衔接。默认引擎不支持一次多镜头时,照抄 `engine_note`,说明换模型能省几次调用。
- 实拍镜头 → **拍摄场次**:哪些镜头是同一场景、同一机位,一起拍;每个场景的布光;先大景别后特写。分镜表本身仍然逐镜写细。
+ - 有人在演的镜头 → 写清每镜的情绪和表演怎么还原(报告「表演与情绪」:表情、动作、语气,以及是首帧定表情、先配音再驱动、表演迁移还是演员照着演)。
- 代码渲染 → 几段代码合成,每镜写清画面元素和动效(报告「代码合成」一节的逐镜动效时间轴:元素位置、出现时间、方向、快慢、色值,元素截图在 `shots/`);静图推拉 → 本地重建。
- 提示词缺失(未开 VLM)时,你看图补写:`rea-video review` 的答案里每镜填 `replication.image_prompt / video_prompt / video_prompt_en`,`apply-review` 后生成单元会自动带上。
- 然后写剪辑包装(字幕样式和时间轴文件、花字 / 贴纸清单、音效卡点)、声音拆解、真实素材清单,最后写不确定点。
diff --git a/skills/rea-video/references/remake.md b/skills/rea-video/references/remake.md
index d117f56..8e19e8c 100644
--- a/skills/rea-video/references/remake.md
+++ b/skills/rea-video/references/remake.md
@@ -17,7 +17,8 @@
- 拆片包的 `frames/` 里每个场景有原尺寸帧、画上去那一层的抠图(`scene_XX_layer.png`)和采样点(`points/`,x、y 为 0–1 坐标):粒子、线条、图形照着摆或描,不要照文字描述去猜形状。旧目录没有 `frames/` 时运行 `rea-video frames out/ref`。
- 做完用 `rea-video compare 原片 成片 --scenes out/ref/frames/scenes.json -o 对比目录` 打分,按输出里的 `advice`(时间早晚、位置、范围、多少、颜色)先改分数最低的场景,对照 `compare_worst.jpg` 看。
- **真实素材**:列清单让用户提供;拿到后用 `rea-video assemble` 拼回原时间线,或放进 ChatCut 按原片节奏剪。
-- **声音**:TTS、BGM(按 BPM / 调性 / 情绪)、音效(按时间点)三条轨分别准备。
+- **表演和情绪**:报告「表演与情绪」一节逐镜写了情绪、表情、动作和语气,生成单元的提示词里已经带上表情和动作。改写提示词时保留看得见的表情和动作,不要换成「开心」「难过」这类词,也不要把幅度写大;有台词的镜头先做有语气的配音,再让画面跟着声音演。
+- **声音**:TTS(按脚本表里每句的语气)、BGM(按 BPM / 调性 / 情绪)、音效(按时间点)三条轨分别准备。
- **剪辑包装(字幕、花字、贴纸)**:不进生成。生成模型只出干净的人和画面,包装层最后按「剪辑包装层」的时间轴叠上去,这样字不会被模型画糊,换文案时也只改包装层。
- 首尾帧上带着原片字幕的,`remake-plan` 的任务里有 `overlays_in_frames` 和警告:先擦掉字再当参考图,否则生成画面会照抄原字幕。
- 换文案时,花字和贴纸按报告里的「按台词定位」放到新文案的对应句子上,不沿用原秒数;「常驻图层」整段叠一次。
diff --git a/tests/test_performance.py b/tests/test_performance.py
new file mode 100644
index 0000000..a6baaf2
--- /dev/null
+++ b/tests/test_performance.py
@@ -0,0 +1,74 @@
+"""Acting and emotion: what readers report per shot, and how it reaches the remake prompts, the script and the report."""
+import json
+
+from rea_video import performance
+from rea_video.i18n import set_lang
+from rea_video.plan import with_acting
+from rea_video.production import production_plan
+from rea_video.review import _clean
+from rea_video.vlm import SHOT_PROMPT, normalize_shot_result
+
+from tests.test_production import KITCHEN, _b, _shot
+
+ACT = {"who": "A", "emotion": "委屈", "intensity": "low", "face": "眼眶微红,嘴角轻轻下压", "body": "低头,手指绞着衣角",
+ "arc": [{"t": 1.5, "state": "抬眼看镜头,下巴微微发抖"}, {"t": "bad", "state": "停顿"}], "voice": "", "key": True}
+
+
+def test_clean_keeps_visible_cues_and_drops_empty_answers():
+ p = performance.clean(ACT)
+ assert p["intensity"] == "low" and p["key"] is True
+ assert [a["t"] for a in p["arc"]] == [0.0, 1.5] # a bad time is kept at 0, the list stays in order
+ assert performance.clean({"who": "A", "emotion": "", "face": "", "arc": []}) is None
+ assert performance.clean("开心") is None
+ assert performance.clean({"emotion": "开心", "intensity": "强"})["intensity"] == "high"
+
+
+def test_prompt_line_writes_the_face_not_the_emotion_word():
+ set_lang("zh")
+ line = performance.prompt_line(performance.clean(ACT))
+ assert "眼眶微红" in line and "开头停顿,1.5 秒时抬眼看镜头" in line and "幅度很小" in line
+ assert "委屈" not in line # the emotion word stays in the report, not in the prompt
+ assert performance.image_line(performance.clean(ACT)) == "表情:停顿" # the face at frame one when the arc starts there
+
+
+def test_with_acting_adds_once():
+ act = performance.clean(ACT)
+ assert with_acting("她站在窗边。", act).startswith("她站在窗边。表演")
+ assert with_acting("她眼眶微红,嘴角轻轻下压,站在窗边", act) == "她眼眶微红,嘴角轻轻下压,站在窗边"
+ assert with_acting("", act) == "" and with_acting("她站在窗边", None) == "她站在窗边"
+
+
+def test_route_by_what_carries_the_acting():
+ act = performance.clean(ACT)
+ assert performance.route_kind(act, "live_action") == "shoot"
+ assert performance.route_kind(act, "ai_video") == "first_frame"
+ assert performance.route_kind(dict(act, voice="压低声音,句尾带哭腔"), "ai_video") == "voice"
+ assert performance.route_kind(dict(act, intensity="high"), "ai_video") == "transfer"
+
+
+def test_review_answer_and_vlm_answer_carry_performance():
+ assert '"performance"' in SHOT_PROMPT
+ SHOT_PROMPT.format(hints="") # the guide's braces are escaped for str.format
+ clean, err = _clean({"label_probs": {"ai_video": 1}, "performance": ACT})
+ assert not err and clean["performance"]["face"] == ACT["face"]
+ assert normalize_shot_result({"label_probs": {"ai_video": 1}, "performance": "开心"})["performance"] is None
+
+
+def test_generation_unit_prompt_and_report_use_the_acting(tmp_path):
+ set_lang("zh")
+ shots = [_shot(1, 0.0, 2.0, "ai_video", KITCHEN, tmp_path), _shot(2, 2.0, 2.0, "ai_video", KITCHEN, tmp_path)]
+ shots[1]["review"] = {"performance": performance.clean(dict(ACT, voice="压低声音,句尾带哭腔"))}
+ b = _b(shots)
+ plan = production_plan(b, tmp_path)
+ u = plan["units"][0]
+ assert "镜头2(2.0–4.0s):镜头 2 的动作。表演(幅度很小,几乎看不出):眼眶微红" in u["prompt"]
+ assert u["acting"][0]["shot"] == 2 and u["acting"][0]["how"] == "先配音再驱动"
+ b["production_plan"] = plan
+ rows, kinds = performance.table(b)
+ assert rows[0][0] == "#2" and "委屈(轻) ★看点" == rows[0][2] and kinds == ["voice"]
+ from rea_video.entities import script
+
+ b["whole_video_vlm"] = {"narration": {"lines": [{"start": 2.2, "end": 3.5, "speaker": "A", "text": "我没有"},
+ {"start": 0.2, "end": 1.0, "speaker": "A", "text": "你听我说", "delivery": "急促"}]}}
+ assert [ln.get("delivery") for ln in script(b)] == ["压低声音,句尾带哭腔", "急促"]
+ json.dumps(plan, ensure_ascii=False)