video-editing 2.0.0 → 3.1.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 +36 -31
- package/dist/{chunk-SSXAUKGV.js → chunk-2OM7WV4W.js} +755 -801
- package/dist/cli.js +332 -131
- package/dist/index.d.ts +185 -138
- package/dist/index.js +43 -29
- package/package.json +2 -2
- package/skills/video-editing/SKILL.md +108 -74
- package/skills/video-editing/references/audio-joins.md +94 -0
- package/skills/video-editing/references/cli-reference.md +122 -72
|
@@ -1,71 +1,86 @@
|
|
|
1
|
-
# `video-editing` CLI reference (
|
|
1
|
+
# `video-editing` CLI reference (v3 — pure API client)
|
|
2
2
|
|
|
3
|
-
All execution goes through this CLI
|
|
3
|
+
All execution goes through this CLI, and the CLI runs NOTHING locally: every
|
|
4
|
+
verb is HTTP against the ClipReady cloud plus small artifact pulls. Quote
|
|
5
|
+
paths (they contain spaces).
|
|
4
6
|
|
|
5
7
|
**Every verb requires ClipReady credentials.** Resolution:
|
|
6
8
|
|
|
7
|
-
- **base**: `--api-base` → env `CLIPREADY_API_BASE`
|
|
8
|
-
- **key** (sent as `Authorization: Bearer <key>`): `--api-key` → env `CLIPREADY_API_KEY`
|
|
9
|
+
- **base**: `--api-base` → env `CLIPREADY_API_BASE` → the hosted cloud (default)
|
|
10
|
+
- **key** (sent as `Authorization: Bearer <key>`): `--api-key` → env `CLIPREADY_API_KEY` → the config file written by `video-editing auth api-key`
|
|
9
11
|
- **video id**: `--video-id` → `<job>/job.json` (written by `init`) → env `VIDEO_ID`
|
|
10
12
|
|
|
11
13
|
A missing base or key is a clear error → non-zero exit, nothing runs. There is
|
|
12
|
-
**no
|
|
13
|
-
cloud.
|
|
14
|
+
**no ffmpeg/ffprobe/hyperframes requirement and no ElevenLabs
|
|
15
|
+
configuration** — media work is server-side in the ClipReady cloud.
|
|
14
16
|
|
|
15
17
|
Most verbs support `--json` for a machine-readable result. Exit codes: `0` ok,
|
|
16
18
|
`1` error (incl. missing credentials), `2` validation failed, `3` ambiguous
|
|
17
19
|
anchor (timeline group).
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
**Large uploads are chunked automatically** (no flag needed): the init source
|
|
22
|
+
streams up in 8MB parts with per-part retry — a 2GB file is never buffered in
|
|
23
|
+
memory — and on networks where direct storage PUTs keep dying, parts fall back
|
|
24
|
+
to an authenticated relay through the API. Servers without chunked-upload
|
|
25
|
+
support transparently fall back to a single retried upload.
|
|
20
26
|
|
|
21
|
-
|
|
22
|
-
Upload the source and create the cloud job. Writes the job dir (default: a
|
|
23
|
-
new dir named for the clip) with `job.json` (`video_id`, api base) and
|
|
24
|
-
`source.json`. `--master` bakes the vertical 9:16 master locally (ffmpeg)
|
|
25
|
-
before upload, for non-vertical sources destined for a vertical deliverable.
|
|
27
|
+
## Pipeline commands
|
|
26
28
|
|
|
27
|
-
- **`
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
- **`init --source <path> [--job-dir <dir>] [--title <t>] [--poll-interval 5]`**
|
|
30
|
+
ONE command covers what init+transcribe used to do. Streams the source up,
|
|
31
|
+
creates the cloud job, runs server-side **ingest** (probe + audio
|
|
32
|
+
extraction + transcription + editorial screening), polls with progress
|
|
33
|
+
lines, then pulls into the job dir: `transcripts/*.json`, `word_dump.txt`,
|
|
34
|
+
`takes_packed.md`, `flags.txt`, `coverage.json`, `probe.json`, and the
|
|
35
|
+
editorial brief `prompts/author-edl.prompt.md` (plus any other
|
|
36
|
+
`prompts/*.md`). Writes `job.json` (`video_id`, api base, stem,
|
|
37
|
+
`duration_s` from the server probe, `source_path`) and prints the video's
|
|
38
|
+
web page link (`web_url` in `--json`). The internal stem is sanitized to a
|
|
39
|
+
filename-safe charset, so apostrophe/space/unicode filenames work end to
|
|
40
|
+
end with no rename.
|
|
41
|
+
|
|
42
|
+
- **`transcribe --job-dir <dir> [--poll-interval 5]`**
|
|
43
|
+
Re-run/pull only (init already transcribed): when the transcript artifacts
|
|
44
|
+
exist server-side it just pulls them; otherwise it starts a fresh
|
|
45
|
+
server-side ingest, polls, and pulls. No media flags — there is no local
|
|
46
|
+
extraction.
|
|
33
47
|
|
|
34
48
|
## Timeline commands (`timeline.json` v2)
|
|
35
49
|
|
|
36
50
|
- **`timeline validate --job-dir <dir> [--json]`**
|
|
37
|
-
Local schema + semantic + capability validation of `<job>/timeline.json
|
|
38
|
-
Exit `2` if invalid.
|
|
51
|
+
Local schema + semantic + capability validation of `<job>/timeline.json`
|
|
52
|
+
(the one purely local verb — it touches no media). Exit `2` if invalid.
|
|
39
53
|
|
|
40
|
-
- **`timeline resolve --job-dir <dir> --phrase <text> [--
|
|
41
|
-
Resolve a transcript phrase to **exact source seconds** (word-accurate
|
|
42
|
-
The ONLY way to turn a phrase into an anchor time. Multiple
|
|
43
|
-
with per-occurrence context; pick one with `--
|
|
54
|
+
- **`timeline resolve --job-dir <dir> --phrase <text> [--occurrence <n>] [--source <name>] [--json]`**
|
|
55
|
+
Resolve a transcript phrase to **exact source seconds** (word-accurate,
|
|
56
|
+
server-side). The ONLY way to turn a phrase into an anchor time. Multiple
|
|
57
|
+
hits → exit `3` with per-occurrence context; pick one with `--occurrence`
|
|
44
58
|
(1-based). Not found → fuzzy suggestions, exit `1`.
|
|
45
59
|
|
|
46
60
|
- **`timeline compile --job-dir <dir> [--json]`**
|
|
47
61
|
**Cloud compile**: uploads `timeline.json`, the server validates, resolves
|
|
48
|
-
anchors,
|
|
49
|
-
`resolved/
|
|
50
|
-
|
|
62
|
+
anchors, sources silences from the job's cloud files, derives caption
|
|
63
|
+
cues, and returns `resolved/plan.json` + `resolved/diagnostics.json`
|
|
64
|
+
(written into the job dir). On success prints the `View & comment` watch
|
|
65
|
+
link — the compiled cut is already watchable in the web app. Iterate until
|
|
66
|
+
exit `0`. Exit `2` = validation failed (fix the reported `path`s), `3` =
|
|
51
67
|
ambiguous anchor (disambiguate with `timeline resolve`). Never hand-edit
|
|
52
68
|
anything under `resolved/`.
|
|
53
69
|
|
|
54
|
-
|
|
70
|
+
- **`timeline captions generate --job-dir <dir> [--preset grouped|opus-karaoke] [--json]`**
|
|
71
|
+
Enable captions in `timeline.json` (preset only), then server-compile to
|
|
72
|
+
derive/report cues.
|
|
73
|
+
|
|
74
|
+
## Render commands
|
|
55
75
|
|
|
56
|
-
- **`
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
(requires the `hyperframes` CLI on PATH: `npm install -g hyperframes`);
|
|
62
|
-
default output `<job>/preview.mp4` (the render IS the preview in the cloud-first flow). This is the LOCAL delivery path.
|
|
76
|
+
- **`render [--mode preview|final] --job-dir <dir> [--no-wait] [--poll-interval 10] [--out <path>] [--json]`**
|
|
77
|
+
THE render verb: submits a cloud render of the compiled plan (works right
|
|
78
|
+
after `timeline compile`), **waits by default**, and downloads the result
|
|
79
|
+
to `<job>/preview.mp4` / `<job>/final.mp4`. Mode defaults to `preview`.
|
|
80
|
+
`--no-wait` submits and prints `render_id` only.
|
|
63
81
|
|
|
64
|
-
- **`cloud render --job-dir <dir>
|
|
65
|
-
|
|
66
|
-
`render_id` and exits `0`. With `--wait`: polls until terminal; on
|
|
67
|
-
`completed`, downloads the video to `--out` (default `<job>/preview.mp4` or
|
|
68
|
-
`<job>/final.mp4`). `failed` → exit `1` with the error.
|
|
82
|
+
- **`cloud render --mode preview|final --job-dir <dir> [--wait] [--poll-interval 10] [--out <path>] [--json]`**
|
|
83
|
+
Same implementation, legacy spelling (`--wait` is opt-in here).
|
|
69
84
|
|
|
70
85
|
- **`cloud status <render_id> [--json]`**
|
|
71
86
|
One status GET: `pending|running|completed|failed` (+ `video_url` when
|
|
@@ -73,36 +88,66 @@ anchor (timeline group).
|
|
|
73
88
|
|
|
74
89
|
## Verification / QA commands
|
|
75
90
|
|
|
76
|
-
- **`verify --job-dir <dir> [--json]`**
|
|
77
|
-
**
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
Writes `verify.json`; exit `2` on
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
**
|
|
91
|
+
- **`verify --job-dir <dir> [--full] [--window <s>] [--json]`**
|
|
92
|
+
**Fully server-side verification** of the rendered preview: the server
|
|
93
|
+
re-checks every join for duplicated phrases (a retake left in → error) and
|
|
94
|
+
over-long gaps (dead air → warning/error) against its own copy of the
|
|
95
|
+
preview — nothing is uploaded. Writes `verify.json`; exit `2` on
|
|
96
|
+
needs-fixes. Caveat: the duplicated-phrase check over-triggers on
|
|
97
|
+
thematically narrow monologues — if every join is flagged (including plain
|
|
98
|
+
pause-tightening joins), adjudicate against `flags.txt` instead of blindly
|
|
99
|
+
recutting.
|
|
100
|
+
|
|
101
|
+
- **`smooth-joins [--crossfade-ms <ms>] [--curve equal-power|linear] [--max-ms <ms>] [--join <index>:<ms>]... --job-dir <dir> [--json]`**
|
|
102
|
+
**Optional.** Applies a Constant Power (equal-power) audio crossfade to
|
|
103
|
+
**every** join — Premiere's "select the timeline, apply an audio transition"
|
|
104
|
+
move. Picture stays a hard cut. Default 130 ms (4 frames); `--join 3:40`
|
|
105
|
+
overrides a single boundary, repeatable; `0` disables one. Writes
|
|
106
|
+
`audio/joined.m4a` + an `audio/joined.json` report of what each join
|
|
107
|
+
actually got after clamping. Renders consume the result only if it matches
|
|
108
|
+
the current compile — re-run after every recompile. Full detail:
|
|
109
|
+
`references/audio-joins.md`.
|
|
110
|
+
|
|
111
|
+
- **`qa frames (--start <s> --end <s> | --join <i> [--span 2] | --out-start <s> --out-end <s>) [--cols <n>] [--interval <s>] --job-dir <dir> [--json]`**
|
|
112
|
+
**Server-rendered** filmstrip PNG(s) → `<job>/qa/frames_<start>_<end>.png`.
|
|
113
|
+
Three addressing modes (exactly one): `--start/--end` in SOURCE seconds;
|
|
114
|
+
`--join <i>` renders the two sides of compiled-plan join `i` (1-based —
|
|
115
|
+
the last/first `--span` seconds of the segments meeting there) as
|
|
116
|
+
`…-a.png` (tail) + `…-b.png` (head); `--out-start/--out-end` in OUTPUT
|
|
117
|
+
seconds, mapped through `resolved/plan.json` (windows crossing a join
|
|
118
|
+
split into `-a`/`-b`/… PNGs). Read the PNGs to inspect frames.
|
|
119
|
+
|
|
120
|
+
- **`qa waveform --start <s> --end <s> --job-dir <dir> [--json]`**
|
|
121
|
+
**Server-rendered** waveform PNG + word-timing sidecar →
|
|
89
122
|
`<job>/qa/waveform_<start>_<end>.png` and
|
|
90
123
|
`<job>/qa/waveform_<start>_<end>.words.json` (word list with timings for
|
|
91
|
-
the window).
|
|
124
|
+
the window, SOURCE seconds). Use for cut-edge adjudication.
|
|
125
|
+
|
|
126
|
+
- **`qa inspect (--start <s> --end <s> | --join <i> [--span 2] | --out-start <s> --out-end <s>) [--n-frames <n>] --job-dir <dir> [--json]`**
|
|
127
|
+
**THE close-look tool** — a **server-rendered** combined composite PNG →
|
|
128
|
+
`<job>/qa/inspect_<start>_<end>.png`: filmstrip + waveform + word labels
|
|
129
|
+
in one image, with the compiled plan's cut regions shaded translucent
|
|
130
|
+
red (labeled "cut") over the waveform. Same three addressing modes as
|
|
131
|
+
`qa frames` (exactly one): `--start/--end` in SOURCE seconds; `--join <i>`
|
|
132
|
+
renders the two sides of compiled-plan join `i` as `…-a.png` (tail) +
|
|
133
|
+
`…-b.png` (head) — the sides are discontiguous in source time, hence two
|
|
134
|
+
PNGs; `--out-start/--out-end` in OUTPUT seconds mapped through
|
|
135
|
+
`resolved/plan.json`. `--n-frames` sets the filmstrip frame count
|
|
136
|
+
(default 10). Prefer this over separate frames + waveform calls when
|
|
137
|
+
adjudicating a cut.
|
|
92
138
|
|
|
93
139
|
## File sync commands
|
|
94
140
|
|
|
95
141
|
- **`files pull --job-dir <dir> [--only <name,name>] [--json]`**
|
|
96
|
-
List the cloud job's
|
|
142
|
+
List the cloud job's files and fetch each (or the `--only` subset) into
|
|
97
143
|
the job dir, **preserving relative paths** (`resolved/plan.json` →
|
|
98
144
|
`<job>/resolved/plan.json`, `prompts/author-edl.prompt.md` →
|
|
99
|
-
`<job>/prompts/author-edl.prompt.md`).
|
|
145
|
+
`<job>/prompts/author-edl.prompt.md`). Byte-exact, sha256-skipped. Use to
|
|
100
146
|
recover job state on a fresh machine.
|
|
101
147
|
|
|
102
|
-
- **`files push --job-dir <dir>
|
|
103
|
-
Upload local job
|
|
104
|
-
|
|
105
|
-
re-uploaded.
|
|
148
|
+
- **`files push --job-dir <dir> <paths…> [--json]`**
|
|
149
|
+
Upload local job files (e.g. `timeline.json`, referenced assets) to the
|
|
150
|
+
cloud job. Content-hash-cached — unchanged files are not re-uploaded.
|
|
106
151
|
|
|
107
152
|
## Review round commands (ClipReady review sessions)
|
|
108
153
|
|
|
@@ -116,31 +161,36 @@ anchor (timeline group).
|
|
|
116
161
|
Push review-round events (one mode per call; run id defaults to
|
|
117
162
|
`review/round.json`). `--stage` posts a progress event
|
|
118
163
|
(`provisioning|transcribing|edl|render_preview|qc|render_final|uploading|log`).
|
|
119
|
-
`--timeline` compiles `<job>/timeline.json` (
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
164
|
+
`--timeline` compiles `<job>/timeline.json` in the cloud (exit `2` if not
|
|
165
|
+
clean) and pushes a `timeline_update` — the review page updates live.
|
|
166
|
+
`--complete` compiles fresh (must be clean) and pushes the terminal
|
|
167
|
+
`completed` event (`{edl, timeline, plan, duration_s, outcomes?}`;
|
|
123
168
|
`--outcomes` is a JSON file of `[{change_id, ok, note?}]`). Both
|
|
124
169
|
`--timeline` and `--complete` upload the timeline's referenced assets
|
|
125
170
|
automatically (sha256-cached in `<job>/review/assets.json`).
|
|
126
171
|
|
|
172
|
+
- **`review prompt --job-dir <dir> [--json]`** — print the pulled round
|
|
173
|
+
instruction.
|
|
174
|
+
|
|
127
175
|
## Utility
|
|
128
176
|
|
|
129
177
|
- **`--version`** — print the CLI version.
|
|
130
178
|
- **`status --job-dir <dir> [--json]`** — cloud job state + local artifact existence.
|
|
131
179
|
- **`skill install [--target <dir>] [--json]`** — copy the bundled
|
|
132
180
|
`video-editing` agent skill into `<target|~/.claude/skills>/video-editing`.
|
|
181
|
+
- **`config set-key <key> | set-base <url> | path`** — store credentials in
|
|
182
|
+
`~/.config/video-editing/.env` (the only verb that runs without one).
|
|
133
183
|
|
|
134
184
|
## Typical session
|
|
135
185
|
|
|
136
186
|
```
|
|
137
|
-
|
|
138
|
-
video-editing init --
|
|
139
|
-
video-editing transcribe --job-dir jobs/clip
|
|
187
|
+
video-editing auth api-key # once per machine (skip if already logged in)
|
|
188
|
+
video-editing init --source "clip.mp4" --job-dir jobs/clip # upload + ingest + pull (transcribe included)
|
|
140
189
|
# READ jobs/clip/prompts/author-edl.prompt.md — it is the editorial brief. Author timeline.json.
|
|
141
|
-
video-editing timeline
|
|
142
|
-
video-editing
|
|
143
|
-
video-editing
|
|
144
|
-
video-editing
|
|
145
|
-
video-editing
|
|
190
|
+
video-editing timeline validate --job-dir jobs/clip --json
|
|
191
|
+
video-editing timeline compile --job-dir jobs/clip --json # fix until exit 0; prints the watch link
|
|
192
|
+
video-editing render --job-dir jobs/clip # cloud preview render (waits + downloads)
|
|
193
|
+
video-editing verify --job-dir jobs/clip --json # fix → recompile → re-render → re-verify
|
|
194
|
+
video-editing qa inspect --join 1 --job-dir jobs/clip # close-look at the first join's two sides (filmstrip+waveform+cuts)
|
|
195
|
+
video-editing render --mode final --job-dir jobs/clip
|
|
146
196
|
```
|