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
chore: 安装脚本检查 ffmpeg / Python 版本并处理 PEP 668;SKILL 复核步骤补重跑 apply-review;plugin 许可证改为 Apache-2.0
june1bff6f6b6554
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonindex af2b139..346e0fd 100644--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@ -5,6 +5,6 @@"author": { "name": "June" },"homepage": "https://github.com/JuneYaooo/rea-video","repository": "https://github.com/JuneYaooo/rea-video",- "license": "MIT",+ "license": "Apache-2.0","keywords": ["video", "forensics", "ai-video", "remake"]}diff --git a/scripts/install_skill.sh b/scripts/install_skill.shindex e2ca7e6..5384827 100755--- a/scripts/install_skill.sh+++ b/scripts/install_skill.sh@@ -1,12 +1,65 @@#!/usr/bin/env bash-# 把 rea-video skill 链接到常见 agent 的 skills 目录,并安装 CLI。+# 把 rea-video skill 链接到常见 agent 的 skills 目录,并安装 CLI。可重复运行。+# PYTHON_BIN=python3.12 bash scripts/install_skill.sh # 指定解释器set -euo pipefailROOT="$(cd "$(dirname "$0")/.." && pwd)"-PY="${PYTHON_BIN:-python3}"-"$PY" -m pip install -e "$ROOT[ocr]"-for dir in "$HOME/.claude/skills" "$HOME/.codex/skills" "$HOME/.agents/skills"; do++# ---- ffmpeg ----+if ! command -v ffmpeg >/dev/null 2>&1 || ! command -v ffprobe >/dev/null 2>&1; then+ echo "⚠ 没找到 ffmpeg / ffprobe,rea-video 跑不起来。安装:macOS 'brew install ffmpeg',Ubuntu/Debian 'sudo apt install ffmpeg'" >&2+fi++# ---- Python >= 3.10 ----+py_ok() { "$1" -c 'import sys; sys.exit(sys.version_info < (3, 10))' 2>/dev/null; }+PY="${PYTHON_BIN:-}"+if [ -z "$PY" ]; then+ for c in python3 python3.13 python3.12 python3.11 python3.10; do+ if command -v "$c" >/dev/null 2>&1 && py_ok "$c"; then PY="$c"; break; fi+ done+fi+if [ -z "$PY" ] || ! py_ok "$PY"; then+ echo "✗ 需要 Python ≥ 3.10(当前 ${PY:-python3}: $("${PY:-python3}" --version 2>&1 || echo 未安装))。" >&2+ echo " macOS: brew install [email protected];Ubuntu: sudo apt install python3.12 python3.12-venv;然后 PYTHON_BIN=python3.12 bash $0" >&2+ exit 1+fi++# ---- 安装 CLI:pip -> (系统 Python 不让装时) pipx -> 仓库内 .venv ----+log="$(mktemp)"+trap 'rm -f "$log"' EXIT+if "$PY" -m pip install -e "$ROOT[ocr]" 2>&1 | tee "$log"; [ "${PIPESTATUS[0]}" -eq 0 ]; then+ :+elif grep -qi "externally-managed" "$log"; then+ echo "系统 Python 不允许直接 pip 安装(PEP 668),改用隔离环境。" >&2+ if command -v pipx >/dev/null 2>&1; then+ pipx install --force --python "$PY" -e "$ROOT[ocr]"+ else+ "$PY" -m venv "$ROOT/.venv"+ "$ROOT/.venv/bin/python" -m pip install -e "$ROOT[ocr]"+ mkdir -p "$HOME/.local/bin"+ ln -sfn "$ROOT/.venv/bin/rea-video" "$HOME/.local/bin/rea-video"+ echo "已装到 $ROOT/.venv,命令链接到 ~/.local/bin/rea-video"+ case ":$PATH:" in *":$HOME/.local/bin:"*) ;; *) echo "⚠ ~/.local/bin 不在 PATH 里,把它加进 shell 配置。" >&2 ;; esac+ fi+else+ echo "✗ pip 安装失败,见上面的输出。" >&2+ exit 1+fi++# ---- 链接 skill:只链到已经装了的 agent(都没装就链到 ~/.claude/skills) ----+targets=()+for home in "$HOME/.claude" "$HOME/.codex" "$HOME/.agents"; do+ [ -d "$home" ] && targets+=("$home/skills")+done+[ ${#targets[@]} -eq 0 ] && targets=("$HOME/.claude/skills")+for dir in "${targets[@]}"; domkdir -p "$dir"- ln -sfn "$ROOT/skills/rea-video" "$dir/rea-video"- echo "linked $dir/rea-video"+ dest="$dir/rea-video"+ if [ -e "$dest" ] && [ ! -L "$dest" ]; then+ # ln -sfn 遇到真实目录会把链接建到它里面,还报成功+ echo "⚠ $dest 是一个真实目录(旧的手动拷贝?),跳过。删掉或改名后重跑。" >&2+ continue+ fi+ ln -sfn "$ROOT/skills/rea-video" "$dest"+ echo "linked $dest"doneecho "done. 试试:rea-video --help"diff --git a/skills/rea-video/SKILL.md b/skills/rea-video/SKILL.mdindex 3cb2d7b..c6120f4 100644--- a/skills/rea-video/SKILL.md+++ b/skills/rea-video/SKILL.md@@ -70,7 +70,8 @@ rea-video summary out/ref/breakdown.json # 用并入后的结果写回复- 贴纸:标了「需要看图确认」的,看 `packaging/sticker_XX.jpg` 和 `review_tasks.json` 里的 `frame_cmd`,在 `review_answers.json` 的 `packaging.stickers` 里填 `is_overlay` 和 `what`;工具漏掉的写进 `packaging.missed`。3D / 动画 / 版式画面里突然出现的物体工具不算贴纸,你看到是后期贴的再补。- 花字和标签分错类时在 `packaging.text` 里改 `kind`。- 音效「对应画面」一列是按时间就近对齐的,没开 VLM 时补出的候选(来源 `deterministic_anchored`)实测只有约四成是真音效,写成"可能"。-8. 如果你的判断和工具不同,以你的复核为准,在回复里写明理由;有价值的话,建议用户把这条视频加进评测集(仓库 `docs/dev/evaluation.md`)。+8. 第 3、5、6、7 步改了 `review_answers.json` 的,改完**再跑一次** `rea-video apply-review out/ref --by <你的名字>`,否则这些修改进不了报告。+9. 如果你的判断和工具不同,以你的复核为准,在回复里写明理由;有价值的话,建议用户把这条视频加进评测集(仓库 `docs/dev/evaluation.md`)。用户指出判错或说出长期偏好时,按 `references/memory.md` 记下来(`rea-video correct` / `rea-video prefs`)。@@ -100,7 +101,7 @@ rea-video summary out/ref/breakdown.json # 用并入后的结果写回复| `references/remake.md` | 复刻、对接 capsule-cinema || `references/memory.md` | 记住纠正和偏好 |-## 5. 不要做的事+## 4. 不要做的事- 不要只凭画风判断。卡通 3D 风格既可能是 AI 视频,也可能是 Blender 渲染,要看形变、闪烁和几何稳定性。- 不要把代码渲染画面里的文字算成"叠加层",那些文字就是画面本身。diff --git a/skills/rea-video/references/setup.md b/skills/rea-video/references/setup.mdindex c4bc215..e2a25ef 100644--- a/skills/rea-video/references/setup.md+++ b/skills/rea-video/references/setup.md@@ -8,6 +8,9 @@ pip install "rea-video[ocr] @ git+https://github.com/JuneYaooo/rea-video" #rea-video --help```+pip 报 `externally-managed-environment`(Homebrew / 新版 Ubuntu 的系统 Python)时,不要加 `--break-system-packages`,改用+`pipx install "rea-video[ocr] @ git+https://github.com/JuneYaooo/rea-video"`,或直接跑 `install_skill.sh`(会自动改用 pipx 或仓库内 `.venv`)。+## VLM 配置(建议,不强制)**VLM(建议配置,不强制)**:VLM 是能看图/看视频的多模态大模型(Gemini、GPT-4o、豆包、Qwen-VL 等)。不开 VLM,工具只靠像素统计、帧率、OCR、元数据判断,照样能跑完、出报告,但**实拍 / AI / 3D 的区分明显变弱**,音效清单也只有信号层的低置信候选。开了 VLM,工具会把每个镜头的短片段和关键帧发给它,再和确定性结果融合。