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 格式输出。
Python agent-skillsai-videoaigc-detectionclaude-codecodexffmpegprompt-engineeringremotionreverse-engineeringshort-videoshot-detectionsubtitlesvideo-analysisvideo-breakdownvideo-editingvideo-generationvideomdvlm
Use Gemini directly and keep evals local
june9572a00bbccf
diff --git a/.gitignore b/.gitignoreindex 084649c..37763c7 100644--- a/.gitignore+++ b/.gitignore@@ -10,14 +10,11 @@ dist/.venv/*.pyc*.log-eval/media/+eval/*+!eval/RESULTS.md.env.env.*!.env.example-eval/code_videos.yaml-eval/code_videos_holdout.yaml-eval/particles.yaml-eval/codegen/scripts/roundtrip_compare.pytests/CHANGELOG.mddiff --git a/AGENTS.md b/AGENTS.mdindex ffa77fb..48fef4a 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -6,7 +6,7 @@- `skills/rea-video/`:给 agent 用的 skill(流程 + references),只写怎么用,不放开发文档- `rea_video/`:CLI 和拆解逻辑;模型能力地图在 `rea_video/capabilities/`,capsule-cinema 对接脚本在 `rea_video/integrations/`- `docs/`:给人看的文档;`docs/dev/` 是开发文档(扩充评测集、加拍法维度)- - `eval/`:评测集;`tests/`:本地测试,已在 .gitignore 里,不进仓库+ - `eval/`:本地评测集(只有 `eval/RESULTS.md` 进仓库);`tests/`:本地测试;两者都在 .gitignore 里,不进仓库- 开发约定:- 开发环境:`pip install -e ".[ocr,dev]"`(dev 带 pytest 和 jsonschema,测试和能力地图校验要用)- 规则改动后跑 `python3 -m pytest -q` 和 `rea-video eval eval/labels.yaml` / `eval/holdout*.yaml`,结果更新到 `eval/RESULTS.md`diff --git a/docs/cli.md b/docs/cli.mdindex 4b82260..587cc2b 100644--- a/docs/cli.md+++ b/docs/cli.md@@ -35,12 +35,12 @@ Claude Code 也可以按插件装 skill(CLI 仍需 `pip install`,skill 第rea-video decompose ref.mp4 -o out/ref# 2. 加 VLM(建议,不强制):让多模态大模型看画面,实拍/AI/3D 判断更准-# 任意 OpenAI 兼容的多模态模型都行,模型可写多个做备选-export REA_VLM_BASE_URL=https://.../v1 REA_VLM_API_KEY=... REA_VLM_MODEL=gemini-2.5-pro,gpt-4o+# 直接用 Gemini(模型用 REA_GEMINI_MODEL 改),连声音一起看片段+export GEMINI_API_KEY=...rea-video decompose ref.mp4 -o out/ref --vlm-# 或复用 capsule-cinema 的配置:rea-video --env-file ~/code/github/capsule-cinema/.env decompose ref.mp4 -o out/ref --vlm+# 用其他多模态模型:export REA_VLM_BASE_URL=https://.../v1 REA_VLM_API_KEY=... REA_VLM_MODEL=gpt-4o+# 配置也可以放在文件里:rea-video --env-file <path> decompose ref.mp4 -o out/ref --vlm# VLM 调用全部失败时不会中断,报告和 `rea-video summary` 的 "VLM:" 一行会写明"全部调用失败,等同未开"-# 只有 Gemini 的 key 时:export GEMINI_API_KEY=...(模型用 REA_GEMINI_MODEL 改),特殊时刻走 Gemini 自己的接口,连声音一起看片段open out/ref/report.htmldiff --git a/docs/en/cli.md b/docs/en/cli.mdindex 30ee778..23bdff7 100644--- a/docs/en/cli.md+++ b/docs/en/cli.md@@ -37,12 +37,12 @@ Reports are in Chinese by default. Add `--lang en` to `decompose`, or run `rea-vrea-video decompose ref.mp4 -o out/ref# 2. Add a VLM (recommended, not required): a multimodal model looks at the frames, which improves live action / AI / 3D calls-# Any OpenAI-compatible multimodal model works; list several models as fallbacks-export REA_VLM_BASE_URL=https://.../v1 REA_VLM_API_KEY=... REA_VLM_MODEL=gemini-2.5-pro,gpt-4o+# Use Gemini directly (set the model with REA_GEMINI_MODEL); it watches clips with sound+export GEMINI_API_KEY=...rea-video decompose ref.mp4 -o out/ref --vlm-# Or reuse capsule-cinema's config: rea-video --env-file ~/code/github/capsule-cinema/.env decompose ref.mp4 -o out/ref --vlm+# For another multimodal model: export REA_VLM_BASE_URL=https://.../v1 REA_VLM_API_KEY=... REA_VLM_MODEL=gpt-4o+# Settings can also live in a file: rea-video --env-file <path> decompose ref.mp4 -o out/ref --vlm# If every VLM call fails the run continues; the report and the "VLM:" line in `rea-video summary` say that all calls failed and the result is the same as no VLM-# With only a Gemini key: export GEMINI_API_KEY=... (set the model with REA_GEMINI_MODEL); special moments use Gemini's own API and send clips with soundopen out/ref/report.htmldiff --git a/docs/en/workflow.md b/docs/en/workflow.mdindex 0948bdf..1f052c4 100644--- a/docs/en/workflow.md+++ b/docs/en/workflow.md@@ -60,10 +60,10 @@ rea-video decompose ref.mp4 -o out/ref --lang enrea-video summary out/ref/breakdown.json```-This runs offline. A vision model (VLM) is optional but makes live action / AI / 3D calls more reliable. Any OpenAI-compatible multimodal model works:+This runs offline. A vision model (VLM) is optional but makes live action / AI / 3D calls more reliable. The simplest setup is a Gemini key:```bash-export REA_VLM_BASE_URL=https://.../v1 REA_VLM_API_KEY=... REA_VLM_MODEL=gemini-2.5-pro+export GEMINI_API_KEY=...rea-video decompose ref.mp4 -o out/ref --vlm --lang en```diff --git a/eval/RESULTS.md b/eval/RESULTS.mdindex eb36663..eda6066 100644--- a/eval/RESULTS.md+++ b/eval/RESULTS.md@@ -173,7 +173,7 @@## 复现-清单里的视频路径指向各自的来源目录(`${CAPSULE}` 是 capsule-cinema 仓库);找不到时会用 `eval/media/<样本 id>.<扩展名>`。视频不随仓库分发,缺的样本会在评测输出的 `missing` 里列出,分数只覆盖找得到的那部分。+评测视频和清单不随仓库分发。```bashexport CAPSULE_CINEMA_ROOT=~/code/github/capsule-cinemadiff --git a/eval/agent_test/JOB.md b/eval/agent_test/JOB.mddeleted file mode 100644index 2a50176..0000000--- a/eval/agent_test/JOB.md+++ /dev/null@@ -1,12 +0,0 @@-你在 rea-video 仓库的一份副本里(当前目录)。先读 AGENTS.md、skills/rea-video/SKILL.md,以及它引用的 skills/rea-video/references/(taxonomy、audio、materials、output-template)。严格按 SKILL.md 的流程工作。--任务:拆解视频 videos/{V}.mp4。它是从微信公众号文章下载的转码版(30fps、二次压缩),你不知道它是怎么做的,需要你判断。--1. 环境没装好就先按 SKILL.md 第 0 节安装(需要 ffmpeg;可以直接用 `python3 -m rea_video.cli` 代替 `rea-video`)。-2. 运行 decompose,输出到 runs/{V}/。VLM 配置可用时(例如 `--env-file ~/code/github/capsule-cinema/.env`)按 SKILL.md 建议加 `--vlm`;不可用就不开,并在报告里写明。-3. 按 SKILL.md 自己复核。先确认你能不能看图:能看就看 storyboard.jpg、shots/、低置信镜头;看不了就遵守 SKILL.md「看不了图时的规则」。-4. 按 references/output-template.md 的结构写 runs/{V}/AGENT_REPORT.md(中文),必须包含:- - 一句话结论:制作方式(实拍 / AI 视频 / 数字人 / 3D / 代码渲染 / 录屏截图 / 静态图推拉 / 静帧)及各占比- - 分镜表、真实素材、声音(人声 / BGM / 音效及来源)、不确定点- - 最后一行固定格式:`FINAL: <主要制作方式> | <置信度 0-1> | <能否看图: yes/no> | <VLM 是否生效: yes/partial/no>`(以 `rea-video summary` 的 `VLM:` 一行为准,请求了但调用失败算 no)-5. 不要修改代码,不要上网搜索这条视频,不要读当前目录以外的文件。diff --git a/eval/agent_test/README.md b/eval/agent_test/README.mddeleted file mode 100644index 7c3a848..0000000--- a/eval/agent_test/README.md+++ /dev/null@@ -1,85 +0,0 @@-# agent 盲测:用 rea-video 拆解文章视频(给 Claude Code 编排用)--目的:检验"另一个 agent 只靠本仓库的 Skill 和工具,能不能把视频怎么做的拆对"。上一轮用的是 dsh(DeepSeek V4.1 Flash),这一轮可以测 zcode 或其他 agent。--被测 agent 只拿到 `JOB.md`,看不到答案;Claude Code 负责准备环境、逐条调用、收集结果、按本文评分。--## 0. 准备(Claude Code 执行)--```bash-REPO=~/code/github/rea-video-BLIND=/tmp/rea-video-blind # 盲测副本:不含 eval/、out/、.cache/(里面有答案)-cd $REPO-pip install -e ".[ocr]" # 需要 ffmpeg;首次分离人声会从 GitHub 下载约 67 MB 模型--# 0.1 确定性回归(不需要 agent)-export CAPSULE_CINEMA_ROOT=~/code/github/capsule-cinema-rea-video eval eval/labels.yaml -o out/eval_main # 期望 duration_weighted_accuracy ≈ 0.983(2026-11-02 从头解码)-rea-video eval eval/holdout.yaml -o out/eval_hold # ≈ 0.996-rea-video eval eval/holdout2.yaml -o out/eval_hold2 # ≈ 0.989-rea-video eval eval/articles.yaml -o out/eval_articles # ≈ 0.886(逐条见下表"工具 v0.3"列)-python3 -m pytest -q # 26 passed--# 0.2 盲测副本-rm -rf $BLIND && mkdir -p $BLIND/videos $BLIND/runs-rsync -a --exclude eval --exclude out --exclude .cache --exclude .git $REPO/ $BLIND/-cp $REPO/eval/media/articles/v*.mp4 $BLIND/videos/-```--视频:`eval/media/articles/v01.mp4 … v13.mp4`,编号对照在同目录 `mapping.tsv`(不要给被测 agent)。如果文件丢了,从两篇文章重新下载:-mp.weixin.qq.com/s/s7i_fQmwWo9SbRoV-KDZ9g(a1)、mp.weixin.qq.com/s/aXhPx0eQu9ngYxuyvsFE4Q(a2)。--## 1. 调用被测 agent(每条视频一个新会话)--在 `$BLIND` 目录里启动 agent,把 `JOB.md` 的 `{V}` 换成编号作为任务,例如:--```bash-cd $BLIND-for V in v01 v02 v03 v04 v05 v06 v07 v08 v09 v10 v11 v12 v13; do- sed "s/{V}/$V/g" $REPO/eval/agent_test/JOB.md > runs/JOB_$V.md- # 换成 zcode 的非交互调用方式,例如:zcode -p "$(cat runs/JOB_$V.md)" > runs/$V.log 2>&1-done-```--记录每条:耗时、是否成功写出 `runs/vXX/AGENT_REPORT.md`、日志里有没有读 `$BLIND` 以外的文件或上网。-建议 v11、v09、v03、v04 先跑(最能区分好坏),再跑其余。--## 2. 真值与评分--只评有真值的 11 条(v02、v06 真值不确定,只看报告是否把不确定说清楚)。每条主分 0–2:--| 编号 | 文章说明 / 人工看画面 | 2 分(全对) | 1 分(部分对) | 0 分 | 工具 v0.3 | dsh(工具 v0.2) |-|---|---|---|---|---|---|---|-| v01 | a1:OiiOii 复刻成片(视频模型生成) | AI 视频 | — | 其他 | AI ✓ | 2 |-| v02 | a1:原始参考片(铅笔上的定格小人) | 不评分:写明"定格动画还是 AI 待确认"算好 | | | AI | — |-| v03 | a1:直接用视频模型复刻 | 全片 AI(含 AI 生成的铅笔素描过渡、结尾镜头拉远露出桌面) | AI 为主但混进"代码卡/静态图推拉" | 其他 | AI ✓ | 0(判出代码白底卡 + 静态图推拉) |-| v04 | a1:别人的产品推广片,黑底 + 玻璃质感 3D 星星/铬金属 + 文字动效 | 3D 元素 + 代码/MG 文字 | 只说出其一 | 说成录屏/实拍 | 3D 65% + AI 35%(1 分) | 0("无 3D",判成界面 + 录屏) |-| v05 | a1:OiiOii「视频模型 + Coding」成片:模型做立体装饰,代码做文字/按钮/转场,界面是真实产品截图 | 三者都说到 | 说到其中两样 | 一样都没对 | 3D 63% + 代码 22% + AI 12%(1 分) | 1 |-| v06 | a1:吊扇视角换装原片 | 不评分:写明"实拍还是 AI 待确认"算好 | | | AI | — |-| v07 | a1:OiiOii 换成男生版 | AI 视频 | — | 其他 | AI ✓ | 2 |-| v08 | a2:「广告原始 / 广告复刻后」左右拼屏,两边都是 UI 动效 | 拼屏 + 代码/UI 动效 | 只说出拼屏或只说出 UI 动效 | 其他 | 代码 80% + 3D 20%(1 分) | 1(说成录屏) |-| v09 | a2:Google Gemini 发布片原片,2D UI 动效 | 代码/UI 动效,无 3D | 代码为主但带 >15% 3D | 其他 | 代码 81% + 3D 19%(1 分) | 2 |-| v10 | a2:OiiOii 第一版「视频生成 + Coding」 | 代码 UI 动效为主 | 代码为主但带 >15% 3D | 其他 | 代码 92%(2 分) | 2 |-| v11 | a2:TikTok 带货原片,手机实拍(真实厨房、真手、男声口播) | 实拍 | "实拍还是 AI 待确认" | AI | 实拍(2 分) | 0(AI 100% 并调高置信度) |-| v12 | a2:OiiOii 榨汁杯复刻(文件带 AIGC 隐式标识) | AI 视频 | — | 其他 | AI ✓ | 2 |-| v13 | a2:变装换人物(QQ 飞车风,游戏 UI 是画进画面的) | AI 视频 | — | 其他 | AI ✓ | 2 |--满分 22。参考线:工具 v0.3 不经 agent 复核 18;dsh 上一轮 14(当时工具是 v0.2,v11 无论如何拿不到分)。--另外记录这几项(不计入主分,但写进结论):--- **看不了图时有没有乱改**:agent 自己说看不了图、又推翻了工具的制作方式判断,每次记一笔。上一轮 dsh 有 2 次推翻错误。-- **关键细节**:v08 认出左右对照拼屏;v12 引用 AIGC 标识;v13 指出游戏 UI 是画面内容不是叠加层;v05 把界面截图列为真实素材;v11 指出平台转码导致噪声证据失效。-- **声音**:只看有没有把人声 / BGM / 音效说清楚、来源是否标了"待确认";这批视频没有声音真值,不打分。-- **成本与稳定性**:每条耗时、失败重试次数、token 用量(如果能拿到)。--## 3. 结果写法--在 `$REPO/out/agent_eval/<agent 名>/RESULT.md` 写:--1. 总表:编号 | agent 结论(FINAL 行)| 得分 | 工具 v0.3 | 备注-2. 总分、与工具 v0.3 / dsh 的对比-3. 推翻工具的每一次:对还是错、理由是什么-4. 发现的 Skill 或工具问题(可复现的写出视频编号和镜头时间)--把 `runs/` 下的报告一并拷过去:`cp -r $BLIND/runs $REPO/out/agent_eval/<agent 名>/`。diff --git a/eval/articles.yaml b/eval/articles.yamldeleted file mode 100644index 004e7c5..0000000--- a/eval/articles.yaml+++ /dev/null@@ -1,41 +0,0 @@-# 两篇 OiiOii 公众号文章里的视频(微信转码版:30fps、二次压缩、元数据带 "Tencent CAPD MTS")-# 来源:mp.weixin.qq.com/s/s7i_fQmwWo9SbRoV-KDZ9g(a1)、mp.weixin.qq.com/s/aXhPx0eQu9ngYxuyvsFE4Q(a2)-# 视频文件不进仓库:放在 eval/media/articles/v01.mp4 … v13.mp4(编号对照见同目录 mapping.tsv)-# 真值 = 文章作者对制作方式的说明 + 人工看画面;v02、v05、v06 真值不确定,不列入-# 注意:v0.3 的转码/3D 规则是看过这批视频后加的,属于开发集,不是留出集-# cuts:逐个看候选切点前后帧标出的切点真值(含跳剪、推近切、几帧的短镜头;闪光、火光、局部叠图不算);cuts_uncertain 是看不准的位置,检测到也不算错-videos:- - id: art_v01_oiioii_remake # a1 复刻成片:视频模型 + Harness- path: eval/media/articles/v01.mp4- label: ai_video- - id: art_v03_pure_model_remake # a1 直接用视频模型复刻(含 AI 生成的铅笔素描过渡、结尾拉远)- path: eval/media/articles/v03.mp4- label: ai_video- - id: art_v04_promo_original # a1 别人的产品推广片:玻璃质感 3D 元素 + 文字动效- path: eval/media/articles/v04.mp4- label: [cg_3d, code_render]- - id: art_v07_male_swap # a1 换成男生版- path: eval/media/articles/v07.mp4- label: ai_video- - id: art_v08_side_by_side # a2 「广告原始 / 广告复刻后」左右拼屏,两边都是 UI 动效- path: eval/media/articles/v08.mp4- label: [code_render, screen_capture]- - id: art_v09_gemini_original # a2 Google Gemini 发布片:2D UI 动效- path: eval/media/articles/v09.mp4- label: [code_render, screen_capture]- - id: art_v10_oiioii_gen_coding # a2 OiiOii 第一版「视频生成 + Coding」:代码 UI 动效为主- path: eval/media/articles/v10.mp4- label: [code_render, screen_capture, still_motion]- - id: art_v11_tiktok_original # a2 TikTok 带货原片:手机实拍(真实厨房、真手、男声口播)- aspects: {format: {format: product}} # 目测 2026-10-30:第一视角手持,手拿食材放进榨汁杯,无人脸- path: eval/media/articles/v11.mp4- cuts: [0.73, 1.50, 2.20, 4.03, 5.77, 6.53, 7.23, 8.73, 12.97, 14.60, 18.67, 19.03]- cuts_uncertain: [3.27, 20.67]- label: live_action- real_material: true- - id: art_v12_juicer_remake # a2 OiiOii 榨汁杯复刻(带 AIGC 隐式标识)- path: eval/media/articles/v12.mp4- label: ai_video- - id: art_v13_outfit_swap # a2 变装换人物(QQ 飞车风,游戏 UI 是画进画面的)- path: eval/media/articles/v13.mp4- label: ai_videodiff --git a/eval/audio_mv.yaml b/eval/audio_mv.yamldeleted file mode 100644index b5371fc..0000000--- a/eval/audio_mv.yaml+++ /dev/null@@ -1,6 +0,0 @@-# 音乐来源(AI 生成 vs 现成)专项:只评音频,不评画面-# 注意:vocal_style 的阈值是看过 qing_hiphop_mv 后定的,属于开发集,不是留出集-videos:- - id: qing_hiphop_mv- audio: {music_source: ai_generated, voice: true, music: true} # AI 说唱 MV:Suno chirp-hawk v6 歌曲「和血吞」- path: ${CAPSULE}/output/qing_hiphop_zeng_guofan/out/qing_hiphop_full.mp4diff --git a/eval/birdnest_plush_sfx.json b/eval/birdnest_plush_sfx.jsondeleted file mode 100644index 367cea0..0000000--- a/eval/birdnest_plush_sfx.json+++ /dev/null@@ -1 +0,0 @@-[[0.0, -31, 0.06], [0.286, -31, 0.06], [0.571, -31, 0.06], [0.857, -31, 0.06], [1.142, -31, 0.06], [1.428, -31, 0.06], [1.714, -31, 0.06], [0.186, -31, 0.06], [0.471, -31, 0.06], [0.757, -31, 0.06], [1.042, -31, 0.06], [1.328, -31, 0.06], [1.614, -31, 0.06], [1.899, -31, 0.06], [0.086, -31, 0.06], [0.371, -31, 0.06], [0.657, -31, 0.06], [0.942, -31, 0.06], [1.228, -31, 0.06], [1.514, -31, 0.06], [1.799, -31, 0.06], [0.02, -22, 0.07], [0.3, -34, 1.958], [2.98, -24, 0.38], [3.08, -27, 0.865], [4.952, -32, 0.9], [5.402, -20, 0.07], [5.502, -22, 0.975], [6.432, -26, 0.35], [6.732, -27, 0.6], [6.632, -25, 0.92], [8.181, -22, 0.07], [8.431, -28, 0.6], [8.681, -28, 0.6], [10.021, -26, 0.7], [10.021, -32, 1.0], [13.431, -22, 0.16], [13.851, -22, 0.16], [14.271, -22, 0.16], [14.691, -22, 0.16], [15.365, -24, 0.7], [18.205, -18, 0.16], [18.255, -24, 0.4], [19.789, -24, 0.5], [20.389, -20, 0.07], [22.119, -30, 0.8], [22.619, -26, 0.6], [22.719, -27, 0.865], [23.756, -22, 0.38], [24.006, -28, 0.8], [25.046, -30, 0.7], [25.446, -24, 0.9], [26.517, -30, 0.4], [27.717, -30, 0.4], [28.481, -26, 0.12], [28.571, -26, 0.12], [28.661, -26, 0.12], [28.751, -26, 0.12], [28.841, -26, 0.12], [28.931, -26, 0.12], [29.021, -26, 0.12], [29.111, -26, 0.12], [29.201, -26, 0.12], [29.291, -26, 0.12], [28.811, -20, 0.4], [28.911, -25, 0.25], [29.833, -27, 1.8], [32.489, -24, 0.12], [32.599, -24, 0.12], [32.709, -24, 0.12], [32.819, -24, 0.12], [32.929, -24, 0.12], [33.039, -24, 0.12], [32.829, -30, 0.8], [32.929, -25, 0.92], [35.233, -18, 0.16], [35.363, -26, 0.25], [35.533, -18, 0.16], [35.663, -26, 0.25], [36.653, -20, 0.07], [37.003, -24, 0.5], [36.833, -20, 0.07], [37.183, -24, 0.5], [36.903, -26, 0.92], [37.667, -29, 1.887], [39.417, -24, 0.55], [39.667, -24, 0.5], [40.198, -24, 0.38], [40.398, -24, 0.38], [42.876, -22, 0.38], [43.126, -22, 0.38], [43.776, -28, 0.6], [43.936, -30, 0.8], [44.336, -24, 0.9], [44.386, -25, 0.92], [46.97, -18, 0.07], [47.42, -26, 0.4], [48.18, -26, 0.6], [48.23, -27, 0.6], [48.93, -22, 0.13], [49.38, -24, 0.9], [49.23, -25, 0.07], [50.408, -28, 0.35], [50.808, -32, 0.6], [51.888, -30, 0.7], [52.288, -23, 0.9], [52.338, -22, 1.03], [54.055, -16, 1.4], [54.105, -20, 0.07], [54.155, -22, 1.03], [54.455, -26, 0.6], [54.705, -26, 0.6], [57.162, -16, 0.3], [57.212, -26, 0.42], [59.862, -23, 0.38], [60.402, -23, 0.975], [60.452, -26, 0.6], [61.943, -25, 0.38], [62.163, -25, 0.38], [62.383, -25, 0.38], [63.963, -32, 1.2], [64.263, -28, 0.6]]\ No newline at end of filediff --git a/eval/birdnest_plush_text.json b/eval/birdnest_plush_text.jsondeleted file mode 100644index c05de45..0000000--- a/eval/birdnest_plush_text.json+++ /dev/null@@ -1,597 +0,0 @@-{- "source": "capsule-cinema /work/overlay.py",- "duration": 66.458,- "subtitles": [- {- "t0": 0.227,- "t1": 1.957,- "text": "在海边高高的悬崖上",- "highlight": [- "悬崖"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 1.957,- "t1": 3.899,- "text": "住着一群小小的金丝燕",- "highlight": [- "金丝燕"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 3.899,- "t1": 6.099,- "text": "它们做的巢就是名贵的燕窝",- "highlight": [- "燕窝"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 6.099,- "t1": 7.658,- "text": "卖起来论克算钱",- "highlight": [- "论克算钱"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 7.658,- "t1": 9.478,- "text": "原来 繁殖季一到",- "highlight": [- "繁殖季"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 9.478,- "t1": 11.818,- "text": "雄燕舌下的唾液腺会肿胀",- "highlight": [- "唾液腺"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 11.818,- "t1": 14.022,- "text": "会涌出多得吓人的唾液",- "highlight": [- "唾液"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 14.022,- "t1": 16.422,- "text": "第一步 雄燕飞进洞穴",- "highlight": [- "洞穴"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 16.422,- "t1": 19.136,- "text": "把唾液一小口一小口吐在岩壁上",- "highlight": [- "岩壁"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 19.136,- "t1": 20.796,- "text": "这种唾液又黏又韧",- "highlight": [- "又黏又韧"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 20.796,- "t1": 23.543,- "text": "一碰空气就凝成半透明的唾液丝",- "highlight": [- "唾液丝"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 23.543,- "t1": 25.918,- "text": "就像棉花糖机吐出来的糖丝",- "highlight": [- "棉花糖机",- "糖丝"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 25.918,- "t1": 28.068,- "text": "第二步 它来来回回地飞",- "highlight": [],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 28.068,- "t1": 29.826,- "text": "把丝一根根粘叠起来",- "highlight": [- "一根根",- "粘叠"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 29.826,- "t1": 31.566,- "text": "花上 30~45 天",- "highlight": [- "30~45 天"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 31.566,- "t1": 33.2,- "text": "才叠成半个小碗",- "highlight": [- "小碗"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 33.2,- "t1": 35.96,- "text": "第三步 雌燕在窝里下了两颗蛋",- "highlight": [- "两颗蛋"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 35.96,- "t1": 37.665,- "text": "孵出毛茸茸的雏燕",- "highlight": [- "雏燕"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 37.665,- "t1": 39.685,- "text": "再喂养 40~45 天",- "highlight": [- "40~45 天"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 39.685,- "t1": 41.633,- "text": "雏燕的翅膀就长硬了",- "highlight": [- "翅膀"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 41.633,- "t1": 43.863,- "text": "第四步 雏燕飞走以后",- "highlight": [- "飞走"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 43.863,- "t1": 45.867,- "text": "这一盏空巢才能摘下来",- "highlight": [- "空巢"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 45.867,- "t1": 47.697,- "text": "从动工筑巢到采摘",- "highlight": [- "采摘"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 47.697,- "t1": 49.835,- "text": "前后要等 80~90 天",- "highlight": [- "80~90 天"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 49.835,- "t1": 51.455,- "text": "摘下来的空巢晒干了",- "highlight": [- "空巢"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 51.455,- "t1": 53.301,- "text": "泛出莹润的金光",- "highlight": [- "金光"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 53.301,- "t1": 55.389,- "text": "这 就是燕窝",- "highlight": [- "燕窝"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 55.389,- "t1": 57.989,- "text": "不过 九成多的燕子窝都不能吃",- "highlight": [- "不能吃"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 57.989,- "t1": 59.379,- "text": "能筑食用燕窝的",- "highlight": [],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 59.379,- "t1": 61.37,- "text": "主要是雨燕科的金丝燕",- "highlight": [- "雨燕科",- "金丝燕"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 61.37,- "t1": 63.29,- "text": "而且要等雏燕都飞走了",- "highlight": [- "雏燕"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 63.29,- "t1": 67.458,- "text": "才能摘这一盏空巢",- "highlight": [- "空巢"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- }- ],- "titles": [- {- "t0": 0.0,- "t1": 66.458,- "text": "燕窝是怎么筑成的?",- "decorative": true,- "style": {- "multicolor": true,- "stroke": "dark",- "animation": "scale_in"- }- }- ],- "cards": [- {- "t0": 14.005,- "t1": 25.901,- "text": "第1步 · 岩壁吐丝",- "style": {- "box": true,- "animation": "pop_in"- }- },- {- "t0": 25.901,- "t1": 33.183,- "text": "第2步 · 叠丝成碗",- "style": {- "box": true,- "animation": "pop_in"- }- },- {- "t0": 33.183,- "t1": 41.616,- "text": "第3步 · 下蛋孵雏",- "style": {- "box": true,- "animation": "pop_in"- }- },- {- "t0": 41.616,- "t1": 53.284,- "text": "第4步 · 空巢可采",- "style": {- "box": true,- "animation": "pop_in"- }- },- {- "t0": 53.284,- "t1": 55.372,- "text": "成了!",- "style": {- "box": true,- "animation": "pop_in"- }- },- {- "t0": 55.372,- "t1": 66.458,- "text": "注意!",- "style": {- "box": true,- "animation": "pop_in"- }- }- ],- "labels": [- {- "t0": 10.671,- "t1": 11.833,- "text": "唾液腺",- "follows_object": true,- "style": {- "box": true,- "animation": "pop_in"- }- },- {- "t0": 22.869,- "t1": 23.542,- "text": "唾液丝",- "follows_object": true,- "style": {- "box": true,- "animation": "pop_in"- }- },- {- "t0": 24.156,- "t1": 25.917,- "text": "棉花糖机",- "follows_object": true,- "style": {- "box": true,- "animation": "pop_in"- }- },- {- "t0": 32.679,- "t1": 33.208,- "text": "小碗",- "follows_object": true,- "style": {- "box": true,- "animation": "pop_in"- }- },- {- "t0": 37.153,- "t1": 37.667,- "text": "雏燕",- "follows_object": true,- "style": {- "box": true,- "animation": "pop_in"- }- },- {- "t0": 44.586,- "t1": 45.875,- "text": "空巢",- "follows_object": true,- "style": {- "box": true,- "animation": "pop_in"- }- }- ],- "stickers": [- {- "t0": 54.055,- "t1": 55.375,- "text": "燕窝!",- "decorative": true,- "style": {- "size_px": 150,- "stroke": "dark",- "animation": "pop_in_wobble"- }- }- ]-}\ No newline at end of filediff --git a/eval/daihuo.yaml b/eval/daihuo.yamldeleted file mode 100644index 65131cb..0000000--- a/eval/daihuo.yaml+++ /dev/null@@ -1,30 +0,0 @@-# 带货评测集:实拍开箱 + 「真人出镜画面做参考的 AI 带货」教程片,抖音转码(HEVC 1080x1920 30fps)-# 视频不入库(eval/media/ 已 gitignore):用 TikHub douyin_app_v3_fetch_one_video 按 aweme_id 取 bit_rate[0] 的 1080p 地址下载到 eval/media/daihuo/-# 真值来源:人工逐镜目测(2026-11-04,按 decompose 切出的镜头逐个看联系表)+ 视频作者自述的制作流程;没有生产记录,属于目测真值。-# cuts:逐个看候选切点前后帧标出的切点真值(含跳剪、推近切、几帧的短镜头;闪光、火光、局部叠图不算);cuts_uncertain 是看不准的位置,检测到也不算错-videos:- - id: daihuo_ai_tutorial- path: eval/media/daihuo/chenxi_ai_daihuo.mp4- cuts: [1.93, 4.70, 6.63, 10.07, 11.93, 16.47, 31.57, 32.93, 39.13, 44.40, 49.13, 51.50, 53.07, 54.90]- cuts_uncertain: [10.37]- source: 抖音 晨曦的好物铺子《AI带货新玩法,真人日用品带货视频,制作流程分享》aweme 7643393488632974633;作者口述:豆包写提示词 → 即梦 Seedance 2.0 用「提前录好的出镜画面」做主体 + 两张水杯图生成- # 1.93–6.63 和 49.13–57.67 是同一段即梦成片(右下角「即梦 @知遇」水印,礼盒英文乱码);7.93–11.93 是口播上叠商品照片的画中画版式;11.93–49.13 是相机拍真实手机屏幕(不是录屏)- segments:- - [0.000, 1.933, live_action]- - [1.933, 6.633, ai_video]- - [6.633, 7.933, live_action]- - [7.933, 11.933, [live_action, static_hold, still_motion]]- - [11.933, 49.133, [live_action, screen_capture]]- - [49.133, 57.667, ai_video]- real_material: [[0.000, 1.933, true], [1.933, 6.633, false], [6.633, 49.133, true], [49.133, 57.667, false]]- audio: {voice: true, music: true, voice_source: human_recording}- aspects: {format: {format: [desk, talking_head]}} # 口播 3 秒 + 37 秒俯拍手机演示,桌拍为主-- - id: daihuo_unboxing- path: eval/media/daihuo/ami_unboxing.mp4- cuts: [0.63, 1.23, 1.83, 2.37, 3.10, 3.87, 4.53, 5.17, 5.97, 6.57, 7.30, 8.23, 10.23, 11.70, 12.47, 13.27, 14.13, 14.97, 15.63, 17.03, 17.80, 18.53, 20.57, 21.90, 22.90, 23.57, 24.33, 24.90, 25.67, 26.37, 27.13, 28.10, 28.93, 30.00, 31.20, 32.50, 33.37, 34.50, 35.10, 36.17, 36.80, 38.70, 39.93, 43.03, 44.00, 44.90, 45.47, 46.33, 47.00, 47.67, 48.63, 49.87, 50.50, 51.00, 51.60, 52.60, 53.57, 54.33, 55.23, 56.47, 57.17, 58.73, 59.43, 60.13, 61.03, 62.13, 64.07, 64.67, 66.73, 67.47, 68.87, 69.90]- source: 抖音 阿咪🍓《开箱vlog:)爽拆可爱貌美家居好物~》aweme 7696830364081218747;头顶俯拍支架 + 手机,沉浸式拆包无口播- label: live_action- real_material: true- audio: {voice: false, music: true} # 只有拆包同期声和 BGM,没有口播;工具把同期声判成了"人声"- aspects: {framing: {camera_angle: [顶拍, 俯拍]}, lighting: {setup: [soft_front, high_key]}, format: {format: [desk, product]}}diff --git a/eval/film.yaml b/eval/film.yamldeleted file mode 100644index 8cdf930..0000000--- a/eval/film.yaml+++ /dev/null@@ -1,73 +0,0 @@-# 影视片段评测集:影视解说、混剪、名场面合集(剪进来的电影 / 电视剧 / 短剧画面),外加一条 AI 短剧解说作反例-# 视频不入库(eval/media/ 已 gitignore):用 TikHub 抖音搜索(douyin_search_fetch_video_search_v2)找到,-# douyin_app_v3_fetch_one_video_v3 取地址下载到 eval/media/film/;bit_rate 里 is_h265=2 的档位 ffmpeg 解不了,改用 play_addr_265-# 真值来源:人工看联系表目测 + 视频标题和画面上的片名;没有生产记录,属于目测真值。-# 影视片段在像素上就是摄影机拍的画面,工具只给线索(黑边版式、24/25fps 源)、不下结论,-# 所以只开工具时这一组的准确率预期很低,要看「标出待确认」的比例和看图复核后的准确率。-# cuts:逐个看候选切点前后帧标出的切点真值(含跳剪、推近切、几帧的短镜头;闪光、火光、局部叠图不算);cuts_uncertain 是看不准的位置,检测到也不算错-videos:- - id: film_hk_kungfu_beat- path: eval/media/film/hk_kungfu_beat.mp4- cuts: [2.07, 4.20, 5.17, 6.03, 7.07, 7.87, 8.33, 8.83, 9.27, 10.17, 11.07, 12.33, 12.73, 13.23, 15.17, 16.37, 17.70, 18.70, 19.53, 20.40, 22.20, 24.00, 24.83, 25.83, 26.77, 28.70, 29.40, 30.50, 32.00, 33.20, 34.17, 35.07, 35.93, 37.27, 37.70, 38.60, 39.57, 40.43, 40.90, 41.37, 41.77, 42.27, 42.67, 43.17, 43.90, 44.90, 45.73, 46.23, 46.77, 48.70, 49.07, 50.33, 51.83, 53.93, 54.77, 55.57, 56.60, 57.43, 58.37, 59.27, 60.07]- source: 抖音 武术指导《以武为舞,便是最好的节奏!》aweme 7615916888199007514;港片功夫打斗踩点混剪,横屏 720p 30fps- label: film_footage- real_material: true-- - id: film_gunshot_beat- path: eval/media/film/gunshot_beat.mp4- cuts: [2.53, 3.50, 4.07, 4.30, 4.83, 5.83, 7.03, 7.70, 8.87, 9.57, 9.90, 10.40, 11.03, 12.37, 13.13, 13.53, 14.07, 15.07, 16.27, 16.97, 18.03, 19.37, 20.37, 21.73, 22.30, 22.73, 23.70, 24.40, 25.00, 25.73, 26.33, 27.37, 27.43, 29.13, 29.87, 31.13, 31.77, 32.47, 33.90, 34.47, 35.03, 36.20, 36.57, 37.10, 37.73, 39.17]- source: 抖音 可乐丶《听着很暖和,看着有点爽。数一下多少颗子弹?》aweme 7549583051311926568;欧美枪战电影枪声卡点混剪- label: film_footage- real_material: true-- - id: film_kdrama_fight- path: eval/media/film/kdrama_fight.mp4- source: 抖音 一种感觉《拳拳到肉,战力值拉满》aweme 7702034302736861403;韩剧打斗混剪,20 秒;最后 0.7 秒是黑底光条片尾- segments:- - [0.000, 19.500, film_footage]- - [19.500, 20.200, [code_render, static_hold, film_footage]]- real_material: true-- - id: film_tvdrama_scenes- path: eval/media/film/tvdrama_scenes.mp4- cuts: [2.64, 3.16, 4.16, 6.04, 7.04, 7.88, 8.92, 9.88, 10.80, 11.76, 13.04, 14.32, 14.60, 15.60, 16.84, 17.24, 18.48, 18.92, 19.64, 20.56, 21.28, 21.88, 22.92, 23.72, 24.48, 25.16, 26.04, 27.12, 27.40, 27.92, 28.92, 29.64, 30.68, 31.44, 32.28, 33.32, 34.32, 35.48, 36.16, 36.68, 37.72, 38.52, 39.32, 40.32, 41.12, 41.96, 42.68, 43.60, 44.96, 45.80, 46.40, 47.04, 47.88, 48.52, 49.00, 49.88, 51.08, 52.24, 53.40, 53.92, 54.76, 56.20, 57.36, 58.64, 59.20, 59.68, 60.40, 61.60, 62.04, 62.76, 64.12, 64.68, 65.40, 65.92, 66.72, 67.52, 68.56, 69.20, 69.88, 70.48, 71.08, 71.88, 73.00, 74.04, 76.16, 77.72, 78.88, 79.56, 80.32, 81.44, 82.24, 83.12, 83.80, 84.48, 85.52, 86.04, 86.96, 87.56, 88.20, 89.40, 90.64, 91.76, 92.52, 93.60, 95.72, 96.60, 97.08, 97.64, 98.16, 99.24, 101.20, 102.72, 103.12, 104.20]- source: 抖音 月下栖梧楼《盘点影视剧中为爱退让的名场面》aweme 7699064909601967414;国产古装/现代剧名场面合集,每段左上角标「年份 ·《剧名》」,25fps;开头 2.6 秒是黑底文字卡,中间的白闪是转场- segments:- - [0.000, 2.600, [code_render, static_hold]]- - [2.600, 106.600, film_footage]- real_material: true-- - id: film_kangri_funny- path: eval/media/film/kangri_funny.mp4- source: 抖音 晓洋嘚吧嘚《搞笑名场面经典回顾》aweme 7663357679745748250;抗日题材电视剧片段 + 配音吐槽,左上角账号水印;中间插了 0.4 秒彩条卡,末尾「点赞 转发 关注」叠在剧集画面上- segments:- - [0.000, 72.600, film_footage]- - [72.600, 73.000, [code_render, static_hold]]- - [73.000, 166.600, film_footage]- real_material: true-- - id: film_vertical_recap- path: eval/media/film/vertical_movie_recap.mp4- source: 抖音 好气人 电影解说 aweme 7345728948321504547;竖屏 9:16,16:9 电影画面嵌在黑边里,顶部「点个关注吧」,画面下方解说字幕- label: film_footage- real_material: true-- - id: film_french_comedy_recap- path: eval/media/film/french_comedy_recap_90s.mp4- source: 抖音 猛虎电影《法国搞笑三人组新作》aweme 7660900818614324490 的前 90 秒(原片 35 分钟,ffmpeg -c copy 截取);法国喜剧电影解说,24→30- label: film_footage- real_material: true-- - id: film_shortdrama_recap- path: eval/media/film/shortdrama_recap.mp4- cuts: [1.10, 3.17, 5.27, 6.94, 8.34, 9.68, 11.78, 13.88, 15.25, 19.49, 20.82, 22.36, 24.46, 26.33, 28.06, 31.56, 32.50, 34.07, 34.90, 35.80, 36.90, 37.67, 39.51, 41.34, 43.08, 44.98, 46.75, 47.98, 49.25, 51.12, 53.89, 54.99, 59.19, 60.89, 62.26, 63.10, 64.73, 66.93, 70.40, 72.97]- source: 抖音 秋刀鱼(短剧解说)aweme 7619686582341895311;真人竖屏短剧(剧组拍摄)的解说剪辑,29.97fps- label: film_footage- real_material: true-- # 反例:AI 生成的短剧做的解说,版式和真人短剧解说一样(「影视效果」免责声明),画面是 AI 生成- - id: film_ai_shortdrama_recap- path: eval/media/film/ai_shortdrama_recap.mp4- source: 抖音 老北观影 aweme 7704868350626680115,话题 #ai短剧;人物脸过于完美、千人一面,25fps- label: ai_video- real_material: falsediff --git a/eval/holdout.yaml b/eval/holdout.yamldeleted file mode 100644index f10d497..0000000--- a/eval/holdout.yaml+++ /dev/null@@ -1,43 +0,0 @@-# 留出集:调参时未使用,用来检验规则是否过拟合(标签为人工目测 + capsule-cinema 生产记录)-videos:- - id: monkey_wine_code_v1- real_material: false- path: ${CAPSULE}/output/monkey_wine_v2/monkey_wine_code_v1.mp4- label: code_render # 扁平矢量风代码动画- - id: birdnest_plush- audio: {music_source: ai_generated, voice: true, music: true, sfx: true, bpm: 110.15, key: "D major"}- real_material: false- path: ${CAPSULE}/output/birdnest_plush/final.mp4- label: cg_3d # plush_diorama_science / Blender- packaging_truth: eval/birdnest_plush_text.json # overlay.py 时间表(开发包装层时看过,不独立)- sfx_truth: eval/birdnest_plush_sfx.json- - id: h3_realcat- real_material: false- path: ${CAPSULE}/output/dual_role_social_account_doctor_20260930/h3/realcat_s1_seed9300101.mp4- label: ai_video- - id: douyin_live_breakfast- aspects: {format: {format: talking_head}} # 目测 2026-10-30:坐着边吃边对镜头说话- audio: {voice: true}- real_material: true- path: ${CAPSULE}/output/plot_mining/videos/7690489550460562426.mp4- label: live_action- - id: douyin_capybara_a- real_material: false- path: ${CAPSULE}/output/plot_mining/videos/7644950675957597864.mp4- label: [ai_video, cg_3d]- - id: douyin_capybara_b- real_material: false- path: ${CAPSULE}/output/plot_mining/videos/7678263903595959921.mp4- label: [ai_video, cg_3d]- - id: douyin_capybara_c- real_material: false- path: ${CAPSULE}/output/plot_mining/videos/7688245085297572258.mp4- label: [ai_video, cg_3d]- - id: lulukong_a- real_material: false- path: ${CAPSULE}/output/account_fetch/噜噜控_20261028_064018/media/14957471328589846909.mp4- label: [ai_video, cg_3d]- - id: lulukong_b- real_material: false- path: ${CAPSULE}/output/account_fetch/噜噜控_20261028_064018/media/15003857097291603011.mp4- label: [ai_video, cg_3d]diff --git a/eval/holdout2.yaml b/eval/holdout2.yamldeleted file mode 100644index 6c8cc2d..0000000--- a/eval/holdout2.yaml+++ /dev/null@@ -1,39 +0,0 @@-# 第二留出集:所有规则调整完成后才第一次运行(无任何针对性调参)-videos:- - id: monkey_wine_code_v2- real_material: false- path: ${CAPSULE}/output/monkey_wine_v2/monkey_wine_code_v2.mp4- label: code_render- - id: monkey_wine_code_v3- real_material: false- path: ${CAPSULE}/output/monkey_wine_v2/monkey_wine_code_v3.mp4- label: code_render- - id: dual_role_realcat- real_material: [[0.0, 1.375, true], [1.375, 3.917, false], [3.917, 5.875, true], [5.875, 8.042, false], [8.042, 11.0, true], [11.0, 12.0, false], [12.0, 13.958, true], [13.958, 16.917, false], [16.917, 19.875, true]]- path: ${CAPSULE}/output/dual_role_social_account_doctor_20260930/release/social_account_doctor_realcat_v1.mp4- segments:- - [0.0, 1.375, [screen_capture, code_render, static_hold]]- - [1.375, 3.917, ai_video]- - [3.917, 5.875, [screen_capture, code_render, static_hold]]- - [5.875, 8.042, ai_video]- - [8.042, 11.0, [screen_capture, code_render, static_hold]]- - [11.0, 12.0, ai_video]- - [12.0, 13.958, [screen_capture, code_render, static_hold]]- - [13.958, 16.917, ai_video]- - [16.917, 19.875, [screen_capture, code_render, static_hold]]- - id: agi_kage- real_material: true- path: ${CAPSULE}/output/agi_zhidao/20260915_batch/kage/release/video.mp4- label: [code_render, screen_capture]- - id: douyin_capybara_d- real_material: false- path: ${CAPSULE}/output/plot_mining/videos/7699786681432737977.mp4- label: [ai_video, cg_3d]- - id: douyin_capybara_e- real_material: false- path: ${CAPSULE}/output/plot_mining/videos/7700202069185855866.mp4- label: [ai_video, cg_3d]- - id: lulukong_c- real_material: false- path: ${CAPSULE}/output/account_fetch/噜噜控_20261028_064018/media/15037922538409237557.mp4- label: [ai_video, cg_3d]diff --git a/eval/koubo.yaml b/eval/koubo.yamldeleted file mode 100644index 3daf736..0000000--- a/eval/koubo.yaml+++ /dev/null@@ -1,59 +0,0 @@-# 实拍口播评测集:真人出镜、手机拍摄、抖音转码,带截图/录屏插入与花字-# 视频不入库(eval/media/ 已 gitignore):用 TikHub 按分享链接下载 1080p(capsule-cinema/.claude/skills/account-diagnostic/tikhub,-# douyin douyin_app_v3_fetch_one_video_by_share_url → aweme_detail.video.bit_rate[0].play_addr.url_list[0])-# 真值来源:人工逐镜目测(2026-10-30,按 decompose 切出的镜头逐个看首尾帧)。-# 叠了大块截图的人物镜头底层仍是实拍,截图类标签也接受;黑底文字卡是代码渲染。-# aspects:拍法/打光真值 {维度: {字段: 可接受值}},也是目测(存疑处没有标;夜景那条没标机位,因为支架拍和手持自拍都有)。-# cuts:逐个看候选切点前后帧标出的切点真值(含跳剪、推近切、几帧的短镜头;闪光、火光、局部叠图不算);cuts_uncertain 是看不准的位置,检测到也不算错-videos:- - id: koubo_night_street- path: eval/media/chenpangyi_koubo.mp4- cuts: [0.13, 1.27, 4.07, 11.17, 13.10, 14.93, 17.00, 17.50, 18.03, 18.40, 19.10, 19.57, 22.23, 23.03, 24.30, 25.77, 26.87, 28.07, 30.17, 30.67, 31.10, 31.23, 33.17, 34.27, 37.33, 37.87, 40.27, 42.63, 45.27, 46.10, 47.73, 48.00, 50.10, 51.53, 59.70, 63.27, 68.30, 78.00, 78.87, 82.07, 84.13, 87.73, 89.27, 89.77, 91.23, 93.47, 96.23, 100.70, 103.97, 106.03, 107.10, 109.43, 111.20, 121.13, 129.47, 132.00, 134.57, 135.40, 136.13, 137.07, 137.77, 138.67, 140.43, 145.43, 148.47, 155.97, 156.17, 163.77, 166.07]- cuts_uncertain: [76.20, 79.10, 94.60, 99.57, 157.57]- source: 抖音 陈胖一《新号做出100万+播放的公式邪修!》https://v.douyin.com/U0tc1sxj1q8/ ;夜晚公交站边喝酒边讲,路灯环境光- segments:- - [0.00, 1.27, live_action]- - [1.27, 4.07, [live_action, screen_capture, code_render]]- - [4.07, 11.17, [screen_capture, code_render, static_hold, live_action]]- - [11.17, 13.10, [code_render, static_hold, still_motion]]- - [13.10, 14.93, [screen_capture, code_render, still_motion]]- - [14.93, 25.77, live_action]- - [25.77, 28.07, [live_action, screen_capture, code_render]]- - [28.07, 40.27, live_action]- - [40.27, 45.27, [live_action, screen_capture, code_render]]- - [45.27, 59.70, live_action]- - [59.70, 68.30, [live_action, screen_capture, code_render]]- - [68.30, 69.80, live_action]- - [69.80, 76.20, [live_action, screen_capture, code_render]]- - [76.20, 78.87, live_action]- - [78.87, 82.07, [live_action, screen_capture, code_render]]- - [82.07, 89.77, live_action]- - [89.77, 91.23, [screen_capture, code_render, live_action]]- - [91.23, 94.60, live_action]- - [94.60, 96.23, [live_action, screen_capture, static_hold]]- - [96.23, 99.57, live_action]- - [99.57, 100.70, [live_action, code_render]]- - [100.70, 140.43, live_action]- - [140.43, 145.43, [code_render, static_hold]]- - [145.43, 166.07, live_action]- - [166.07, 167.34, [code_render, static_hold]]- real_material: [[0.00, 140.43, true], [140.43, 145.43, false], [145.43, 166.07, true]]- audio: {voice: true, music: true, voice_source: human_recording}- aspects: {framing: {shot_size: [大特写, 特写, 近景]}, lighting: {setup: ambient_low_light}, format: {format: talking_head}}-- - id: koubo_indoor_closeup- path: eval/media/chenpangyi_indoor.mp4- cuts: [0.13, 2.67, 4.53, 7.23, 9.03, 14.03, 18.47, 26.57, 30.53, 36.97, 43.47, 45.37, 51.17, 55.10, 71.53, 77.93, 86.03, 88.17, 92.73, 97.77, 101.97, 106.30, 109.30, 111.00, 114.07, 117.67, 122.70, 128.60, 134.20, 145.23, 152.53, 163.73, 165.03]- cuts_uncertain: [16.97, 69.90, 121.53, 169.43]- source: 抖音 陈胖一《改命邪修!写《人生简历》投递给AI!》https://v.douyin.com/G4wyC9YPCV8/ ;室内贴脸口播,暖色墙,大面积柔光- segments:- - [0.00, 16.20, live_action]- - [16.20, 18.47, [screen_capture, live_action, code_render]]- - [18.47, 71.60, live_action]- - [71.60, 76.07, [screen_capture, code_render, live_action]]- - [76.07, 121.53, live_action]- - [121.53, 122.70, [ai_video, cg_3d, still_motion, static_hold, live_action]]- - [122.70, 174.07, live_action]- real_material: [[0.00, 121.53, true], [122.70, 174.07, true]]- audio: {voice: true, music: true, voice_source: human_recording}- aspects: {framing: {shot_size: [大特写, 特写]}, lighting: {setup: [soft_front, key_fill]}, format: {format: talking_head}}diff --git a/eval/labels.yaml b/eval/labels.yamldeleted file mode 100644index 0881383..0000000--- a/eval/labels.yaml+++ /dev/null@@ -1,114 +0,0 @@-# rea-video 评测集:真实制作方式已知的视频(大部分来自 capsule-cinema 的生产记录)-# label 可以是字符串或可接受标签列表;segments: [[start, end, label|list], ...] 覆盖整片-# real_material: 是否引入用户真实素材(实拍/照片/截图/录屏),true/false 或 [[start, end, true|false], ...]-# root 变量:${CAPSULE} = capsule-cinema 仓库路径(环境变量 CAPSULE_CINEMA_ROOT,默认 ~/code/github/capsule-cinema)-videos:- - id: monkey_wine_v1- real_material: false- path: ${CAPSULE}/output/monkey_wine/monkey_wine_final.mp4- label: static_hold # AI 生成的插画静帧逐张停留- image_source: ai_image- cuts: [4.80, 10.12, 15.96, 20.72, 24.88, 29.04, 33.28, 37.80, 43.76]- source: capsule-cinema 产出,10 张 AI 图按旁白时长拼接-- - id: monkey_wine_v3- audio: {music_source: ai_generated, voice: true, music: true, sfx: false} # tts.py + bgm.py(Suno 生成的 BGM),无 sfx- real_material: false- path: ${CAPSULE}/output/monkey_wine_v3/release/monkey_wine_v3.mp4- label: ai_video # MiniMax H3 首尾帧生成的"3D 手办"风格 AI 视频 + 代码字幕- packaging_truth: eval/monkey_wine_v3_text.json # overlays_v3/subtitles.json(双行字幕)- cuts: [7.071, 12.621, 17.307, 23.397, 28.485, 32.493, 38.475, 45.219, 50.379, 57.621, 60.507, 69.087, 77.883, 80.085]- cut_tolerance: 0.3 # 0.25s xfade 交叉溶解- source: capsule-cinema work/timeline.json(workflow minimax_h3_lightx2v_v5)-- - id: monkey_wine_v3_clip- real_material: false- path: ${CAPSULE}/output/monkey_wine_v3/clips/s01_flf.mp4- label: ai_video- source: MiniMax H3 原始输出-- - id: h3_human_clip- real_material: false- path: ${CAPSULE}/output/dual_role_social_account_doctor_20260930/h3/human_s1_seed9300101.mp4- label: ai_video- source: MiniMax H3 原始输出(写实人物)-- - id: autodl_h3- real_material: false- path: ${CAPSULE}/output/channel-tests/autodl-h3.mp4- label: ai_video- source: H3 渠道测试输出-- - id: dual_role_human- real_material: [[0.000, 1.375, true], [1.375, 3.875, false], [3.875, 5.833, true], [5.833, 7.542, false], [7.542, 10.542, true], [10.542, 11.542, false], [11.542, 13.458, true], [13.458, 16.125, false], [16.125, 19.100, true]]- path: ${CAPSULE}/output/dual_role_social_account_doctor_20260930/release/social_account_doctor_human_v1.mp4- # human_timeline.json:face=H3 AI 人物;verdict/covers/top9/fixes/github=截图面板- segments:- - [0.000, 1.375, [screen_capture, code_render, static_hold]]- - [1.375, 3.875, ai_video]- - [3.875, 5.833, [screen_capture, code_render, static_hold]]- - [5.833, 7.542, ai_video]- - [7.542, 10.542, [screen_capture, code_render, static_hold]]- - [10.542, 11.542, ai_video]- - [11.542, 13.458, [screen_capture, code_render, static_hold]]- - [13.458, 16.125, ai_video]- - [16.125, 19.100, [ai_video, screen_capture, code_render, static_hold]]- source: capsule-cinema dual_role 生产时间线-- - id: github_recording- real_material: true- path: ${CAPSULE}/output/capability_test/github_recording.mp4- label: screen_capture- source: 真实浏览器滚动录屏-- - id: salted_egg_plush- audio: {music_source: ai_generated, voice: true, music: true, sfx: true, bpm: 110.15, key: "D major"} # bgm_fit.json(Suno 曲 "Monkey Wine Pop")+ cues.py- real_material: false- path: ${CAPSULE}/output/salted_egg_plush/final.mp4- label: cg_3d # plush_diorama_science:Blender 本地渲染 + 代码字幕- packaging_truth: eval/salted_egg_plush_text.json # overlay.py 的字幕/标题/章节牌/标签/贴字时间表- sfx_truth: eval/salted_egg_plush_sfx.json- source: capsule-cinema plush_diorama_science 配方-- - id: murphy_shape- real_material: false- path: ${CAPSULE}/output/murphy_shape/build/murphy_shape_B.mp4- label: [code_render, cg_3d] # 代码渲染的暗色 MG(含 3D 骰子)- source: capsule-cinema murphys_law_shape 配方-- - id: mediank_pure_data- audio: {music_source: existing_library, voice: false, music: true, sfx: true} # 曲库 BGM(manten diloty)+ mixkit 键盘音效,无旁白- real_material: true- path: ${CAPSULE}/artifacts/video_runs/production/mediank_pure_data_20261004/release/20261004_verified_skills_v1/public/video.mp4- label: code_render- source: capsule-cinema mediank 代码渲染-- - id: agi_fly- real_material: true- path: ${CAPSULE}/output/agi_zhidao/20260916_fly/release/video.mp4- label: [code_render, screen_capture]- source: repo_showcase 代码模板 + 网页截图-- - id: civ_atlas- path: ${CAPSULE}/output/civ_atlas_flow_25s/release/v1/public/civ_atlas_flow_25s.mp4- label: [code_render, screen_capture]- source: repo_signal_grid 代码渲染 + 截图-- - id: douyin_ai_capybara_city- real_material: false- path: ${CAPSULE}/output/plot_mining/videos/7655483312324068342.mp4- label: ai_video- source: 抖音下载,文件带 AIGC 隐式标识 Label=1-- - id: douyin_live_street- aspects: {format: {format: talking_head}} # 目测 2026-10-30- real_material: true- path: ${CAPSULE}/output/plot_mining/videos/7691668930338992100.mp4- label: live_action- source: 抖音下载,人工判断为手机实拍-- - id: douyin_capybara_home- real_material: false- path: ${CAPSULE}/output/plot_mining/videos/7699437052256889275.mp4- label: [ai_video, cg_3d]- source: 抖音下载,人工判断为 AI 生成(无标识,存疑)diff --git a/eval/magic.yaml b/eval/magic.yamldeleted file mode 100644index 89ac7a2..0000000--- a/eval/magic.yaml+++ /dev/null@@ -1,13 +0,0 @@-# 魔术 / 藏剪辑评测集:画面里东西凭空出现的短视频。视频不入库(eval/media/ 已 gitignore)。-# 真值来源:人工逐帧目测。素材是平台转出的 12fps 无声 GIF,手法本身没有原片确认。-# cuts:硬切 / 跳剪。sudden:没有剪断、局部一帧内出现东西的位置,box 是 x0,y0,x1,y1(0-1)。-videos:- - id: mukbang_hidden_edit- path: eval/media/mukbang_hidden_edit.mp4- label: [live_action, ai_video] # 人和场景像实拍,食物出现的方式未确认- source: 平台转出的短 GIF,人工逐帧目测- cuts: [1.67, 3.50]- cut_tolerance: 0.1- sudden:- - {t: 0.29, box: [0.25, 0.50, 0.80, 0.85]} # 碗里出现新的食物- - {t: 2.00, box: [0.25, 0.50, 0.80, 0.85]} # 又出现一样食物,旁边的不动diff --git a/eval/monkey_wine_v3_text.json b/eval/monkey_wine_v3_text.jsondeleted file mode 100644index 6da6ecc..0000000--- a/eval/monkey_wine_v3_text.json+++ /dev/null@@ -1,437 +0,0 @@-{- "source": "capsule-cinema monkey_wine_v3/work/overlays_v3/subtitles.json (edit.py)",- "duration": 87.832,- "subtitles": [- {- "t0": 0.43,- "t1": 3.11,- "text": "要是你在深山里/撞见一群野猴子",- "lines": 2,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 3.11,- "t1": 4.62,- "text": "只要悄悄跟着它们",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 4.62,- "t1": 7.03,- "text": "八成就能找到/传说中的猴儿酒",- "lines": 2,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 7.246,- "t1": 9.166,- "text": "原来,秋天果子一熟",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 9.166,- "t1": 11.096,- "text": "猴子们为了/熬过缺吃的冬天",- "lines": 2,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 11.096,- "t1": 12.546,- "text": "就开始拼命囤粮",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 12.816,- "t1": 15.126,- "text": "它们搬来/一大堆高糖分的野果",- "lines": 2,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 15.126,- "t1": 17.176,- "text": "一股脑塞进天然的树洞里",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 17.512,- "t1": 18.722,- "text": "果子越堆越多",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 18.722,- "t1": 20.862,- "text": "互相挤压,果皮破了",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 20.862,- "t1": 23.272,- "text": "果肉里的糖水/就大量渗了出来",- "lines": 2,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 23.572,- "t1": 25.042,- "text": "树洞里空间密闭",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 25.042,- "t1": 26.112,- "text": "温度又稳定",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 26.112,- "t1": 28.212,- "text": "简直就是/一个天然的发酵罐",- "lines": 2,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 28.84,- "t1": 32.42,- "text": "更巧的是,果子表皮上/本来就带着野生酵母菌",- "lines": 2,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 32.708,- "t1": 34.678,- "text": "一下雨,雨水渗进树洞",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 34.678,- "t1": 36.348,- "text": "把浓稠的果浆稀释开",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 36.348,- "t1": 38.388,- "text": "正好满足了/发酵需要的湿度",- "lines": 2,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 38.68,- "t1": 40.67,- "text": "这时洞里还剩一点氧气",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 40.67,- "t1": 42.51,- "text": "酵母菌开始大量繁殖",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 42.51,- "t1": 44.97,- "text": "还把蔗糖/拆成了葡萄糖和果糖",- "lines": 2,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 45.504,- "t1": 47.964,- "text": "时间一长,果肉把树洞慢慢堵死",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 47.964,- "t1": 50.334,- "text": "里面变成了/密不透风的缺氧环境",- "lines": 2,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 50.604,- "t1": 51.734,- "text": "氧气一耗尽",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 51.734,- "t1": 53.894,- "text": "酵母菌马上切换生存模式",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 53.894,- "t1": 55.234,- "text": "开始无氧呼吸",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 55.234,- "t1": 57.544,- "text": "把糖分解成/酒精和二氧化碳",- "lines": 2,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 57.846,- "t1": 58.996,- "text": "糖越来越少",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 58.996,- "t1": 60.426,- "text": "酒精度越来越高",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 60.692,- "t1": 62.522,- "text": "可酵母也有耐受上限",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 62.522,- "t1": 65.162,- "text": "酒精度一到12%~15%左右",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 65.162,- "t1": 67.502,- "text": "它们就会被/自己产的酒精杀死",- "lines": 2,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 67.502,- "t1": 68.882,- "text": "发酵自动停止",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 69.562,- "t1": 72.082,- "text": "剩下的酒精/和果子里的有机酸",- "lines": 2,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 72.082,- "t1": 74.162,- "text": "还会慢慢发生酯化反应",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 74.162,- "t1": 76.232,- "text": "生成带果香的酯类物质",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 76.232,- "t1": 77.762,- "text": "飘出浓浓的酒香",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 78.088,- "t1": 80.018,- "text": "这就是传说中的猴儿酒",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 80.29,- "t1": 81.97,- "text": "不过树洞里杂菌太多",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 81.97,- "t1": 83.73,- "text": "很容易产生有毒物质",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 83.73,- "t1": 85.08,- "text": "所以这种猴儿酒",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- },- {- "t0": 85.08,- "t1": 86.45,- "text": "千万别随便喝",- "lines": 1,- "style": {- "fill": "dark",- "stroke": null- }- }- ],- "titles": [- {- "t0": 0.0,- "t1": 87.832,- "text": "猴儿酒是怎么来的?",- "decorative": false- }- ],- "cards": [],- "labels": [],- "stickers": []-}\ No newline at end of filediff --git a/eval/salted_egg_plush_sfx.json b/eval/salted_egg_plush_sfx.jsondeleted file mode 100644index 74ed2ef..0000000--- a/eval/salted_egg_plush_sfx.json+++ /dev/null@@ -1 +0,0 @@-[[0.0, -31, 0.06], [0.286, -31, 0.06], [0.571, -31, 0.06], [0.857, -31, 0.06], [1.142, -31, 0.06], [1.428, -31, 0.06], [0.186, -31, 0.06], [0.471, -31, 0.06], [0.757, -31, 0.06], [1.042, -31, 0.06], [1.328, -31, 0.06], [0.086, -31, 0.06], [0.371, -31, 0.06], [0.657, -31, 0.06], [0.942, -31, 0.06], [1.228, -31, 0.06], [0.02, -22, 0.07], [2.77, -22, 0.25], [2.87, -18, 0.15], [2.92, -26, 0.865], [3.73, -31, 0.7], [4.13, -20, 0.07], [4.23, -23, 0.92], [6.511, -28, 0.4], [6.711, -28, 0.6], [7.631, -24, 0.9], [7.731, -27, 0.865], [9.062, -24, 0.38], [10.492, -23, 0.16], [11.458, -29, 2.258], [11.858, -32, 0.8], [13.917, -26, 0.12], [14.197, -26, 0.12], [14.477, -26, 0.12], [14.757, -26, 0.12], [15.36, -25, 0.9], [17.187, -27, 0.5], [17.337, -24, 0.16], [17.537, -24, 0.16], [17.737, -24, 0.16], [19.667, -31, 0.5], [20.307, -27, 0.42], [20.407, -26, 0.07], [20.727, -26, 0.07], [21.047, -26, 0.07], [22.392, -24, 0.16], [22.672, -24, 0.16], [22.952, -24, 0.16], [23.582, -23, 0.16], [23.682, -27, 0.45], [25.342, -21, 0.13], [25.642, -27, 0.865], [27.239, -26, 0.12], [27.359, -26, 0.12], [27.479, -26, 0.12], [27.599, -26, 0.12], [28.359, -25, 0.38], [28.409, -26, 0.55], [29.879, -27, 0.25], [30.279, -28, 0.25], [30.689, -26, 0.7], [33.239, -19, 0.15], [33.289, -24, 0.25], [34.0, -27, 0.12], [34.12, -27, 0.12], [34.24, -27, 0.12], [34.36, -27, 0.12], [34.48, -27, 0.12], [34.639, -28, 1.5], [35.709, -29, 0.42], [36.909, -22, 0.45], [37.359, -25, 0.12], [37.479, -25, 0.12], [37.599, -25, 0.12], [37.719, -25, 0.12], [39.62, -24, 0.07], [39.71, -24, 0.07], [39.8, -24, 0.07], [40.02, -27, 0.865], [40.61, -26, 0.55], [41.21, -23, 0.16], [41.603, -23, 0.38], [41.938, -24, 0.8], [44.238, -22, 0.4], [44.538, -24, 0.16], [44.838, -25, 0.16], [46.4, -28, 1.65], [47.805, -31, 0.7], [48.205, -24, 0.9], [48.305, -26, 0.92], [50.368, -22, 0.25], [50.448, -17, 0.15], [50.508, -22, 0.07], [51.358, -30, 0.8], [51.458, -25, 0.9], [52.998, -24, 0.16], [55.335, -16, 1.4], [55.385, -20, 0.07], [55.435, -22, 1.03], [57.708, -24, 0.1], [59.661, -16, 0.3], [59.711, -25, 0.42], [62.652, -20, 0.15], [62.952, -20, 0.15], [63.252, -20, 0.15], [62.852, -23, 0.9], [63.212, -23, 0.9], [63.262, -26, 0.92], [63.862, -27, 0.6], [64.162, -28, 0.6]]\ No newline at end of filediff --git a/eval/salted_egg_plush_text.json b/eval/salted_egg_plush_text.jsondeleted file mode 100644index 60bd00d..0000000--- a/eval/salted_egg_plush_text.json+++ /dev/null@@ -1,685 +0,0 @@-{- "source": "capsule-cinema /work/overlay.py",- "duration": 66.542,- "subtitles": [- {- "t0": 0.187,- "t1": 1.457,- "text": "清晨的小院里",- "highlight": [],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 1.457,- "t1": 3.667,- "text": "鸭宝磕开一枚腌好的咸鸭蛋",- "highlight": [- "咸鸭蛋"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 3.667,- "t1": 5.218,- "text": "红亮的油涌了出来",- "highlight": [- "油"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 5.218,- "t1": 6.998,- "text": "明明没往里加一滴油",- "highlight": [- "油"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 6.998,- "t1": 8.879,- "text": "花猫看得眼睛都直了",- "highlight": [- "眼睛都直了"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 8.879,- "t1": 9.609,- "text": "这油",- "highlight": [],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 9.609,- "t1": 11.447,- "text": "到底是打哪儿冒出来的?",- "highlight": [- "冒出来"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 11.447,- "t1": 12.207,- "text": "原来",- "highlight": [],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 12.207,- "t1": 13.667,- "text": "这场流油的大戏",- "highlight": [- "流油"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 13.667,- "t1": 15.824,- "text": "幕后导演是普普通通的盐",- "highlight": [- "盐"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 15.824,- "t1": 18.014,- "text": "第一步 腌蛋的盐水里",- "highlight": [- "盐水"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 18.014,- "t1": 19.584,- "text": "盐顺着蛋壳的气孔",- "highlight": [- "气孔"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 19.584,- "t1": 21.039,- "text": "一粒粒往里钻",- "highlight": [- "钻"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 21.039,- "t1": 23.039,- "text": "第二步 盐先灌满蛋清",- "highlight": [- "蛋清"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 23.039,- "t1": 24.319,- "text": "再穿过蛋黄膜",- "highlight": [- "蛋黄膜"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 24.319,- "t1": 26.116,- "text": "一路潜进蛋黄深处",- "highlight": [- "深处"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 26.116,- "t1": 27.786,- "text": "蛋黄里存着的水分",- "highlight": [- "水分"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 27.786,- "t1": 29.446,- "text": "被盐一把拉了出去",- "highlight": [- "拉"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 29.446,- "t1": 30.606,- "text": "失了水的蛋黄",- "highlight": [],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 30.606,- "t1": 31.576,- "text": "缩成一团",- "highlight": [- "缩成一团"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 31.576,- "t1": 33.736,- "text": "越缩越小 越缩越硬",- "highlight": [- "硬"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 33.736,- "t1": 34.556,- "text": "第三步",- "highlight": [],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 34.556,- "t1": 36.496,- "text": "高盐让蛋黄里的蛋白质",- "highlight": [- "高盐",- "蛋白质"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 36.496,- "t1": 38.057,- "text": "纷纷收紧抱团",- "highlight": [- "收紧"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 38.057,- "t1": 39.997,- "text": "原本被裹得严严实实的油",- "highlight": [- "油"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 39.997,- "t1": 41.595,- "text": "一下子全散开了",- "highlight": [- "散开"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 41.595,- "t1": 42.725,- "text": "就像拧毛巾",- "highlight": [- "拧毛巾"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 42.725,- "t1": 43.685,- "text": "手一收紧",- "highlight": [],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 43.685,- "t1": 45.247,- "text": "水就被挤了出来",- "highlight": [- "挤"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 45.247,- "t1": 47.337,- "text": "第四步 剩下的交给时间",- "highlight": [- "时间"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 47.337,- "t1": 49.595,- "text": "家庭腌制要 30~40 天",- "highlight": [- "30~40 天"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 49.595,- "t1": 51.275,- "text": "腌足日子再敲开",- "highlight": [- "敲开"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 51.275,- "t1": 52.765,- "text": "红油汪在蛋黄上",- "highlight": [- "红油"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 52.765,- "t1": 54.952,- "text": "颤颤的 亮亮的",- "highlight": [],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 54.952,- "t1": 57.198,- "text": "这 就是流油咸鸭蛋",- "highlight": [- "流油咸鸭蛋"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 57.198,- "t1": 59.578,- "text": "不过 这油不是谁偷偷加的",- "highlight": [- "偷偷"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 59.578,- "t1": 60.739,- "text": "神秘物质",- "highlight": [- "神秘物质"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 60.739,- "t1": 62.979,- "text": "这些油本来就是蛋黄里的脂肪",- "highlight": [- "脂肪"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 62.979,- "t1": 63.919,- "text": "一滴没多",- "highlight": [- "一滴没多"- ],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- },- {- "t0": 63.919,- "t1": 67.542,- "text": "一滴也没少",- "highlight": [],- "style": {- "fill": "white",- "stroke": "dark",- "highlight_color": "yellow",- "animation": "keyword_bounce"- }- }- ],- "titles": [- {- "t0": 0.0,- "t1": 66.542,- "text": "咸鸭蛋为什么会流油?",- "decorative": true,- "style": {- "multicolor": true,- "stroke": "dark",- "animation": "scale_in"- }- }- ],- "cards": [- {- "t0": 15.807,- "t1": 21.022,- "text": "第1步 · 盐钻气孔",- "style": {- "box": true,- "animation": "pop_in"- }- },- {- "t0": 21.022,- "t1": 33.719,- "text": "第2步 · 盐进蛋黄",- "style": {- "box": true,- "animation": "pop_in"- }- },- {- "t0": 33.719,- "t1": 45.23,- "text": "第3步 · 蛋白挤油",- "style": {- "box": true,- "animation": "pop_in"- }- },- {- "t0": 45.23,- "t1": 54.935,- "text": "第4步 · 静待出油",- "style": {- "box": true,- "animation": "pop_in"- }- },- {- "t0": 54.935,- "t1": 57.181,- "text": "成了!",- "style": {- "box": true,- "animation": "pop_in"- }- },- {- "t0": 57.181,- "t1": 66.542,- "text": "注意!",- "style": {- "box": true,- "animation": "pop_in"- }- }- ],- "labels": [- {- "t0": 19.817,- "t1": 21.042,- "text": "气孔",- "follows_object": true,- "style": {- "box": true,- "animation": "pop_in"- }- },- {- "t0": 22.692,- "t1": 23.042,- "text": "蛋清",- "follows_object": true,- "style": {- "box": true,- "animation": "pop_in"- }- },- {- "t0": 23.832,- "t1": 24.333,- "text": "蛋黄膜",- "follows_object": true,- "style": {- "box": true,- "animation": "pop_in"- }- },- {- "t0": 25.442,- "t1": 26.125,- "text": "蛋黄",- "follows_object": true,- "style": {- "box": true,- "animation": "pop_in"- }- },- {- "t0": 51.558,- "t1": 54.958,- "text": "红油",- "follows_object": true,- "style": {- "box": true,- "animation": "pop_in"- }- }- ],- "stickers": [- {- "t0": 55.335,- "t1": 57.208,- "text": "流油咸鸭蛋!",- "decorative": true,- "style": {- "size_px": 150,- "stroke": "dark",- "animation": "pop_in_wobble"- }- }- ]-}\ No newline at end of filediff --git a/rea_video/cli.py b/rea_video/cli.pyindex 0ee855b..aaf96f8 100644--- a/rea_video/cli.py+++ b/rea_video/cli.py@@ -67,6 +67,16 @@ def _check_vlm_config() -> None:raise SystemExit(f"rea-video: {exc}")+def _vlm_client(out: Path):+ from .vlm import make_client++ client = make_client(out / "vlm_cache")+ if client is None:+ raise SystemExit(U("rea-video: --vlm 需要 GEMINI_API_KEY,或 REA_VLM_BASE_URL / REA_VLM_API_KEY / REA_VLM_MODEL",+ "rea-video: --vlm needs GEMINI_API_KEY, or REA_VLM_BASE_URL / REA_VLM_API_KEY / REA_VLM_MODEL"))+ return client++def cmd_decompose(args) -> int:from .pipeline import decompose@@ -112,17 +122,9 @@ def cmd_survey(args) -> int:asker = Noneif args.vlm or (pref("vlm") == "on" and not args.no_vlm):_check_vlm_config()- from . import gemini- from .vlm import VLMClient, VLMConfig, prompt_lang_note-- cfg = VLMConfig.from_env()- if cfg is not None:- asker = vlm_asker(VLMClient(cfg, out / "vlm_cache"), prompt_lang_note())- elif gemini.configured():- asker = vlm_asker(gemini.GeminiClient(), prompt_lang_note())- else:- raise SystemExit(U("rea-video: --vlm 需要 VLM 配置(REA_VLM_BASE_URL / REA_VLM_API_KEY / REA_VLM_MODEL,或 GEMINI_API_KEY)",- "rea-video: --vlm needs VLM settings (REA_VLM_BASE_URL / REA_VLM_API_KEY / REA_VLM_MODEL, or GEMINI_API_KEY)"))+ from .vlm import prompt_lang_note++ asker = vlm_asker(_vlm_client(out), prompt_lang_note())res = run(Path(args.video).expanduser().resolve(), out.expanduser().resolve(), track, detect_shots(track), info,asker=asker, workers=args.workers, detail=not args.no_detail)if res["status"] == "waiting":@@ -170,17 +172,9 @@ def cmd_moments(args) -> int:asker = Noneif args.vlm or (pref("vlm") == "on" and not args.no_vlm):_check_vlm_config()- from .vlm import VLMClient, VLMConfig, prompt_lang_note-- from . import gemini+ from .vlm import prompt_lang_note- cfg = VLMConfig.from_env()- if cfg is not None:- asker = mo.vlm_asker(VLMClient(cfg, out / "vlm_cache"), prompt_lang_note())- elif gemini.configured(): # only a Gemini key: Gemini's own API, which watches the clips with sound- asker = mo.vlm_asker(gemini.GeminiClient(), prompt_lang_note())- else:- raise SystemExit(U("rea-video: --vlm 需要 VLM 配置(REA_VLM_BASE_URL / REA_VLM_API_KEY / REA_VLM_MODEL,或 GEMINI_API_KEY)", "rea-video: --vlm needs VLM settings (REA_VLM_BASE_URL / REA_VLM_API_KEY / REA_VLM_MODEL, or GEMINI_API_KEY)"))+ asker = mo.vlm_asker(_vlm_client(out), prompt_lang_note())res = mo.run(b, out, asker=asker)if res["status"] == "waiting":res["next"] = T("看 images 里的图,按 tasks 里的说明把答案写进 waiting 里的文件(filled 改成 true),再运行同一条命令",diff --git a/rea_video/gemini.py b/rea_video/gemini.pyindex a8c74a1..986d292 100644--- a/rea_video/gemini.py+++ b/rea_video/gemini.py@@ -1,6 +1,6 @@"""Google Gemini as the image / video reader, through its own API (not an OpenAI-compatible gateway).-For users whose only key is a Gemini key: GEMINI_API_KEY (or GOOGLE_API_KEY), model REA_GEMINI_MODEL. Gemini watches+Set GEMINI_API_KEY (or GOOGLE_API_KEY); the model is REA_GEMINI_MODEL. Gemini watchesvideo with its sound, so a clip goes in whole: inline when small, else through the Files API (deleted after theanswer; an upload that can't be deleted expires on Google's side within 48 hours). Short clips are sampled densely(video_metadata.fps), long ones at Gemini's default. Used only when the user asks for a VLM (--vlm): the video leaves@@ -51,6 +51,8 @@ class GeminiClient:"""ask_json(prompt, media) like VLMClient; media = [(path, mime)], images and video/mp4 clips."""video_ok = True+ media = "both" # watches the clip with its sound and reads the key frames+def __init__(self, model: str | None = None, key: str | None = None, timeout: float = 600.0):self.key = key or api_key()if not self.key:diff --git a/rea_video/pipeline.py b/rea_video/pipeline.pyindex 5330422..4d7bf07 100644--- a/rea_video/pipeline.py+++ b/rea_video/pipeline.py@@ -26,7 +26,7 @@ from . import aspectsfrom .faces import MIN_AREA, shot_facesfrom .visual import LABEL_SHORT, shot_sheet, storyboardfrom .i18n import T, join, semi, set_lang-from .vlm import SHOT_PROMPT, SILENT_NOTE, SOUND_NOTE, TAKE_NOTE, WHOLE_PROMPT, VLMClient, VLMConfig, normalize_shot_result, normalize_whole, prompt_lang_note, shot_hints, take_results, vlm_note+from .vlm import make_client, SHOT_PROMPT, SILENT_NOTE, SOUND_NOTE, TAKE_NOTE, WHOLE_PROMPT, normalize_shot_result, normalize_whole, prompt_lang_note, shot_hints, take_results, vlm_notedef _sha256_head(path: Path, limit: int = 64 << 20) -> str:@@ -147,13 +147,7 @@ def decompose(video: str | Path, out_dir: str | Path, *, use_vlm: bool = False,timeline = load_timeline(out, video, info)vlm_client = None # one client for the survey and the shot pass: a model found down stays skippedif (timeline is None or "keyframes" not in timeline) and use_vlm and survey:- from . import gemini-- cfg = VLMConfig.from_env()- if cfg is not None:- vlm_client = VLMClient(cfg, out / "vlm_cache")- elif gemini.configured():- vlm_client = gemini.GeminiClient()+ vlm_client = make_client(out / "vlm_cache")if vlm_client is not None:try:got = run_survey(video, out, track, shots, info, asker=vlm_asker(vlm_client, prompt_lang_note()), workers=workers)@@ -334,30 +328,20 @@ def decompose(video: str | Path, out_dir: str | Path, *, use_vlm: bool = False,vlm_info = {"used": False, "requested": use_vlm, "status": "off"}whole = Noneif use_vlm:- from . import gemini-- cfg = VLMConfig.from_env()- if cfg is None and gemini.configured():- vlm_client = vlm_client or gemini.GeminiClient()- cfg_media, cfg_desc = "both", vlm_client.describe()- elif cfg is not None:- vlm_client = vlm_client or VLMClient(cfg, out / "vlm_cache")- cfg_media, cfg_desc = cfg.media, cfg.describe()- else:- cfg_media, cfg_desc = None, ""+ vlm_client = vlm_client or make_client(out / "vlm_cache")if vlm_client is None:- LOG.warning("--vlm requested but no VLM config found (REA_VLM_* / VIDEO_ANALYSIS_* / GEMINI3_* / GEMINI_API_KEY); continuing without it")+ LOG.warning("--vlm requested but no VLM config found (GEMINI_API_KEY / REA_VLM_*); continuing without it")vlm_info = {"used": False, "requested": True, "status": "not_configured", "error": "no_config"}else:client = vlm_client- vlm_info = {"used": False, "requested": True, "status": "failed", "model": cfg_desc, "media": cfg_media, "errors": []}+ vlm_info = {"used": False, "requested": True, "status": "failed", "model": client.describe(), "media": client.media, "errors": []}def run_unit(unit: list[dict]) -> None:"""One VLM call per unit: a single shot, or the jump-cut pieces of one take seen as one clip."""first, last = unit[0], unit[-1]span = last["end"] - first["start"]media = []- if cfg_media in ("both", "frames"):+ if client.media in ("both", "frames"):mid = unit[len(unit) // 2]media += [(out / first["assets"]["first_frame"], "image/jpeg"), (out / mid["assets"]["sheet"], "image/jpeg"),(out / last["assets"]["last_frame"], "image/jpeg")]@@ -367,18 +351,18 @@ def decompose(video: str | Path, out_dir: str | Path, *, use_vlm: bool = False,if len(unit) > 1:prompt += TAKE_NOTE.format(n=len(unit), cuts=", ".join(f"{r['start'] - first['start']:.2f}" for r in unit[1:]))spoken = speaks_in(audio, first["start"], first["start"] + min(span, 12.0))- if cfg_media in ("both", "video"):+ if client.media in ("both", "video"):prompt += SOUND_NOTE if spoken else SILENT_NOTEprompt += prompt_lang_note()fallback = Nonetry:- if cfg_media in ("both", "video"): # a clip that fails to encode costs this unit its video, not the run+ if client.media in ("both", "video"): # a clip that fails to encode costs this unit its video, not the runclip = cut_clip(video, first["start"], min(span, 12.0), out / "clips" / f"{first['id']}.mp4", width=480, audio=spoken)media.insert(0, (clip, "video/mp4"))raw = client.ask_json(prompt, media)except Exception as exc: # keep going; deterministic result standsraw = None- if spoken and cfg_media in ("both", "video"): # an endpoint that refuses a clip with sound still gets the picture+ if spoken and client.media in ("both", "video"): # an endpoint that refuses a clip with sound still gets the picturetry:clip = cut_clip(video, first["start"], min(span, 12.0), out / "clips" / f"{first['id']}_mute.mp4", width=480)raw = client.ask_json(prompt.replace(SOUND_NOTE, SILENT_NOTE.replace("这一段没检测到人声,", "")),@@ -386,7 +370,7 @@ def decompose(video: str | Path, out_dir: str | Path, *, use_vlm: bool = False,fallback = "mute_clip"except Exception as exc2: # noqa: BLE001exc = exc2- if raw is None and cfg_media == "both":+ if raw is None and client.media == "both":try:raw = client.ask_json(prompt, [m for m in media if m[1] != "video/mp4"])fallback = "frames_only"diff --git a/rea_video/vlm.py b/rea_video/vlm.pyindex 2271c8e..57ea8fb 100644--- a/rea_video/vlm.py+++ b/rea_video/vlm.py@@ -1,9 +1,8 @@-"""OpenAI-compatible multimodal client (Gemini via proxy, Doubao, GPT, Qwen-VL...).+"""Image / video readers: Gemini through its own API (gemini.py), or a multimodal model's OpenAI-compatible endpoint.-Config (first non-empty wins):- REA_VLM_BASE_URL / REA_VLM_API_KEY / REA_VLM_MODEL- VIDEO_ANALYSIS_BASE_URL / VIDEO_ANALYSIS_API_KEY / VIDEO_ANALYSIS_MODEL_NAME (capsule-cinema)- GEMINI3_BASE_URL / GEMINI3_API_KEY / GEMINI3_MODEL_NAME (capsule-cinema)+Config:+ GEMINI_API_KEY (or GOOGLE_API_KEY), model REA_GEMINI_MODEL+ REA_VLM_BASE_URL / REA_VLM_API_KEY / REA_VLM_MODEL (a model's own endpoint; used when set)REA_VLM_MODEL may be a comma-separated fallback list.REA_VLM_MEDIA = both | video | frames (default both: a short clip as data:video/mp4 plus keyframes)REA_VLM_VIDEO_PART = image_url | video_url (how a clip is attached; unset: image_url, switching to video_url by@@ -44,23 +43,14 @@ class VLMConfig:@classmethoddef from_env(cls) -> "VLMConfig | None":- """First complete config wins; later configs on the same endpoint and key add their- models as fallbacks (capsule-cinema keeps one model in VIDEO_ANALYSIS_* and a list in GEMINI3_*).- A malformed value raises ValueError naming the variable: a typo must fail fast here, not- silently run the VLM with no media (bad REA_VLM_MEDIA) or crash mid-run (bad timeout)."""- cfg: VLMConfig | None = None- for prefix, mkey in (("REA_VLM", "REA_VLM_MODEL"), ("VIDEO_ANALYSIS", "VIDEO_ANALYSIS_MODEL_NAME"), ("GEMINI3", "GEMINI3_MODEL_NAME")):- base, key = os.getenv(f"{prefix}_BASE_URL", "").rstrip("/"), os.getenv(f"{prefix}_API_KEY", "")- models = [m.strip() for m in os.getenv(mkey, "").split(",") if m.strip()]- if not (base and key and models):- continue- if cfg is None:- cfg = cls(base_url=base, api_key=key, models=models,- timeout=_timeout_from_env(), media=_media_from_env(),- video_part=_video_part_from_env(), reasoning_effort=_effort_from_env())- elif prefix != "REA_VLM" and base == cfg.base_url and key == cfg.api_key:- cfg.models += [m for m in models if m not in cfg.models]- return cfg+ """The REA_VLM_* endpoint, or None. A malformed value raises ValueError naming the variable: a typo must fail+ fast here, not silently run the VLM with no media (bad REA_VLM_MEDIA) or crash mid-run (bad timeout)."""+ base, key = os.getenv("REA_VLM_BASE_URL", "").rstrip("/"), os.getenv("REA_VLM_API_KEY", "")+ models = [m.strip() for m in os.getenv("REA_VLM_MODEL", "").split(",") if m.strip()]+ if not (base and key and models):+ return None+ return cls(base_url=base, api_key=key, models=models, timeout=_timeout_from_env(), media=_media_from_env(),+ video_part=_video_part_from_env(), reasoning_effort=_effort_from_env())def describe(self) -> str:host = re.sub(r"^https?://", "", self.base_url).split("/")[0].rsplit("@", 1)[-1] # 去掉 user:pass@@@ -68,7 +58,7 @@ class VLMConfig:def _timeout_from_env() -> float:- var = "REA_VLM_TIMEOUT" if os.getenv("REA_VLM_TIMEOUT") is not None else "VIDEO_ANALYSIS_TIMEOUT_SECONDS"+ var = "REA_VLM_TIMEOUT"raw = os.getenv(var, "180")try:timeout = float(raw)@@ -100,10 +90,10 @@ def _effort_from_env() -> str:return effort-SETUP_HINT = ("建议配置 VLM(任意 OpenAI 兼容的多模态模型,如 Gemini / GPT-4o / 豆包 / Qwen-VL):"- "设置 REA_VLM_BASE_URL、REA_VLM_API_KEY、REA_VLM_MODEL(可写多个模型逗号分隔做备选),再加 --vlm 重跑")-SETUP_HINT_EN = ("configure a VLM (any OpenAI-compatible multimodal model, e.g. Gemini / GPT-4o / Doubao / Qwen-VL): "- "set REA_VLM_BASE_URL, REA_VLM_API_KEY and REA_VLM_MODEL (several models comma-separated as fallbacks), then rerun with --vlm")+SETUP_HINT = ("建议配置 VLM:设置 GEMINI_API_KEY 直接用 Gemini;用其他多模态模型(GPT-4o、豆包、Qwen-VL 等)时,"+ "设置 REA_VLM_BASE_URL、REA_VLM_API_KEY、REA_VLM_MODEL。配好后加 --vlm 重跑")+SETUP_HINT_EN = ("configure a VLM: set GEMINI_API_KEY to use Gemini directly; for another multimodal model (GPT-4o, Doubao, Qwen-VL...), "+ "set REA_VLM_BASE_URL, REA_VLM_API_KEY and REA_VLM_MODEL. Then rerun with --vlm")def vlm_note(info: dict, review: dict | None = None) -> str:@@ -177,6 +167,7 @@ class VLMClient:def __init__(self, cfg: VLMConfig, cache_dir: Path | None = None):self.cfg = cfg+ self.media = cfg.mediaself.cache_dir = cache_dirself.dead_requests = 0self.models = list(cfg.models) # reordered: the last model that answered goes first@@ -193,6 +184,9 @@ class VLMClient:def gave_up(self) -> bool:return self.dead_requests >= self.MAX_DEAD_REQUESTS+ def describe(self) -> str:+ return self.cfg.describe()+def _post(self, model: str, content: list[dict], max_tokens: int) -> str:body = json.dumps({"model": model, "messages": [{"role": "user", "content": content}],"max_tokens": max_tokens, "temperature": 0.2,@@ -591,3 +585,13 @@ def prompt_lang_note() -> str:return ("\n\nWrite every free-text value (evidence, description, style, summary, copy, prompts, aspects answers) in English. ""Keep enum values exactly as listed. `image_prompt` and `video_prompt` in English; `video_prompt_en` may repeat it.")return ""+++def make_client(cache_dir: Path | None = None):+ """The configured image / video reader: the REA_VLM_* endpoint when set, else Gemini's own API, else None."""+ from . import gemini++ cfg = VLMConfig.from_env()+ if cfg is not None:+ return VLMClient(cfg, cache_dir)+ return gemini.GeminiClient() if gemini.configured() else Nonediff --git a/skills/rea-video/references/output-template.md b/skills/rea-video/references/output-template.mdindex cbff578..6e3c608 100644--- a/skills/rea-video/references/output-template.md+++ b/skills/rea-video/references/output-template.md@@ -49,4 +49,4 @@**报告**:out/ref/report.html-**VLM**:照抄 `rea-video summary` 的 `VLM:` 一行(已生效 / 部分生效 / 全部调用失败 / 未配置 / 未开)。没生效、而且你自己也看不了图时,加一句建议:"配置任意多模态模型(REA_VLM_BASE_URL / REA_VLM_API_KEY / REA_VLM_MODEL)后加 --vlm 重跑,实拍/AI/3D 的判断会更准。"你能看图时写"由 agent 看图复核"即可。+**VLM**:照抄 `rea-video summary` 的 `VLM:` 一行(已生效 / 部分生效 / 全部调用失败 / 未配置 / 未开)。没生效、而且你自己也看不了图时,加一句建议:"配置 GEMINI_API_KEY 后加 --vlm 重跑,实拍/AI/3D 的判断会更准。"你能看图时写"由 agent 看图复核"即可。diff --git a/skills/rea-video/references/setup.md b/skills/rea-video/references/setup.mdindex 848af91..505a6cc 100644--- a/skills/rea-video/references/setup.md+++ b/skills/rea-video/references/setup.md@@ -51,13 +51,12 @@ pip install "rea-video[ocr,asr] @ git+https://github.com/JuneYaooo/rea-video"**VLM(建议配置,不强制)**:VLM 是能看图/看视频的多模态大模型(Gemini、GPT-4o、豆包、Qwen-VL 等)。不开 VLM,工具只靠像素统计、帧率、OCR、元数据判断,照样能跑完、出报告,但**实拍 / AI / 3D 的区分明显变弱**,音效清单也只有信号层的低置信候选。开了 VLM,工具会把每个镜头的短片段和关键帧发给它,再和确定性结果融合。-配置走 OpenAI 兼容接口,按以下顺序读取:+两种配置:-1. `REA_VLM_BASE_URL` / `REA_VLM_API_KEY` / `REA_VLM_MODEL`(`REA_VLM_MODEL` 可写多个模型、逗号分隔,前一个失败自动换下一个)-2. 如果没有,回落到 capsule-cinema 的 `VIDEO_ANALYSIS_*` 或 `GEMINI3_*`-3. 只有 Gemini 的 key(`GEMINI_API_KEY`,模型用 `REA_GEMINI_MODEL` 改):特殊时刻(`moments`)走 Gemini 自己的接口,连声音一起看视频片段;视频会上传到 Google,用完即删+- Gemini:设置 `GEMINI_API_KEY`(模型用 `REA_GEMINI_MODEL` 改),走 Gemini 官方接口,连声音一起看视频片段;视频会上传到 Google,用完即删+- 其他多模态模型:设置 `REA_VLM_BASE_URL` / `REA_VLM_API_KEY` / `REA_VLM_MODEL`(可写多个模型、逗号分隔,前一个失败自动换下一个)。设置了这一组时优先用它-用 `--env-file <某个 .env>` 读取配置(例如复用 capsule-cinema 的)。**不要把密钥写进对话、仓库或报告,也不要打开 .env 看内容。**+用 `--env-file <某个 .env>` 读取配置。**不要把密钥写进对话、仓库或报告,也不要打开 .env 看内容。**用户没配 VLM 时:照常不加 `--vlm` 跑,不要因此中止任务。