@pixerate/editor 0.82.0 → 0.84.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/dist/video-editor/index.cjs +1054 -130
- package/dist/video-editor/index.cjs.map +1 -1
- package/dist/video-editor/index.d.cts +456 -12
- package/dist/video-editor/index.d.ts +456 -12
- package/dist/video-editor/index.js +992 -68
- package/dist/video-editor/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/pixerate-video-editor/SKILL.md +46 -10
package/package.json
CHANGED
|
@@ -44,7 +44,9 @@ For errors, namespaced tool names and undo conventions, see `pixerate-agent-tool
|
|
|
44
44
|
numbers; `render_video_frame` with `times` for a contact sheet of the sequence. Render
|
|
45
45
|
after a batch, not after every edit.
|
|
46
46
|
8. **Export** when asked: `export_video_ffmpeg` (a command to run, not a render) or
|
|
47
|
-
`export_video_edl` (one track) for finishing elsewhere. Read the returned notes.
|
|
47
|
+
`export_video_edl` (one track) for finishing elsewhere. Read the returned notes. For a
|
|
48
|
+
delivery loudness, have the host run `export_video_loudness_measure` first and pass what it
|
|
49
|
+
prints as `loudness.measured`; one pass (`loudness` without `measured`) is fine for a draft.
|
|
48
50
|
|
|
49
51
|
## Best practices
|
|
50
52
|
|
|
@@ -60,8 +62,9 @@ For errors, namespaced tool names and undo conventions, see `pixerate-agent-tool
|
|
|
60
62
|
dialogue and scene changes.
|
|
61
63
|
- **Transitions sparingly.** A straight cut is the default. Use `crossfade` for passage of time
|
|
62
64
|
or a soft scene change, `dip` (to black, or a `color`) for a section break, `wipe` rarely.
|
|
63
|
-
Keep them short (300-1000 ms).
|
|
64
|
-
|
|
65
|
+
Keep them short (300-1000 ms). `push` and `slide` suit graphics, montages and social edits
|
|
66
|
+
more than drama; `iris` is a stylised period or comic effect. Every type but `dip` needs
|
|
67
|
+
handles: half the duration of unused media past the cut on both clips; `dip` needs none.
|
|
65
68
|
- **Insert vs overwrite.** `add_video_clip` and `move_video_clip` take `mode`: `refuse`
|
|
66
69
|
(default; the error names the next free place), `overwrite` (replace what is underneath, like
|
|
67
70
|
an overwrite edit) or `insert` (push later material along). Use `ripple: true` on trim and
|
|
@@ -76,6 +79,11 @@ For errors, namespaced tool names and undo conventions, see `pixerate-agent-tool
|
|
|
76
79
|
- **Keyframes sparingly.** Use `set_video_keyframes` for a push-in (`scale` 1 to 1.1 over the
|
|
77
80
|
shot), a duck under dialogue (`volume`), or a fade that is not at an edge; ease (`ease-in-out`)
|
|
78
81
|
rather than linear for motion. Simple fades at the clip edges are `fadeIn` / `fadeOut`.
|
|
82
|
+
- **Tighten dialogue by ear, in numbers.** `find_video_silences` on an interview or voiceover clip
|
|
83
|
+
lists the pauses in timeline time; extract the long ones (keep 150-300 ms either side so speech
|
|
84
|
+
does not sound clipped: shrink each range before `extract_video_range`, and extract from the
|
|
85
|
+
last pause back to the first, or re-read, because each extract moves what follows). Use
|
|
86
|
+
`get_video_audio_levels` to find where a line starts before trimming or splitting at it.
|
|
79
87
|
- **Close gaps.** Unintended gaps play as background colour and silence. `find_video_gaps`, then
|
|
80
88
|
`close_video_gaps` or ripple deletes. Leave gaps only where you want black.
|
|
81
89
|
- **Cut on frames.** Put starts, trims and splits on frame boundaries (multiples of 1000 / fps
|
|
@@ -83,8 +91,26 @@ For errors, namespaced tool names and undo conventions, see `pixerate-agent-tool
|
|
|
83
91
|
- **Audio levels.** Dialogue is the reference; keep music under it (volume around 0.2-0.4 under
|
|
84
92
|
speech, more between lines) and avoid gains above 1 that clip. Per-clip `volume` and track
|
|
85
93
|
`volume` multiply. Give every audio clip that starts or ends mid-sound a short `fadeIn` /
|
|
86
|
-
`fadeOut` (10-50 ms) to avoid clicks; fade music beds over 1-3 s.
|
|
87
|
-
|
|
94
|
+
`fadeOut` (10-50 ms) to avoid clicks; fade music beds over 1-3 s. Shape sound fades with
|
|
95
|
+
`fadeInCurve` / `fadeOutCurve`: `equal-power` where two sounds overlap (it keeps loudness
|
|
96
|
+
steady, where linear dips in the middle; transitions' `audioCurve` already defaults to it for
|
|
97
|
+
crossfades and wipes), `exponential` to fade music out to silence
|
|
98
|
+
naturally, `s-curve` for a gentle start and finish. Linear is the default.
|
|
99
|
+
- **Delivery loudness.** Normalise the final mix rather than pushing clip volumes: -14 LUFS for
|
|
100
|
+
web and streaming, -16 for podcasts, -23 (EBU R128) or -24 (ATSC) for broadcast, with true
|
|
101
|
+
peaks at or under -1 dBTP. Two passes keep the dynamics; one pass rides the level.
|
|
102
|
+
- **Grade in two passes: correct, then look.** First balance each shot so a scene matches
|
|
103
|
+
(`update_video_clip` `grade`: fix exposure and white balance against the best shot, then
|
|
104
|
+
`copy_video_grade` from it to the rest of the scene), then add a look with
|
|
105
|
+
`apply_video_grade_preset` at a modest `amount` (0.3-0.6). Check with `render_video_frame` at a
|
|
106
|
+
few times side by side. Skin tones are the reference: avoid strong `hue` or `tint` on people.
|
|
107
|
+
- **Blend overlays, don't key them.** Light leaks, flares, film burns and glows shot on black go on
|
|
108
|
+
a higher video track with `blend: "screen"` (or `add` for a hotter look), so the black drops
|
|
109
|
+
out; textures, paper and dust on white use `multiply`. Lower the clip's `opacity` to taste.
|
|
110
|
+
A blend affects everything beneath the clip on lower tracks.
|
|
111
|
+
- **Titles.** Bring titles in and out with `animateIn` / `animateOut` rather than hand-made
|
|
112
|
+
keyframes: `rise` or `fade` for lower thirds, `pop` for a playful callout, `zoom` for a slow
|
|
113
|
+
reveal; 300-600 ms in, a little quicker out. Keep text inside the title-safe area (about 90% of the frame), hold it at least as
|
|
88
114
|
long as it takes to read twice, and use `background` for contrast over busy footage.
|
|
89
115
|
- **Pacing.** Vary shot length with content; trim heads and tails of every clip to the
|
|
90
116
|
essential action rather than using whole source files.
|
|
@@ -102,13 +128,16 @@ For errors, namespaced tool names and undo conventions, see `pixerate-agent-tool
|
|
|
102
128
|
| `find_video_gaps` | List empty stretches between clips (and before the first) as `{ track, start, end }` ms, on every track or one `track`. Then `close_video_gaps` or ripple. |
|
|
103
129
|
| `check_video_project` | After every batch and before export. Lists issues errors first with a code (`missing-asset`, `wrong-track`, `overlap`, `source-overrun`, `transition-without-cut`, `transition-too-long`, `transition-handles`, `fades-too-long`, `unknown-duration`, `unused-asset`, `marker-past-end`, `empty`), what it is about and how to fix it. |
|
|
104
130
|
| `render_video_frame` | Look at the picture at `time`, or at 2-16 `times` as one labelled contact sheet (`columns` 1-8). SVG by default; `format: "png"` only when the host can rasterize. Video without a `poster` shows as a labelled box with its source timecode. |
|
|
105
|
-
| `export_video_ffmpeg` | Get the ffmpeg command that renders the project: `args` (for spawn), `command` (one shell line), `filterComplex`, duration and notes on approximations. `output` default output.mp4, `crf` x264 quality 0-51 (default 18, lower is better). Fails when there are no clips. |
|
|
106
|
-
| `
|
|
131
|
+
| `export_video_ffmpeg` | Get the ffmpeg command that renders the project: `args` (for spawn), `command` (one shell line), `filterComplex`, duration and notes on approximations. `output` default output.mp4, `crf` x264 quality 0-51 (default 18, lower is better). `loudness` normalises the mix (`integrated` LUFS default -14, `truePeak` dBTP default -1, `range`); with `loudness.measured` from `export_video_loudness_measure` it applies one fixed gain. Fails when there are no clips. |
|
|
132
|
+
| `export_video_loudness_measure` | First pass of loudness normalisation: the ffmpeg command that mixes only the sound and prints its loudness as JSON at the end of stderr. Takes the same target (`integrated` LUFS, `truePeak`, `range`) as the export. Map `input_i`, `input_tp`, `input_lra`, `input_thresh`, `target_offset` to `loudness.measured` for `export_video_ffmpeg`. |
|
|
133
|
+
| `export_video_edl` | Get one `track` (default the bottom video track) as a CMX 3600 EDL with source and record timecode, dissolves, speed changes and clip names, for conforming in another editor. `title` defaults to the project name. At 29.97 and 59.94 fps it writes drop-frame timecode (`HH:MM:SS;FF`, `FCM: DROP FRAME`), as other editors expect; `dropFrame: false` forces non-drop. |
|
|
107
134
|
|
|
108
135
|
### Write
|
|
109
136
|
|
|
110
137
|
| Tool | Use it to |
|
|
111
138
|
| --- | --- |
|
|
139
|
+
| `get_video_audio_levels` | Measure a media `clip`'s source sound (timeline times) or an `asset`'s (source times) between `from` and `to`: peak dBFS in each of `buckets` (default 50, up to 500) equal stretches, and the loudest peak. Levels are the recording before clip volume and fades. Use it to find where speech or a beat starts or to judge loudness. The first call for an asset decodes its file. |
|
|
140
|
+
| `find_video_silences` | List stretches of a `clip` or `asset` that stay below `thresholdDb` (default -40) for at least `minDuration` ms (default 300). For a clip the `{ start, end }` are timeline times that go straight into `extract_video_range` (cut a pause, closing up) or `split_video_at`. |
|
|
112
141
|
| `seek_video` | Show the person a moment: `time`, a `clip`'s start or a `marker`, with `play` true or false. Does not change the project. Returns the playhead and clips under it. |
|
|
113
142
|
| `set_video_settings` | Set `name`, `width` / `height` (pixels, 16-8192), `fps` (e.g. 24, 25, 30, 60) or `background` colour. One undo step. |
|
|
114
143
|
| `add_video_asset` | Register a file: `kind` (video, audio, image), `src` (URL, path or data URL), `duration` ms (required in practice for video and audio), optional `id`, `name`, `width`, `height`, `hasAudio` (default true for video), `poster`. Returns the asset id. |
|
|
@@ -129,10 +158,12 @@ For errors, namespaced tool names and undo conventions, see `pixerate-agent-tool
|
|
|
129
158
|
| `lift_video_range` | Empty `from`..`to` ms on all unlocked tracks or the given `tracks`, leaving a gap: clips inside are deleted, clips across an edge trimmed, a clip across both cut in two. Returns what was removed, trimmed and created. |
|
|
130
159
|
| `extract_video_range` | Remove `from`..`to` ms and close it up: as lift, then later material moves earlier on those and every sync-locked track. Refused (naming the clip) when a sync-locked track outside `tracks` has material there. Use to cut a section out of a finished sequence. |
|
|
131
160
|
| `delete_video_clips` | Remove `clips`; `ripple: true` pulls later clips up to close the gaps (a ripple delete). |
|
|
132
|
-
| `update_video_clip` | Change properties via `set`: opacity, transform (`x`, `y` px from centre, `scale`, `rotation`), `fit` (contain default for media, cover, fill, none), `fadeIn` / `fadeOut`, name; media `volume` (0-4), `muted`, `speed` (0.05-20, keeps the source range so the length changes), `asset`; title text and style; colour. `remove` resets to defaults. Not for timing. |
|
|
161
|
+
| `update_video_clip` | Change properties via `set`: opacity, transform (`x`, `y` px from centre, `scale`, `rotation`), `fit` (contain default for media, cover, fill, none), `animateIn` / `animateOut` (`{ effect: fade, rise, drop, slide-left, slide-right, zoom or pop, duration ms default 500 }`), `grade` (`exposure` stops -3-3, `contrast`, `saturation`, `temperature`, `tint` -1-1, `hue` degrees; replaces the whole grade), `blend` (normal, multiply, screen, overlay, darken, lighten, color-dodge, color-burn, hard-light, soft-light, difference, exclusion, add), `fadeIn` / `fadeOut`, name; media `volume` (0-4), `muted`, `fadeInCurve` / `fadeOutCurve` (the sound's fade shape: linear, equal-power, s-curve, exponential, logarithmic), `speed` (0.05-20, keeps the source range so the length changes), `asset`; title text and style; colour. `remove` resets to defaults. Not for timing. |
|
|
162
|
+
| `apply_video_grade_preset` | Give `clips` (on video tracks) a named look at an `amount` 0-1 (default 1), replacing their grades: warm, cool, punchy, faded, black-and-white, bleach-bypass, day-for-night. One undo step; returns each clip's grade to fine-tune with `update_video_clip`. |
|
|
163
|
+
| `copy_video_grade` | Match shots: give the `to` clips the grade of the `from` clip (one undo step; a source with no grade clears theirs). Returns the grade copied. |
|
|
133
164
|
| `set_video_keyframes` | Animate one `property` of a `clip` (`opacity` 0-1, `volume` 0-4 for media, `x` / `y` px from centre, `scale`, `rotation` degrees) with `keys` `[{ t, v, ease? }]`, replacing its keys. `t` is clip time (ms from the clip's start), so keys travel with the clip. `ease`: linear (default), hold, ease-in, ease-out, ease-in-out or cubic-bezier points. Returns the sorted keys. |
|
|
134
165
|
| `remove_video_keyframes` | Remove all keys of a clip `property`, leaving the value it had at the clip's start. |
|
|
135
|
-
| `set_video_transition` | Set the transition into a `clip` from the clip ending where it starts on the same track: `{ type: crossfade, dip or
|
|
166
|
+
| `set_video_transition` | Set the transition into a `clip` from the clip ending where it starts on the same track: `{ type: crossfade, dip, wipe, push, slide or iris, duration ms centred on the cut, color (dip, default black), direction (wipe, push, slide; default right), audioCurve (the sound's fades: equal-power by default for crossfade and wipe, linear for dip) }`, or `null` to remove. When handles are short the error gives the longest that fits. |
|
|
136
167
|
| `close_video_gaps` | Slide clips on a `track` earlier so no gaps remain, from time `from` (default the start). Returns the clips that moved. |
|
|
137
168
|
| `add_video_marker` | Add a marker at `time` with `label`, `color` and optional `id`, for beats, sections or review notes. Returns its id. |
|
|
138
169
|
| `remove_video_marker` | Remove a `marker` by id. |
|
|
@@ -146,6 +177,9 @@ For errors, namespaced tool names and undo conventions, see `pixerate-agent-tool
|
|
|
146
177
|
impossible transition is refused whole (unless you asked for `mode: "overwrite"` or
|
|
147
178
|
`"insert"`); read the message (it names the next free place or the longest trim /
|
|
148
179
|
transition that fits) and retry with those numbers.
|
|
180
|
+
- **Animations write keyframes for you.** `animateIn` / `animateOut` move opacity, x, y and scale;
|
|
181
|
+
if the clip keys one of those itself, the animation leaves it alone (`animation-keyed`), and
|
|
182
|
+
entrance plus exit longer than the clip are shortened (`animations-too-long`).
|
|
149
183
|
- **Numbers replace keyframes.** Setting `opacity` or `volume` as a plain
|
|
150
184
|
number (in `add_video_clip` or `update_video_clip`) drops that property's keys; animate with
|
|
151
185
|
`set_video_keyframes` after the static settings, not before.
|
|
@@ -164,7 +198,9 @@ For errors, namespaced tool names and undo conventions, see `pixerate-agent-tool
|
|
|
164
198
|
on the same track (`transition-without-cut`); close the gap first. Splitting keeps the
|
|
165
199
|
transition on the left part.
|
|
166
200
|
- **Fades are per clip.** `fadeIn + fadeOut` longer than the clip warns `fades-too-long`; fades
|
|
167
|
-
affect picture and sound together.
|
|
201
|
+
affect picture and sound together. Fade curves shape only the sound (media clips); the picture
|
|
202
|
+
always fades linearly. Splitting keeps the fade-in curve on the left part and the fade-out
|
|
203
|
+
curve on the right.
|
|
168
204
|
- **Locked tracks** refuse edits to their clips; unlock with `update_video_track` only if the user
|
|
169
205
|
wants that track changed.
|
|
170
206
|
- **Read-only**: when `get_video_project` says the project cannot be edited, write tools are
|