@remixmate/cli 0.9.1 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/manifest.json +2 -2
- package/package.json +1 -1
- package/skills/export-jianying/SKILL.md +9 -3
- package/skills/export-jianying/version.json +1 -1
- package/skills/render-video/SKILL.md +20 -1
- package/skills/render-video/scripts/render_video.py +47 -0
- package/skills/render-video/version.json +1 -1
package/dist/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remixmate/cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2",
|
|
4
4
|
"description": "AI media generation skills for Claude Code / Codex — 11 skills covering image, video, voice, digital human, web capture, script, template registry, rendering, Jianying export, and video deconstruction.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -65,15 +65,21 @@ python3 <SkillDir>/scripts/gen_jianying_draft.py \
|
|
|
65
65
|
|
|
66
66
|
### Read from a RenderPlan file (fallback, single-user / local debugging)
|
|
67
67
|
|
|
68
|
-
When not using the database mode, read a local
|
|
68
|
+
When not using the database mode, read a local RenderPlan file:
|
|
69
69
|
|
|
70
70
|
```bash
|
|
71
71
|
python3 <SkillDir>/scripts/gen_jianying_draft.py \
|
|
72
|
-
--from-render-plan
|
|
72
|
+
--from-render-plan <path>.render-plan.json \
|
|
73
73
|
--title "My Video"
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
> ⚠️ Don't point `--from-render-plan` at a shared `output/render-plan.json`. That
|
|
77
|
+
> file is NOT produced by the default token-present pipeline (the plan goes to the
|
|
78
|
+
> DB under a jobId), so anything sitting there is likely a stale leftover from an
|
|
79
|
+
> unrelated run. Prefer the `--from-job-id` DB mode, or render with an explicit
|
|
80
|
+
> `--save-render-plan --render-plan-output <path>` first.
|
|
81
|
+
|
|
82
|
+
The script automatically extracts the following from the RenderPlan:
|
|
77
83
|
- Each scene's visual asset URL (image / video)
|
|
78
84
|
- TTS audio URL and duration
|
|
79
85
|
- Subtitle text
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"skillName": "export-jianying",
|
|
3
3
|
"repoName": "agent-skill-media-maker",
|
|
4
4
|
"skillId": "554",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "V3",
|
|
6
6
|
"skillDescription": "剪映草稿生成技能,将素材URL打包为剪映可导入的草稿ZIP,支持从 RenderPlan 自动转换(调用 ab-api /file/generateJianYing)。\n\n当用户提到以下任何需求时,立即使用本 skill:\n- 导出剪映、剪映草稿、打包剪映、导入剪映\n- 将素材导出为剪映格式、生成剪映工程\n- 把视频/图片/音频打包成剪映草稿\n- 从 RenderPlan 导出剪映草稿\n\n即使用户没有明确说「剪映」,只要他们想要将素材打包为可在剪映中编辑的草稿格式,也要使用本 skill。"
|
|
7
7
|
}
|
|
@@ -73,9 +73,28 @@ python3 <SkillDir>/scripts/render_video.py --job-id <jobId>
|
|
|
73
73
|
When the DB is unavailable, the script accepts a pre-generated RenderPlan file:
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
|
-
python3 <SkillDir>/scripts/render_video.py --render-plan
|
|
76
|
+
python3 <SkillDir>/scripts/render_video.py --render-plan <path>.render-plan.json
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
+
> ⚠️ **Do NOT blindly point `--render-plan` at a shared `output/render-plan.json`.**
|
|
80
|
+
> Under the default token-present path, `prepare_video_assets` / `render_video`
|
|
81
|
+
> persist the plan to the **database (jobId)** only — they do **not** write
|
|
82
|
+
> `output/render-plan.json`. Any file sitting there is likely a leftover from a
|
|
83
|
+
> previous, unrelated run (the `output/` dir is gitignored scratch), and rendering
|
|
84
|
+
> it silently produces the wrong video.
|
|
85
|
+
>
|
|
86
|
+
> To get a RenderPlan file on disk, generate it explicitly:
|
|
87
|
+
> ```bash
|
|
88
|
+
> python3 <SkillDir>/scripts/render_video.py --dsl video.dsl.json --template-id <id> \
|
|
89
|
+
> --resolve-only --save-render-plan --render-plan-output video.render-plan.json
|
|
90
|
+
> ```
|
|
91
|
+
> Or skip the file entirely and render in one shot:
|
|
92
|
+
> `render_video.py --dsl video.dsl.json --template-id <id>`.
|
|
93
|
+
>
|
|
94
|
+
> On load, the script now prints a `↳ plan: templateId=… composition=… duration=… title=…`
|
|
95
|
+
> summary, and warns if the plan file is older than a `--dsl` you also passed —
|
|
96
|
+
> check that line matches what you intend before the render proceeds.
|
|
97
|
+
|
|
79
98
|
### Render and upload to Alibaba Cloud OSS (default behavior)
|
|
80
99
|
|
|
81
100
|
```bash
|
|
@@ -1856,6 +1856,35 @@ def auto_bind_template(dsl: dict, template_id: str) -> dict:
|
|
|
1856
1856
|
return binding
|
|
1857
1857
|
|
|
1858
1858
|
|
|
1859
|
+
def _log_render_plan_summary(render_plan: dict) -> None:
|
|
1860
|
+
"""Print a one-line identity summary of a loaded RenderPlan.
|
|
1861
|
+
|
|
1862
|
+
The two ways to feed an existing plan (``--render-plan <file>`` and
|
|
1863
|
+
``--job-id <int>``) used to print only the *source* (path / id), never the
|
|
1864
|
+
*content*. When a stale ``output/render-plan.json`` from a previous, unrelated
|
|
1865
|
+
run got picked up, the mismatch was rendered silently. Surfacing
|
|
1866
|
+
templateId / title / duration / scene count here makes a wrong plan obvious
|
|
1867
|
+
at a glance before any render time is spent.
|
|
1868
|
+
"""
|
|
1869
|
+
try:
|
|
1870
|
+
template_id = render_plan.get("templateId", "?")
|
|
1871
|
+
title = render_plan.get("title", "")
|
|
1872
|
+
cfg = render_plan.get("renderConfig", {}) or {}
|
|
1873
|
+
fps = cfg.get("fps") or 30
|
|
1874
|
+
total_frames = cfg.get("totalFrames")
|
|
1875
|
+
scenes = len(render_plan.get("timeline", []) or [])
|
|
1876
|
+
comp = (render_plan.get("remotionProps", {}) or {}).get("compositionId", "?")
|
|
1877
|
+
dur = f"{total_frames / fps:.1f}s/{total_frames}f" if total_frames else "?"
|
|
1878
|
+
LogPrint(
|
|
1879
|
+
f" ↳ plan: templateId={template_id} composition={comp} "
|
|
1880
|
+
f"duration={dur} scenes={scenes}" + (f' title=\"{title}\"' if title else ""),
|
|
1881
|
+
file=sys.stderr,
|
|
1882
|
+
)
|
|
1883
|
+
except Exception:
|
|
1884
|
+
# A summary is a convenience, never a hard dependency of rendering.
|
|
1885
|
+
pass
|
|
1886
|
+
|
|
1887
|
+
|
|
1859
1888
|
def main():
|
|
1860
1889
|
parser = argparse.ArgumentParser(
|
|
1861
1890
|
description="Video render tool — DSL + TemplateBinding → Remotion video.",
|
|
@@ -1944,12 +1973,30 @@ Examples:
|
|
|
1944
1973
|
sys.exit(1)
|
|
1945
1974
|
render_plan = json.loads(render_plan_str)
|
|
1946
1975
|
LogPrint(f"✅ RenderPlan loaded (jobId={args.job_id})", file=sys.stderr)
|
|
1976
|
+
_log_render_plan_summary(render_plan)
|
|
1947
1977
|
elif args.render_plan:
|
|
1948
1978
|
if not os.path.exists(args.render_plan):
|
|
1949
1979
|
LogPrint(f"❌ file does not exist: {args.render_plan}", file=sys.stderr)
|
|
1950
1980
|
sys.exit(1)
|
|
1951
1981
|
render_plan = load_json(args.render_plan)
|
|
1952
1982
|
LogPrint(f"📋 loaded existing RenderPlan: {args.render_plan}", file=sys.stderr)
|
|
1983
|
+
_log_render_plan_summary(render_plan)
|
|
1984
|
+
# 陈旧文件防护:output/render-plan.json 等共享文件名常被上一次别的项目
|
|
1985
|
+
# 的运行残留覆盖(output/ 是 gitignored 调试目录)。当用户同时给了 --dsl
|
|
1986
|
+
# 用以表明"我想渲这个 DSL",但磁盘上的 plan 比 DSL 还旧时,几乎可以肯定
|
|
1987
|
+
# 加载到的是过期 plan —— 明确警告而不是静默渲染错的东西。
|
|
1988
|
+
if args.dsl and os.path.exists(args.dsl):
|
|
1989
|
+
try:
|
|
1990
|
+
if os.path.getmtime(args.render_plan) < os.path.getmtime(args.dsl):
|
|
1991
|
+
LogPrint(
|
|
1992
|
+
f"⚠️ STALE RenderPlan? '{args.render_plan}' is OLDER than the DSL "
|
|
1993
|
+
f"'{args.dsl}'. You may be rendering a leftover plan from a previous "
|
|
1994
|
+
"run. Regenerate with --dsl ... --template-id ... (drop --render-plan) "
|
|
1995
|
+
"if the summary above doesn't match what you expect.",
|
|
1996
|
+
file=sys.stderr,
|
|
1997
|
+
)
|
|
1998
|
+
except OSError:
|
|
1999
|
+
pass
|
|
1953
2000
|
else:
|
|
1954
2001
|
if not args.dsl and not args.dsl_json:
|
|
1955
2002
|
LogPrint(
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"skillName": "render-video",
|
|
3
3
|
"repoName": "agent-skill-media-maker",
|
|
4
4
|
"skillId": "473",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "V19",
|
|
6
6
|
"skillDescription": "Final-render skill (Phase 3 of the two-phase video pipeline). Loads a persisted RenderPlan by job_id and drives Remotion to produce the final video. Assets must already be generated via prepare_video_assets."
|
|
7
7
|
}
|