remotion-ffmpeg-skill 0.13.0 → 0.14.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/SKILL.md +4 -0
- package/package.json +1 -1
- package/references/scripts.md +37 -0
- package/scripts/_contract.py +56 -0
- package/scripts/_docs.py +7 -0
package/SKILL.md
CHANGED
|
@@ -42,8 +42,11 @@ Changing the shape alone is not a reason: ffmpeg-skill's Reels / TikTok / Shorts
|
|
|
42
42
|
|
|
43
43
|
## Request → script / composition
|
|
44
44
|
|
|
45
|
+
Moving text has three owners: word-timed caption effects are this skill's, animated captions from subtitle cues alone are subtitle-skill's, and `Titled`'s titles stay inside these compositions (burned-in titles: motion-graphics-skill; title and stinger material files: hyperframes-skill). See [docs/design-decisions.md](docs/design-decisions.md), "Title and caption boundaries".
|
|
46
|
+
|
|
45
47
|
| Request | Run |
|
|
46
48
|
|---|---|
|
|
49
|
+
| animated captions from subtitle cues alone (fade / pop / slide, karaoke without word timings) | not this skill: subtitle-skill |
|
|
47
50
|
| "animated captions / subtitles on this video" | `analyze.py --captions` → `render.py --comp Captioned` |
|
|
48
51
|
| "cut the silences / jump cut / tighten this talk" (with motion) | `analyze.py` → `render.py --comp Jumpcut` (captions re-timed if given) |
|
|
49
52
|
| "graphics that react to the audio / hit on the beat / on cuts" | `analyze.py [--beats]` → `render.py --comp PeakPulse` (pulses on beats when the grid was measured) |
|
|
@@ -83,3 +86,4 @@ Changing the shape alone is not a reason: ffmpeg-skill's Reels / TikTok / Shorts
|
|
|
83
86
|
- Speed (measured on a 2-core Linux machine, all cores — render.py's default): about 2.6× the clip length for 1080p30 (30 s took 80 s). Preview with `still.py` and `--fast` before a full render of long footage; tell the user the expected time before starting a long render. `--sparse` cuts that to the share that shows graphics: 60 s with 7 s of captions went from 152 s to 46 s; 40 s with two scene titles and one lower third from 104 s to 39 s. `--concurrency` above the core count is refused by Remotion.
|
|
84
87
|
- Remotion packages in a project must all be the same version; the template pins them. Don't mix in a different `remotion` version.
|
|
85
88
|
- A render that fails verification is a failure: report the failed rows from `--json`, don't ship it.
|
|
89
|
+
- Re-renders: on the same machine and toolchain (Remotion, Chromium, FFmpeg, fonts) with the same inputs, `render.py` and `still.py` give byte-identical files (`idempotency_hint: bit_exact` in the contract), whatever `--concurrency` is; compare them by sha256. Across machines, OSes or toolchain updates the bytes can change: compare by content (per-frame PSNR). Conditions and what is unverified: `docs/adr/0001-render-determinism.md`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remotion-ffmpeg-skill",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.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
5
|
"keywords": [
|
|
6
6
|
"remotion",
|
package/references/scripts.md
CHANGED
|
@@ -15,6 +15,7 @@ Measure a source with ffmpeg-skill and write timeline.json (+ captions from a fi
|
|
|
15
15
|
- Verifies: every number comes from ffmpeg-skill probe/scenes/silence; a VFR or HDR source is refused, or with --conform conformed and re-measured (CFR at the asked rate, SDR BT.709) before use; warnings for rotation and odd frame rates
|
|
16
16
|
- ffmpeg-skill: probe, scenes, silence, join (several inputs), sync (--pip), fit (--conform: VFR -> CFR), color (--conform: HDR -> SDR)
|
|
17
17
|
- `--dry-run`: plans without writing
|
|
18
|
+
- Repeatability: `content_equivalent` (deterministic: yes)
|
|
18
19
|
|
|
19
20
|
| Argument | Type | Default | Meaning |
|
|
20
21
|
|---|---|---|---|
|
|
@@ -57,6 +58,7 @@ Create a Remotion project with the built-in compositions (optionally npm install
|
|
|
57
58
|
- Verifies: refuses a non-empty folder; npm install exit status
|
|
58
59
|
- ffmpeg-skill: —
|
|
59
60
|
- `--dry-run`: plans without writing
|
|
61
|
+
- Repeatability: `content_equivalent` (deterministic: yes)
|
|
60
62
|
|
|
61
63
|
| Argument | Type | Default | Meaning |
|
|
62
64
|
|---|---|---|---|
|
|
@@ -76,6 +78,7 @@ Render single frames as PNG to check the look before a full render.
|
|
|
76
78
|
- Verifies: frames must lie inside the composition; view the PNGs
|
|
77
79
|
- ffmpeg-skill: _contract doctor (CJK font lookup)
|
|
78
80
|
- `--dry-run`: plans without writing
|
|
81
|
+
- Repeatability: `bit_exact` (deterministic: yes)
|
|
79
82
|
|
|
80
83
|
| Argument | Type | Default | Meaning |
|
|
81
84
|
|---|---|---|---|
|
|
@@ -106,6 +109,7 @@ Render a composition from a timeline, verify it (frames, fps, size, audio) and w
|
|
|
106
109
|
- Verifies: exact frame count / fps / size / audio against the timeline; non-zero exit on mismatch
|
|
107
110
|
- ffmpeg-skill: probe, look, overlay (--overlay; --place with --sparse), _contract doctor (CJK font lookup)
|
|
108
111
|
- `--dry-run`: plans without writing
|
|
112
|
+
- Repeatability: `bit_exact` (deterministic: yes)
|
|
109
113
|
|
|
110
114
|
| Argument | Type | Default | Meaning |
|
|
111
115
|
|---|---|---|---|
|
|
@@ -144,6 +148,7 @@ Run an ffmpeg-skill delivery template (YouTube, Reels, ...) and its compliance c
|
|
|
144
148
|
- Verifies: ffmpeg-skill check.py table; non-zero exit on any FAIL row
|
|
145
149
|
- ffmpeg-skill: render --template, metadata (--chapters), check
|
|
146
150
|
- `--dry-run`: plans without writing
|
|
151
|
+
- Repeatability: `bit_exact` (deterministic: yes)
|
|
147
152
|
|
|
148
153
|
| Argument | Type | Default | Meaning |
|
|
149
154
|
|---|---|---|---|
|
|
@@ -168,6 +173,7 @@ analyze -> render -> deliver in one call, stopping at the first failed step.
|
|
|
168
173
|
- Verifies: each step's own verification
|
|
169
174
|
- ffmpeg-skill: probe, scenes, silence, fit (--conform), color (--conform), look, render --template, check
|
|
170
175
|
- `--dry-run`: plans without writing
|
|
176
|
+
- Repeatability: `content_equivalent` (deterministic: yes)
|
|
171
177
|
|
|
172
178
|
| Argument | Type | Default | Meaning |
|
|
173
179
|
|---|---|---|---|
|
|
@@ -201,6 +207,7 @@ What this machine can do: Python, Node/npm, ffmpeg-skill, ffmpeg, a project's Re
|
|
|
201
207
|
- Verifies: reports only
|
|
202
208
|
- ffmpeg-skill: _contract doctor
|
|
203
209
|
- `--dry-run`: not applicable (reports only)
|
|
210
|
+
- Repeatability: `environment_dependent` (deterministic: no)
|
|
204
211
|
|
|
205
212
|
| Argument | Type | Default | Meaning |
|
|
206
213
|
|---|---|---|---|
|
|
@@ -208,6 +215,36 @@ What this machine can do: Python, Node/npm, ffmpeg-skill, ffmpeg, a project's Re
|
|
|
208
215
|
|
|
209
216
|
--json result (besides `status`, `dry_run`, `output`): `ok` (bool), `version` (str), `checks` (list[{check, ok, value, fix}]), `ffmpeg_skill_doctor` (object|null)
|
|
210
217
|
|
|
218
|
+
## Repeatability
|
|
219
|
+
|
|
220
|
+
`idempotency_hint` per tool: `bit_exact`, `content_equivalent`, `environment_dependent`. Scope: same machine, same inputs (same paths, same options), same Remotion version, same Chromium (chrome-headless-shell) build and GL backend, same FFmpeg and ffmpeg-skill, same fonts.
|
|
221
|
+
|
|
222
|
+
Holds:
|
|
223
|
+
|
|
224
|
+
- every built-in composition renders twice to byte-identical files: per-frame md5 of the video, md5 of the audio and the file's sha256 match (render.py H.264, --fast, --codec prores, --overlay), in two separate runs
|
|
225
|
+
- --concurrency does not change the output: 1 tab and all cores give the same bytes
|
|
226
|
+
- still.py writes byte-identical PNGs
|
|
227
|
+
- analyze.py run twice on the same file writes a byte-identical timeline.json; on a copy at another path only source.path differs
|
|
228
|
+
- pipeline.py writes byte-identical render and deliverable files; it is content_equivalent, not bit_exact, because its timeline.json records the input's absolute path
|
|
229
|
+
- init.py (without --install) writes an identical project folder
|
|
230
|
+
|
|
231
|
+
Does not hold:
|
|
232
|
+
|
|
233
|
+
- another Chromium build: chrome-headless-shell 153 and 156 differed on every frame (PSNR 43 dB average, 38 dB lowest), so after a Remotion or browser update compare by content, not by hash
|
|
234
|
+
- another GL backend: Config.setChromiumOpenGlRenderer('swangle') in remotion.config.ts changed every frame (42 dB average); render.py sets none, and on a machine without a GPU the default, angle, egl, swiftshader and vulkan gave the same bytes
|
|
235
|
+
- another font: --font-file with a different font changed the captions (29 dB average); the CJK auto font is whatever ffmpeg-skill finds installed
|
|
236
|
+
- another input path: timeline.json records absolute paths, so its bytes differ (its numbers do not)
|
|
237
|
+
|
|
238
|
+
Unverified:
|
|
239
|
+
|
|
240
|
+
- across operating systems: CI checks each of Linux, macOS and Windows against itself only
|
|
241
|
+
- on a machine with a GPU, where the GL backends may no longer agree
|
|
242
|
+
- another FFmpeg or x264 build (the encoder Remotion bundles is pinned with Remotion)
|
|
243
|
+
- across two machines with the same OS and toolchain
|
|
244
|
+
- analyze.py --conform and several-input joins (their re-encoded copies were not compared); init.py --install
|
|
245
|
+
|
|
246
|
+
Not reproducible: none found.
|
|
247
|
+
|
|
211
248
|
## Failures
|
|
212
249
|
|
|
213
250
|
Every failure is one JSON object: `status` (failed), `error` (str), `kind` (input|missing_tool|timeout|failed), `dry_run` (bool).
|
package/scripts/_contract.py
CHANGED
|
@@ -43,6 +43,8 @@ TOOL_META: Dict[str, Dict[str, Any]] = {
|
|
|
43
43
|
"ffmpeg_skill": ["probe", "scenes", "silence", "join (several inputs)", "sync (--pip)",
|
|
44
44
|
"fit (--conform: VFR -> CFR)", "color (--conform: HDR -> SDR)"],
|
|
45
45
|
"dry_run": True,
|
|
46
|
+
"deterministic": True,
|
|
47
|
+
"idempotency_hint": "content_equivalent",
|
|
46
48
|
},
|
|
47
49
|
"init": {
|
|
48
50
|
"role": "setup",
|
|
@@ -51,6 +53,8 @@ TOOL_META: Dict[str, Dict[str, Any]] = {
|
|
|
51
53
|
"verification": "refuses a non-empty folder; npm install exit status",
|
|
52
54
|
"ffmpeg_skill": [],
|
|
53
55
|
"dry_run": True,
|
|
56
|
+
"deterministic": True,
|
|
57
|
+
"idempotency_hint": "content_equivalent",
|
|
54
58
|
},
|
|
55
59
|
"still": {
|
|
56
60
|
"role": "execution",
|
|
@@ -59,6 +63,8 @@ TOOL_META: Dict[str, Dict[str, Any]] = {
|
|
|
59
63
|
"verification": "frames must lie inside the composition; view the PNGs",
|
|
60
64
|
"ffmpeg_skill": ["_contract doctor (CJK font lookup)"],
|
|
61
65
|
"dry_run": True,
|
|
66
|
+
"deterministic": True,
|
|
67
|
+
"idempotency_hint": "bit_exact",
|
|
62
68
|
},
|
|
63
69
|
"render": {
|
|
64
70
|
"role": "execution",
|
|
@@ -67,6 +73,8 @@ TOOL_META: Dict[str, Dict[str, Any]] = {
|
|
|
67
73
|
"verification": "exact frame count / fps / size / audio against the timeline; non-zero exit on mismatch",
|
|
68
74
|
"ffmpeg_skill": ["probe", "look", "overlay (--overlay; --place with --sparse)", "_contract doctor (CJK font lookup)"],
|
|
69
75
|
"dry_run": True,
|
|
76
|
+
"deterministic": True,
|
|
77
|
+
"idempotency_hint": "bit_exact",
|
|
70
78
|
},
|
|
71
79
|
"deliver": {
|
|
72
80
|
"role": "execution",
|
|
@@ -75,6 +83,8 @@ TOOL_META: Dict[str, Dict[str, Any]] = {
|
|
|
75
83
|
"verification": "ffmpeg-skill check.py table; non-zero exit on any FAIL row",
|
|
76
84
|
"ffmpeg_skill": ["render --template", "metadata (--chapters)", "check"],
|
|
77
85
|
"dry_run": True,
|
|
86
|
+
"deterministic": True,
|
|
87
|
+
"idempotency_hint": "bit_exact",
|
|
78
88
|
},
|
|
79
89
|
"pipeline": {
|
|
80
90
|
"role": "orchestration",
|
|
@@ -84,6 +94,8 @@ TOOL_META: Dict[str, Dict[str, Any]] = {
|
|
|
84
94
|
"ffmpeg_skill": ["probe", "scenes", "silence", "fit (--conform)", "color (--conform)", "look",
|
|
85
95
|
"render --template", "check"],
|
|
86
96
|
"dry_run": True,
|
|
97
|
+
"deterministic": True,
|
|
98
|
+
"idempotency_hint": "content_equivalent",
|
|
87
99
|
},
|
|
88
100
|
"doctor": {
|
|
89
101
|
"role": "verification",
|
|
@@ -92,6 +104,8 @@ TOOL_META: Dict[str, Dict[str, Any]] = {
|
|
|
92
104
|
"verification": "reports only",
|
|
93
105
|
"ffmpeg_skill": ["_contract doctor"],
|
|
94
106
|
"dry_run": False,
|
|
107
|
+
"deterministic": False,
|
|
108
|
+
"idempotency_hint": "environment_dependent",
|
|
95
109
|
},
|
|
96
110
|
}
|
|
97
111
|
|
|
@@ -145,6 +159,45 @@ OUTPUTS: Dict[str, Dict[str, Dict[str, str]]] = {
|
|
|
145
159
|
"dry_run": {},
|
|
146
160
|
},
|
|
147
161
|
}
|
|
162
|
+
# What `deterministic` / `idempotency_hint` promise, and under which conditions (docs/adr/0001-render-determinism.md).
|
|
163
|
+
# bit_exact: the same inputs give the same bytes. content_equivalent: the same content, but bytes that record where
|
|
164
|
+
# it ran (absolute paths in timeline.json, the npm resolution of --install) may differ. environment_dependent: it
|
|
165
|
+
# reports the machine. Measured, not assumed: tests/test_integration.Determinism renders two compositions twice on
|
|
166
|
+
# every CI machine and checks the stated level.
|
|
167
|
+
IDEMPOTENCY_HINTS = ("bit_exact", "content_equivalent", "environment_dependent")
|
|
168
|
+
DETERMINISM = {
|
|
169
|
+
"scope": "same machine, same inputs (same paths, same options), same Remotion version, same Chromium "
|
|
170
|
+
"(chrome-headless-shell) build and GL backend, same FFmpeg and ffmpeg-skill, same fonts",
|
|
171
|
+
"holds": [
|
|
172
|
+
"every built-in composition renders twice to byte-identical files: per-frame md5 of the video, md5 of the "
|
|
173
|
+
"audio and the file's sha256 match (render.py H.264, --fast, --codec prores, --overlay), in two separate runs",
|
|
174
|
+
"--concurrency does not change the output: 1 tab and all cores give the same bytes",
|
|
175
|
+
"still.py writes byte-identical PNGs",
|
|
176
|
+
"analyze.py run twice on the same file writes a byte-identical timeline.json; on a copy at another path "
|
|
177
|
+
"only source.path differs",
|
|
178
|
+
"pipeline.py writes byte-identical render and deliverable files; it is content_equivalent, not bit_exact, "
|
|
179
|
+
"because its timeline.json records the input's absolute path",
|
|
180
|
+
"init.py (without --install) writes an identical project folder",
|
|
181
|
+
],
|
|
182
|
+
"does_not_hold": [
|
|
183
|
+
"another Chromium build: chrome-headless-shell 153 and 156 differed on every frame (PSNR 43 dB average, "
|
|
184
|
+
"38 dB lowest), so after a Remotion or browser update compare by content, not by hash",
|
|
185
|
+
"another GL backend: Config.setChromiumOpenGlRenderer('swangle') in remotion.config.ts changed every frame "
|
|
186
|
+
"(42 dB average); render.py sets none, and on a machine without a GPU the default, angle, egl, "
|
|
187
|
+
"swiftshader and vulkan gave the same bytes",
|
|
188
|
+
"another font: --font-file with a different font changed the captions (29 dB average); the CJK auto font "
|
|
189
|
+
"is whatever ffmpeg-skill finds installed",
|
|
190
|
+
"another input path: timeline.json records absolute paths, so its bytes differ (its numbers do not)",
|
|
191
|
+
],
|
|
192
|
+
"unverified": [
|
|
193
|
+
"across operating systems: CI checks each of Linux, macOS and Windows against itself only",
|
|
194
|
+
"on a machine with a GPU, where the GL backends may no longer agree",
|
|
195
|
+
"another FFmpeg or x264 build (the encoder Remotion bundles is pinned with Remotion)",
|
|
196
|
+
"across two machines with the same OS and toolchain",
|
|
197
|
+
"analyze.py --conform and several-input joins (their re-encoded copies were not compared); init.py --install",
|
|
198
|
+
],
|
|
199
|
+
"not_reproducible_compositions": [],
|
|
200
|
+
}
|
|
148
201
|
SHARED_OUTPUT = {"status": "completed|failed", "dry_run": "bool", "output": "str|null (main artifact)"}
|
|
149
202
|
FAILURE_OUTPUT = {"status": "failed", "error": "str", "kind": "input|missing_tool|timeout|failed", "dry_run": "bool"}
|
|
150
203
|
|
|
@@ -235,6 +288,8 @@ def tool_spec(name: str) -> Dict[str, Any]:
|
|
|
235
288
|
"verification": meta["verification"],
|
|
236
289
|
"ffmpeg_skill": meta["ffmpeg_skill"],
|
|
237
290
|
"dry_run": meta["dry_run"],
|
|
291
|
+
"deterministic": meta["deterministic"],
|
|
292
|
+
"idempotency_hint": meta["idempotency_hint"],
|
|
238
293
|
"inputSchema": input_schema(parser),
|
|
239
294
|
"flags": flag_for(parser),
|
|
240
295
|
"output": OUTPUTS[name],
|
|
@@ -273,6 +328,7 @@ def build() -> Dict[str, Any]:
|
|
|
273
328
|
"roles": ROLES,
|
|
274
329
|
"output_shared": SHARED_OUTPUT,
|
|
275
330
|
"output_failure": FAILURE_OUTPUT,
|
|
331
|
+
"determinism": {"hints": list(IDEMPOTENCY_HINTS), **DETERMINISM},
|
|
276
332
|
"conventions": {
|
|
277
333
|
"output": "one JSON object on stdout with --json; human lines on stderr",
|
|
278
334
|
"errors": {"input": 2, "missing_tool": 3, "timeout": 4, "failed": 1},
|
package/scripts/_docs.py
CHANGED
|
@@ -37,6 +37,7 @@ def render() -> str:
|
|
|
37
37
|
f"- Verifies: {t['verification']}",
|
|
38
38
|
f"- ffmpeg-skill: {', '.join(t['ffmpeg_skill']) or '—'}",
|
|
39
39
|
f"- `--dry-run`: {'plans without writing' if t['dry_run'] else 'not applicable (reports only)'}",
|
|
40
|
+
f"- Repeatability: `{t['idempotency_hint']}` (deterministic: {'yes' if t['deterministic'] else 'no'})",
|
|
40
41
|
"", "| Argument | Type | Default | Meaning |", "|---|---|---|---|"]
|
|
41
42
|
for name, p in s["properties"].items():
|
|
42
43
|
if name in ("dry_run", "overwrite", "timeout"):
|
|
@@ -59,6 +60,12 @@ def render() -> str:
|
|
|
59
60
|
lines.append(f"{title} (besides `status`, `dry_run`, `output`): " +
|
|
60
61
|
", ".join(f"`{k}` ({v})" for k, v in keys.items()))
|
|
61
62
|
lines.append("")
|
|
63
|
+
d = c["determinism"]
|
|
64
|
+
lines += ["## Repeatability", "",
|
|
65
|
+
"`idempotency_hint` per tool: " + ", ".join(f"`{h}`" for h in d["hints"]) + ". Scope: " + d["scope"] + ".",
|
|
66
|
+
"", "Holds:", ""] + [f"- {x}" for x in d["holds"]] + ["", "Does not hold:", ""] + \
|
|
67
|
+
[f"- {x}" for x in d["does_not_hold"]] + ["", "Unverified:", ""] + [f"- {x}" for x in d["unverified"]] + \
|
|
68
|
+
["", "Not reproducible: " + (", ".join(d["not_reproducible_compositions"]) or "none found") + ".", ""]
|
|
62
69
|
lines += ["## Failures", "",
|
|
63
70
|
"Every failure is one JSON object: " + ", ".join(f"`{k}` ({v})" for k, v in c["output_failure"].items()) + ".", ""]
|
|
64
71
|
return "\n".join(lines)
|