remotion-ffmpeg-skill 0.4.0 → 0.5.0
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/README.md +8 -1
- package/package.json +39 -7
- package/references/scripts.md +31 -1
- package/scripts/_contract.py +62 -0
- package/scripts/_docs.py +10 -1
- package/scripts/deliver.py +4 -1
- package/scripts/render.py +2 -1
package/README.md
CHANGED
|
@@ -8,7 +8,14 @@ Built on [**ffmpeg-skill**](https://github.com/kajisho5/ffmpeg-skill). Unofficia
|
|
|
8
8
|
|
|
9
9
|

|
|
10
10
|
|
|
11
|
-
<sub>Fictional demo footage.
|
|
11
|
+
<sub>Fictional demo footage. ffmpeg-skill measured two silences and a scene cut; Remotion played only the speech ranges with punch-in zooms and re-timed captions; render.py verified 201 of 201 frames.</sub>
|
|
12
|
+
|
|
13
|
+
<table>
|
|
14
|
+
<tr>
|
|
15
|
+
<td width="62%"><img src="assets/demo-karaoke.gif" alt="Karaoke: each word lights up at the time a speech engine measured"><br><sub><b>Karaoke</b> — words light up at their measured times (250 / 250 frames verified)</sub></td>
|
|
16
|
+
<td width="38%"><img src="assets/demo-portrait-ja.gif" alt="9:16 jump cut with Japanese captions on a blurred fill"><br><sub><b>9:16 + Japanese</b> — silences cut, CJK font staged automatically, phrase-based line breaks</sub></td>
|
|
17
|
+
</tr>
|
|
18
|
+
</table>
|
|
12
19
|
|
|
13
20
|
## Why this and not just Remotion's own skills?
|
|
14
21
|
|
package/package.json
CHANGED
|
@@ -1,14 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remotion-ffmpeg-skill",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Agent Skill: ffmpeg-skill measures the footage, Remotion draws the motion graphics from those measurements, ffmpeg-skill checks and delivers the result. Timeline-driven captions, silence jump cuts and audio-peak motion with probe-first / verify-last rendering. Local, no API keys.",
|
|
5
|
-
"keywords": [
|
|
5
|
+
"keywords": [
|
|
6
|
+
"remotion",
|
|
7
|
+
"ffmpeg",
|
|
8
|
+
"ffmpeg-skill",
|
|
9
|
+
"video",
|
|
10
|
+
"motion-graphics",
|
|
11
|
+
"captions",
|
|
12
|
+
"agent-skill",
|
|
13
|
+
"agent-skills",
|
|
14
|
+
"claude-code",
|
|
15
|
+
"claude-skill",
|
|
16
|
+
"cursor",
|
|
17
|
+
"codex",
|
|
18
|
+
"ai-agents"
|
|
19
|
+
],
|
|
6
20
|
"license": "MIT",
|
|
7
21
|
"author": "kajisho5",
|
|
8
|
-
"repository": {
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/kajisho5/remotion-ffmpeg-skill.git"
|
|
25
|
+
},
|
|
9
26
|
"homepage": "https://github.com/kajisho5/remotion-ffmpeg-skill#readme",
|
|
10
|
-
"bugs": {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
27
|
+
"bugs": {
|
|
28
|
+
"url": "https://github.com/kajisho5/remotion-ffmpeg-skill/issues"
|
|
29
|
+
},
|
|
30
|
+
"bin": {
|
|
31
|
+
"remotion-ffmpeg-skill": "bin/remotion-ffmpeg-skill.js"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"bin",
|
|
35
|
+
"SKILL.md",
|
|
36
|
+
"scripts",
|
|
37
|
+
"templates",
|
|
38
|
+
"references",
|
|
39
|
+
"mcp",
|
|
40
|
+
"LICENSE",
|
|
41
|
+
"README.md"
|
|
42
|
+
],
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=18"
|
|
45
|
+
}
|
|
14
46
|
}
|
package/references/scripts.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- Generated by scripts/_docs.py from scripts/_contract.py. Do not edit by hand. -->
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Contract 1.0 · timeline schema `remotion-ffmpeg-skill/timeline@1`.
|
|
6
6
|
Every script also takes `--json`, `--dry-run`, `--overwrite` and `--timeout SECONDS`.
|
|
7
7
|
Exit codes: input = 2, missing_tool = 3, timeout = 4, failed = 1.
|
|
8
8
|
|
|
@@ -35,6 +35,10 @@ Measure a source with ffmpeg-skill and write timeline.json (+ captions from a fi
|
|
|
35
35
|
| `--margin` | number | | seconds of silence kept around speech (default 0.15) |
|
|
36
36
|
| `--scene-threshold` | number | | scenes.py --threshold (default 8) |
|
|
37
37
|
|
|
38
|
+
--json result (besides `status`, `dry_run`, `output`): `commands` (list[str]), `verified` (bool), `summary` (object: duration, fps, size, scenes, silences, speech_seconds, peaks, captions, beats, tempo_bpm, highlights, clips, words), `warnings` (list[str])
|
|
39
|
+
|
|
40
|
+
--dry-run --json result (besides `status`, `dry_run`, `output`): `commands` (list[str])
|
|
41
|
+
|
|
38
42
|
## init.py
|
|
39
43
|
|
|
40
44
|
Create a Remotion project with the built-in compositions (optionally npm install).
|
|
@@ -50,6 +54,10 @@ Create a Remotion project with the built-in compositions (optionally npm install
|
|
|
50
54
|
| `directory` | string | | new project folder (must not exist, or be empty) |
|
|
51
55
|
| `--install` | boolean | | run npm install after copying |
|
|
52
56
|
|
|
57
|
+
--json result (besides `status`, `dry_run`, `output`): `commands` (list[str]), `installed` (bool), `entry` (str), `compositions` (list[str])
|
|
58
|
+
|
|
59
|
+
--dry-run --json result (besides `status`, `dry_run`, `output`): `commands` (list[str])
|
|
60
|
+
|
|
53
61
|
## still.py
|
|
54
62
|
|
|
55
63
|
Render single frames as PNG to check the look before a full render.
|
|
@@ -75,6 +83,10 @@ Render single frames as PNG to check the look before a full render.
|
|
|
75
83
|
| `--font-file` | string | | caption font file (.ttf/.otf/.ttc/.woff2), staged into the project |
|
|
76
84
|
| `--no-auto-font` | boolean | | don't stage the CJK font ffmpeg-skill finds for Japanese/Chinese/Korean captions |
|
|
77
85
|
|
|
86
|
+
--json result (besides `status`, `dry_run`, `output`): `outputs` (list[str] (PNG paths)), `frames` (list[int]), `commands` (list[str]), `verified` (bool), `frame` (object|null {width, height, fit}), `font` (str|null)
|
|
87
|
+
|
|
88
|
+
--dry-run --json result (besides `status`, `dry_run`, `output`): `outputs` (list[str]), `frames` (list[int]), `commands` (list[str])
|
|
89
|
+
|
|
78
90
|
## render.py
|
|
79
91
|
|
|
80
92
|
Render a composition from a timeline, verify it (frames, fps, size, audio) and write a contact sheet.
|
|
@@ -106,6 +118,10 @@ Render a composition from a timeline, verify it (frames, fps, size, audio) and w
|
|
|
106
118
|
| `--font-file` | string | | caption font file (.ttf/.otf/.ttc/.woff2), staged into the project |
|
|
107
119
|
| `--no-auto-font` | boolean | | don't stage the CJK font ffmpeg-skill finds for Japanese/Chinese/Korean captions |
|
|
108
120
|
|
|
121
|
+
--json result (besides `status`, `dry_run`, `output`): `verified` (bool), `verification` (list[{check, status, value, expected}]), `commands` (list[str]), `look` (str|null (contact sheet PNG)), `look_error` (str|null), `summary` (str), `frame` (object|null), `font` (str|null), `mode` (full|overlay), `graphics` (str|null (kept ProRes 4444 layer)), `kind` (null|failed), `error` (null|str (which verification rows failed))
|
|
122
|
+
|
|
123
|
+
--dry-run --json result (besides `status`, `dry_run`, `output`): `commands` (list[str]), `props` (str), `expected_frames` (int|null), `frame` (object|null), `font` (str|null)
|
|
124
|
+
|
|
109
125
|
## deliver.py
|
|
110
126
|
|
|
111
127
|
Run an ffmpeg-skill delivery template (YouTube, Reels, ...) and its compliance check.
|
|
@@ -123,6 +139,10 @@ Run an ffmpeg-skill delivery template (YouTube, Reels, ...) and its compliance c
|
|
|
123
139
|
| `--output` | string | | deliverable path (default: <name>_<platform>.mp4) |
|
|
124
140
|
| `--check-only` | boolean | | run check.py only, write nothing |
|
|
125
141
|
|
|
142
|
+
--json result (besides `status`, `dry_run`, `output`): `checked` (str), `platform` (str|null), `verified` (bool), `checks` (list[{check, status, value, expected, ...}] (ffmpeg-skill check.py rows)), `failed` (list[str]), `warnings` (list[str]), `commands` (list[str]), `kind` (null|failed), `error` (null|str)
|
|
143
|
+
|
|
144
|
+
--dry-run --json result (besides `status`, `dry_run`, `output`): `commands` (list[str])
|
|
145
|
+
|
|
126
146
|
## pipeline.py
|
|
127
147
|
|
|
128
148
|
analyze -> render -> deliver in one call, stopping at the first failed step.
|
|
@@ -149,6 +169,10 @@ analyze -> render -> deliver in one call, stopping at the first failed step.
|
|
|
149
169
|
| `--fit` | string: blur / contain / cover | | blur (default when the shape changes), contain or cover |
|
|
150
170
|
| `--font-file` | string | | caption font file |
|
|
151
171
|
|
|
172
|
+
--json result (besides `status`, `dry_run`, `output`): `timeline` (str), `render` (str), `deliverable` (str|null), `look` (str|null), `verified` (bool), `warnings` (list[str]), `steps` (list[{step, status, output, command}])
|
|
173
|
+
|
|
174
|
+
--dry-run --json result (besides `status`, `dry_run`, `output`): `steps` (list[{step, status, output, command}])
|
|
175
|
+
|
|
152
176
|
## doctor.py
|
|
153
177
|
|
|
154
178
|
What this machine can do: Python, Node/npm, ffmpeg-skill, ffmpeg, a project's Remotion install.
|
|
@@ -162,3 +186,9 @@ What this machine can do: Python, Node/npm, ffmpeg-skill, ffmpeg, a project's Re
|
|
|
162
186
|
| Argument | Type | Default | Meaning |
|
|
163
187
|
|---|---|---|---|
|
|
164
188
|
| `--project` | string | | Remotion project folder to inspect |
|
|
189
|
+
|
|
190
|
+
--json result (besides `status`, `dry_run`, `output`): `ok` (bool), `version` (str), `checks` (list[{check, ok, value, fix}]), `ffmpeg_skill_doctor` (object|null)
|
|
191
|
+
|
|
192
|
+
## Failures
|
|
193
|
+
|
|
194
|
+
Every failure is one JSON object: `status` (failed), `error` (str), `kind` (input|missing_tool|timeout|failed), `dry_run` (bool).
|
package/scripts/_contract.py
CHANGED
|
@@ -91,6 +91,65 @@ TOOL_META: Dict[str, Dict[str, Any]] = {
|
|
|
91
91
|
},
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
# What each tool's --json result carries (beyond the shared status / dry_run / output), as
|
|
95
|
+
# key -> short type. "result" is a completed run, "dry_run" a --dry-run plan. tests check real
|
|
96
|
+
# outputs against these, so the contract cannot promise a key a script stopped writing.
|
|
97
|
+
OUTPUTS: Dict[str, Dict[str, Dict[str, str]]] = {
|
|
98
|
+
"analyze": {
|
|
99
|
+
"result": {"commands": "list[str]", "verified": "bool", "summary": "object: duration, fps, size, scenes, "
|
|
100
|
+
"silences, speech_seconds, peaks, captions, beats, tempo_bpm, highlights, clips, words",
|
|
101
|
+
"warnings": "list[str]"},
|
|
102
|
+
"dry_run": {"commands": "list[str]"},
|
|
103
|
+
},
|
|
104
|
+
"init": {
|
|
105
|
+
"result": {"commands": "list[str]", "installed": "bool", "entry": "str", "compositions": "list[str]"},
|
|
106
|
+
"dry_run": {"commands": "list[str]"},
|
|
107
|
+
},
|
|
108
|
+
"still": {
|
|
109
|
+
"result": {"outputs": "list[str] (PNG paths)", "frames": "list[int]", "commands": "list[str]",
|
|
110
|
+
"verified": "bool", "frame": "object|null {width, height, fit}", "font": "str|null"},
|
|
111
|
+
"dry_run": {"outputs": "list[str]", "frames": "list[int]", "commands": "list[str]"},
|
|
112
|
+
},
|
|
113
|
+
"render": {
|
|
114
|
+
"result": {"verified": "bool", "verification": "list[{check, status, value, expected}]",
|
|
115
|
+
"commands": "list[str]", "look": "str|null (contact sheet PNG)", "look_error": "str|null",
|
|
116
|
+
"summary": "str", "frame": "object|null", "font": "str|null", "mode": "full|overlay",
|
|
117
|
+
"graphics": "str|null (kept ProRes 4444 layer)", "kind": "null|failed",
|
|
118
|
+
"error": "null|str (which verification rows failed)"},
|
|
119
|
+
"dry_run": {"commands": "list[str]", "props": "str", "expected_frames": "int|null", "frame": "object|null",
|
|
120
|
+
"font": "str|null"},
|
|
121
|
+
},
|
|
122
|
+
"deliver": {
|
|
123
|
+
"result": {"checked": "str", "platform": "str|null", "verified": "bool",
|
|
124
|
+
"checks": "list[{check, status, value, expected, ...}] (ffmpeg-skill check.py rows)",
|
|
125
|
+
"failed": "list[str]", "warnings": "list[str]", "commands": "list[str]",
|
|
126
|
+
"kind": "null|failed", "error": "null|str"},
|
|
127
|
+
"dry_run": {"commands": "list[str]"},
|
|
128
|
+
},
|
|
129
|
+
"pipeline": {
|
|
130
|
+
"result": {"timeline": "str", "render": "str", "deliverable": "str|null", "look": "str|null",
|
|
131
|
+
"verified": "bool", "warnings": "list[str]", "steps": "list[{step, status, output, command}]"},
|
|
132
|
+
"dry_run": {"steps": "list[{step, status, output, command}]"},
|
|
133
|
+
},
|
|
134
|
+
"doctor": {
|
|
135
|
+
"result": {"ok": "bool", "version": "str", "checks": "list[{check, ok, value, fix}]",
|
|
136
|
+
"ffmpeg_skill_doctor": "object|null"},
|
|
137
|
+
"dry_run": {},
|
|
138
|
+
},
|
|
139
|
+
}
|
|
140
|
+
SHARED_OUTPUT = {"status": "completed|failed", "dry_run": "bool", "output": "str|null (main artifact)"}
|
|
141
|
+
FAILURE_OUTPUT = {"status": "failed", "error": "str", "kind": "input|missing_tool|timeout|failed", "dry_run": "bool"}
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def missing_output_keys(tool: str, doc: Dict[str, Any]) -> List[str]:
|
|
145
|
+
"""Keys the contract promises for this result that `doc` lacks (empty = conforms)."""
|
|
146
|
+
if doc.get("status") == "failed":
|
|
147
|
+
return [k for k in FAILURE_OUTPUT if k not in doc]
|
|
148
|
+
which = "dry_run" if doc.get("dry_run") else "result"
|
|
149
|
+
want = list(OUTPUTS[tool][which]) + [k for k in SHARED_OUTPUT if not (tool == "doctor" and k == "output")]
|
|
150
|
+
return [k for k in want if k not in doc]
|
|
151
|
+
|
|
152
|
+
|
|
94
153
|
# Flags every tool takes; the MCP server adds --json itself.
|
|
95
154
|
SHARED = {"json", "dry_run", "overwrite", "timeout", "help"}
|
|
96
155
|
|
|
@@ -170,6 +229,7 @@ def tool_spec(name: str) -> Dict[str, Any]:
|
|
|
170
229
|
"dry_run": meta["dry_run"],
|
|
171
230
|
"inputSchema": input_schema(parser),
|
|
172
231
|
"flags": flag_for(parser),
|
|
232
|
+
"output": OUTPUTS[name],
|
|
173
233
|
}
|
|
174
234
|
|
|
175
235
|
|
|
@@ -182,6 +242,8 @@ def build() -> Dict[str, Any]:
|
|
|
182
242
|
"depends_on": {"ffmpeg-skill": "https://github.com/kajisho5/ffmpeg-skill", "node": ">=18",
|
|
183
243
|
"python": ">=3.10"},
|
|
184
244
|
"roles": ROLES,
|
|
245
|
+
"output_shared": SHARED_OUTPUT,
|
|
246
|
+
"output_failure": FAILURE_OUTPUT,
|
|
185
247
|
"conventions": {
|
|
186
248
|
"output": "one JSON object on stdout with --json; human lines on stderr",
|
|
187
249
|
"errors": {"input": 2, "missing_tool": 3, "timeout": 4, "failed": 1},
|
package/scripts/_docs.py
CHANGED
|
@@ -23,7 +23,8 @@ def render() -> str:
|
|
|
23
23
|
"",
|
|
24
24
|
"<!-- Generated by scripts/_docs.py from scripts/_contract.py. Do not edit by hand. -->",
|
|
25
25
|
"",
|
|
26
|
-
|
|
26
|
+
# No package version here: a version bump must not make the generated reference stale.
|
|
27
|
+
f"Contract {c['contract_version']} · timeline schema `{c['timeline_schema']}`.",
|
|
27
28
|
"Every script also takes `--json`, `--dry-run`, `--overwrite` and `--timeout SECONDS`.",
|
|
28
29
|
"Exit codes: " + ", ".join(f"{k} = {v}" for k, v in c["conventions"]["errors"].items()) + ".",
|
|
29
30
|
"",
|
|
@@ -52,6 +53,14 @@ def render() -> str:
|
|
|
52
53
|
desc = (p.get("description") or "").replace("|", "\\|").replace("\n", " ")
|
|
53
54
|
lines.append(f"| `{arg}` | {typ} | {default} | {desc} |")
|
|
54
55
|
lines.append("")
|
|
56
|
+
for which, title in (("result", "--json result"), ("dry_run", "--dry-run --json result")):
|
|
57
|
+
keys = t["output"][which]
|
|
58
|
+
if keys:
|
|
59
|
+
lines.append(f"{title} (besides `status`, `dry_run`, `output`): " +
|
|
60
|
+
", ".join(f"`{k}` ({v})" for k, v in keys.items()))
|
|
61
|
+
lines.append("")
|
|
62
|
+
lines += ["## Failures", "",
|
|
63
|
+
"Every failure is one JSON object: " + ", ".join(f"`{k}` ({v})" for k, v in c["output_failure"].items()) + ".", ""]
|
|
55
64
|
return "\n".join(lines)
|
|
56
65
|
|
|
57
66
|
|
package/scripts/deliver.py
CHANGED
|
@@ -69,7 +69,10 @@ def main() -> None:
|
|
|
69
69
|
lines = [f"{c['status']:4} {c['check']}: {c.get('value')} (expected {c.get('expected')})" for c in checks]
|
|
70
70
|
emit({"status": "completed" if ok else "failed", "output": str(target) if target != src else None,
|
|
71
71
|
"checked": str(target), "platform": a.platform, "verified": ok, "checks": checks,
|
|
72
|
-
"failed": [c["check"] for c in failed], "warnings": [c["check"] for c in warns], "commands": commands
|
|
72
|
+
"failed": [c["check"] for c in failed], "warnings": [c["check"] for c in warns], "commands": commands,
|
|
73
|
+
"kind": None if ok else "failed",
|
|
74
|
+
"error": None if ok else ("compliance check failed: " + ", ".join(c["check"] for c in failed)
|
|
75
|
+
if failed else (ck.get("error") or "check.py returned no rows"))},
|
|
73
76
|
"\n".join([f"{target.name}: {'PASS' if ok else 'FAIL'} ({len(failed)} fail, {len(warns)} warn)"] + lines))
|
|
74
77
|
if not ok:
|
|
75
78
|
sys.exit(1)
|
package/scripts/render.py
CHANGED
|
@@ -214,7 +214,8 @@ def main() -> None:
|
|
|
214
214
|
"verification": rows, "commands": commands, "look": look, "summary": summary,
|
|
215
215
|
"frame": frame, "font": font_note, "mode": "overlay" if a.overlay else "full", "look_error": look_error,
|
|
216
216
|
"graphics": str(graphics) if a.overlay and a.keep_graphics else None,
|
|
217
|
-
"kind": None if ok else "failed"
|
|
217
|
+
"kind": None if ok else "failed",
|
|
218
|
+
"error": None if ok else "verification failed: " + ", ".join(r["check"] for r in rows if r["status"] == "FAIL")}
|
|
218
219
|
table = "\n".join(f" {r['check']:<9} {r['status']:<4} {r['value']} (expected {r['expected']})" for r in rows)
|
|
219
220
|
emit(result, summary + "\n" + table + (f"\nLook: {look}" if look else "") +
|
|
220
221
|
("" if ok else "\nverification FAILED: " + ", ".join(r["check"] for r in rows if r["status"] == "FAIL")))
|