@pixerate/editor 0.90.0 → 0.91.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor",
3
- "version": "0.90.0",
3
+ "version": "0.91.0",
4
4
  "description": "UI-agnostic rich text and media editing core library",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",
@@ -138,6 +138,15 @@ For errors, namespaced tool names and undo conventions, see `pixerate-agent-tool
138
138
  long as it takes to read twice, and use `background` for contrast over busy footage.
139
139
  - **Pacing.** Vary shot length with content; trim heads and tails of every clip to the
140
140
  essential action rather than using whole source files.
141
+ - **Proxies for heavy footage.** When the preview stutters on 4K or long-GOP camera files, run
142
+ `plan_video_proxies` (half size; quarter for 6K and up), ask the host to run the commands,
143
+ attach each result with `set_video_proxies`, and leave `set_video_preview_scale` on `auto` (or
144
+ pick a fraction). Proxies change only what the preview plays: the export, the EDL and every
145
+ time you read stay on the originals.
146
+ - **Let the cache fill before a review.** With a frame cache, `get_video_preview_cache` shows
147
+ which stretches play without waiting. Before asking the person to watch a passage, seek to its
148
+ start and let the prefetch window fill. Frames are keyed by the source, so trims and moves keep
149
+ them; switching the preview scale or relinking an asset starts afresh.
141
150
  - **Check before export.** Always run `check_video_project` and fix errors first: the ffmpeg
142
151
  command renders exactly what is on the timeline.
143
152
 
@@ -157,6 +166,8 @@ For errors, namespaced tool names and undo conventions, see `pixerate-agent-tool
157
166
  | `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. |
158
167
  | `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. |
159
168
  | `get_video_scopes` | Measure the rendered picture at `time` (default the playhead; another time is shown briefly and the playhead put back) as colour scopes do: luma `stats` (0-1 mean, median, min, max, p1, p99), the share `clipped` to black or white (and per channel), saturation, the `average` colour, a `histogram` of `bins` steps (default 16), the luma spread of `columns` strips left to right (`waveform`, default 8), the main `vectorscope` hue (red ≈ 103°, skin ≈ 123°) and `notes` on what to fix. Call it before and after grading. Fails with a reason when the host shows no preview (then use `render_video_frame`). |
169
+ | `get_video_preview_cache` | Read the preview's frame cache when the host has one: frames and bytes against `maxBytes`, hits and misses, frames still decoding (`pending`), the prefetch window (ms), and `cachedRanges` between `from` and `to` (stretches that play and scrub without waiting). Says `enabled: false` without a cache. Changes nothing. |
170
+ | `plan_video_proxies` | Get the ffmpeg commands that make proxies (default `scale` 0.5) of video assets lacking one at that scale (or of `assets`): scaled H.264 with a keyframe every `gop` frames (default 12) so scrubbing is quick, sound kept. Each has `{ asset, args, command, proxy }`; attach `proxy` with `set_video_proxies` once the host has run it. Changes nothing. |
160
171
  | `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. |
161
172
  | `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`. |
162
173
  | `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. |
@@ -167,6 +178,8 @@ For errors, namespaced tool names and undo conventions, see `pixerate-agent-tool
167
178
  | --- | --- |
168
179
  | `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. |
169
180
  | `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`. |
181
+ | `set_video_preview_scale` | Set what the preview plays (no undo step, allowed while read-only): `"full"` originals, a fraction (0.5, 0.25) for the smallest proxy at least that large, or `"auto"` (default, by the preview's shown size). Returns what each video asset plays at a fixed scale. |
182
+ | `set_video_proxies` | Set a video `asset`'s `proxies` (`[{ scale, src, width?, height? }]`, one per scale; empty removes them) in one undo step. A proxy must match the original's length and timing; exports always use the original. |
170
183
  | `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. |
171
184
  | `set_video_transcript` | Attach what is said in a video or audio `asset`: `text` (a Whisper JSON, .srt or .vtt file's contents) or `words` (`[{ word, start, end }]` ms of the source). Captions give approximate word timings. Returns the word count and first and last words. Clear it with `update_video_asset` `remove: ["transcript"]`. |
172
185
  | `remove_video_ranges` | Cut `ranges` (`[{ from, to }]` timeline ms, as the find tools return them) out and close them up on every sync-locked track, as one undo step: merged where they touch, extracted last first. Returns how many stretches and how much time went, and the new length. |