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
OCR 语言列表收敛到 util.OCR_LANGS;日文 README 提示改为日本語で回答
junead8f9562f98d
diff --git a/README_ja.md b/README_ja.mdindex c12da09..840f46f 100644--- a/README_ja.md+++ b/README_ja.md@@ -20,7 +20,7 @@ rea-video の判定:左はすべて実写で、1 つのセットと 2 つの</div>-> レポートと詳細なドキュメントは、現在中国語のみです。エージェントがそれらを読み、英語で回答できます。+> レポートと詳細なドキュメントは、現在中国語のみです。エージェントがそれらを読み、日本語で回答できます。## 分析できるものdiff --git a/rea_video/cli.py b/rea_video/cli.pyindex c3f794a..8154f86 100644--- a/rea_video/cli.py+++ b/rea_video/cli.py@@ -7,7 +7,7 @@ import osimport sysfrom pathlib import Path-from .util import LOG, load_env_files, read_json, setup_logging+from .util import LOG, OCR_LANGS, load_env_files, read_json, setup_loggingfrom .classify import LABELSfrom .vlm import vlm_note@@ -29,7 +29,6 @@ def _env(args) -> None:def _ocr_lang(args) -> None:"""--ocr-lang (or prefs ocr_lang) -> $REA_OCR_LANG, which overlay.get_ocr reads."""from .memory import pref- from .overlay import OCR_LANGSlang = getattr(args, "ocr_lang", None) or pref("ocr_lang")if lang:@@ -348,7 +347,7 @@ def main(argv: list[str] | None = None) -> int:d.add_argument("--no-vlm", action="store_true", help="本次不开 VLM(覆盖 prefs 里的 vlm=on)")d.add_argument("--no-whole", action="store_true", help="跳过整片结构/文案 VLM 分析")d.add_argument("--no-ocr", action="store_true", help="不做 OCR(字幕/花字时间轴也会跳过,只剩贴纸检测)")- d.add_argument("--ocr-lang", choices=["zh", "ja"], help="字幕/花字的语言:zh 中英(默认)、ja 日文(首次使用自动下载识别模型);也可用 prefs ocr_lang 设成默认")+ d.add_argument("--ocr-lang", choices=OCR_LANGS, help="字幕/花字的语言:zh 中英(默认)、ja 日文(首次使用自动下载识别模型);也可用 prefs ocr_lang 设成默认")d.add_argument("--no-packaging", action="store_true", help="跳过剪辑包装层(整片字幕时间轴、花字、贴纸/动图、音效卡点);省掉约每分钟 30–50 秒")d.add_argument("--workers", type=int, default=3)d.add_argument("--engine", help="复刻计划使用的 capsule-cinema 视频引擎(默认 prefs 里的 engine,否则 seedance2.0)")@@ -371,7 +370,7 @@ def main(argv: list[str] | None = None) -> int:e.add_argument("-o", "--out", default="out/eval")e.add_argument("--vlm", action="store_true")e.add_argument("--no-ocr", action="store_true")- e.add_argument("--ocr-lang", choices=["zh", "ja"], help="同 decompose --ocr-lang")+ e.add_argument("--ocr-lang", choices=OCR_LANGS, help="同 decompose --ocr-lang")e.add_argument("--fresh", action="store_true", help="不复用已有拆解结果")e.add_argument("--only", default="", help="只重新拆解这些 id(逗号分隔),其余复用缓存并重新分类")e.add_argument("--stems", action="store_true", help="对带音频真值的样本做人声分离,并在干声上重测唱/说")diff --git a/rea_video/memory.py b/rea_video/memory.pyindex 5de55a1..50b1c33 100644--- a/rea_video/memory.py+++ b/rea_video/memory.py@@ -18,6 +18,7 @@ from collections import Counterfrom pathlib import Pathfrom .classify import LABEL_ZH, LABELS, top+from .util import OCR_LANGSPREF_KEYS = {"engine": "复刻计划默认的视频引擎(decompose / remake-plan 的 --engine)",@@ -54,8 +55,8 @@ def set_pref(key: str, value: str | None) -> dict:raise ValueError(f"未知偏好 {key}(可选:{', '.join(PREF_KEYS)};自由文字偏好用 prefs --note)")if value is not None and key in ("vlm", "stems") and value not in ON_OFF:raise ValueError(f"{key} 只能是 on / off")- if value is not None and key == "ocr_lang" and value not in ("zh", "ja"):- raise ValueError("ocr_lang 只能是 zh / ja")+ if value is not None and key == "ocr_lang" and value not in OCR_LANGS:+ raise ValueError(f"ocr_lang 只能是 {' / '.join(OCR_LANGS)}")if value is not None and key == "env_file":value = str(Path(value).expanduser().resolve())prefs = load_prefs()diff --git a/rea_video/overlay.py b/rea_video/overlay.pyindex eba267d..5652035 100644--- a/rea_video/overlay.py+++ b/rea_video/overlay.py@@ -16,9 +16,8 @@ from pathlib import Pathimport cv2import numpy as np-from .util import LOG+from .util import LOG, OCR_LANGS-OCR_LANGS = ("zh", "ja")# Recognition models for languages other than the bundled Chinese/English one. Detection stays the bundled# model, which finds Japanese text lines fine; only the recognizer's character set has to change. The ONNX# files from RapidOCR carry their character list in the model metadata, so no separate dict is needed.diff --git a/rea_video/util.py b/rea_video/util.pyindex bb55f93..0101a03 100644--- a/rea_video/util.py+++ b/rea_video/util.py@@ -9,6 +9,7 @@ from pathlib import Pathfrom typing import Any, IterableLOG = logging.getLogger("rea_video")+OCR_LANGS = ("zh", "ja") # subtitle/huazi OCR languages; zh is the bundled recognizer, others are in overlay._REC_MODELSdef setup_logging(verbose: bool = False) -> None: