@slidevideo/cli 0.9.0 → 0.11.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.
@@ -19,7 +19,7 @@ Run `slidevideo skill production` for the [production workflow](references/produ
19
19
 
20
20
  Read the supplied deck, existing storyboard, brief and supporting material. Identify the intended audience, narration language, tone, length and voice from the request. Ask only for missing information that affects a useful draft. Keep reasonable draft assumptions visible for review.
21
21
 
22
- Inspect actual slide targets, reveal steps, effect durations, and embedded-media names with `slidevideo inspect --deck <file> --json` before a storyboard exists, or `slidevideo inspect --storyboard <file> --json` when revising one. For Slidev, account for imports and the effective slide order. For PowerPoint, use native slide names or actual SlideID aliases, native click-group durations, and video `Shape.Name` values. Do not invent targets or claim unknown animation bounds are verified.
22
+ Inspect actual slide targets, reveal steps, speaker notes (`slides[].notes`), effect durations, and embedded-media names with `slidevideo inspect --deck <file> --json` before a storyboard exists, or `slidevideo inspect --storyboard <file> --json` when revising one. For Slidev, account for imports and the effective slide order. For PowerPoint, use native slide names or actual SlideID aliases, native click-group durations, speaker notes, and video `Shape.Name` values. Do not invent targets or claim unknown animation bounds are verified.
23
23
 
24
24
  Preserve an existing supplied `.md` or `.pptx` deck by default so storyboard work never rewrites the creator's slides unprompted. Create or edit slides when the creator asks to build a deck from notes, screenshots, or clips, requests slide changes, or approves adding stable `name` fields or element `id` attributes needed by requested storyboard actions or `annotations`. Follow the [deck compatibility reference](references/decks.md) when creating or editing slides, and never overwrite a supplied deck with an unrelated example script.
25
25
 
@@ -29,7 +29,7 @@ Create `slidevideo.yaml` when none exists. `.yml` is also accepted when selected
29
29
 
30
30
  Write narration supported by the sources and appropriate for spoken delivery. Narration segments can cross slide boundaries. Separate segments when an intentional silence or independent revision makes that useful.
31
31
 
32
- Map the narrative to real slide and reveal targets. Choose sequential actions for ordered speech, holds and media. Choose phrase cues when a visual action should occur during speech. Account for native effect duration and complete media playback. Distinguish an estimated target length from the duration that actual synthesized speech will establish.
32
+ Map the narrative to real slide and reveal targets, or use standalone MP4 scenes (`scenes[].media` instead of `slide`, with `deck` optional for deck-free productions) for intro/outro branding bumpers or screen recordings separate from the presentation deck. Choose sequential actions for ordered speech, holds and media. Choose phrase cues when a visual action should occur during speech, or video-anchored cues (`at: { media, time_ms }`, with optional phrase-to-frame `align` and scene `play.overflow: continuous | freeze | fit_video`) when narrating a beat-synced video or screen recording. Account for native effect duration and complete media playback. Distinguish an estimated target length from the duration that actual synthesized speech will establish.
33
33
 
34
34
  Use stable IDs and paths relative to the storyboard. Include all required root fields, even when their lists are empty. Output dimensions and frame rate belong on the CLI with `--width`, `--height`, and `--fps`, defaulting to `1920` by `1080` at `30 fps`, not in `slidevideo.yaml`. Use Edge TTS for new drafts unless the creator chooses another provider. Preserve an existing, explicitly selected voice when revising that production.
35
35
 
@@ -37,11 +37,11 @@ Use stable IDs and paths relative to the storyboard. Include all required root f
37
37
 
38
38
  For marker highlights, underlines, spotlights, and zoom/pan, run `slidevideo inspect --deck <file> --json` or `slidevideo inspect --storyboard <file> --json` to discover existing audience-slide selectors, native shape IDs, and shape text previews. Inspect the deck and returned visibility/click information before choosing a target. Use `target: { type: text, text, container?, occurrence? }` to target visible slide phrases or words directly without wrapping Slidev copy in `<span>` tags. Regions need no element metadata. Never reference a nonexistent element ID in `slidevideo.yaml`, infer words inside an image, or claim whole-shape bounds establish word geometry. When a Slidev slide lacks a stable selector for a whole-card highlight and normalized regions are a poor fit, add a targeted `id` attribute only when slide creation or editing is part of the request or approved by the creator.
39
39
 
40
- Use the `annotations` array for `highlight`, `underline`, `spotlight`, `zoom`, `laser`, `stamp`, and `arrow` effects. The [marker reference](references/storyboard.md#marker-highlights), [underline reference](references/storyboard.md#underline-annotations), [spotlight reference](references/storyboard.md#spotlight-annotations), [zoom reference](references/storyboard.md#zoom-and-pan), [laser pointer reference](references/storyboard.md#laser-pointer), [stamp and badge reference](references/storyboard.md#stamp-and-badge-annotations), and [arrow reference](references/storyboard.md#arrow-annotations) cover Slidev and PowerPoint. Bind each annotation to a scene using either `at` (a phrase cue or an explicit scene-relative millisecond offset) with an explicit positive `duration_ms` or `follow` against retained speech alignment (`mode: words` for word-by-word read-along on `type: text` targets, or `mode: phrase` for exact spoken-span lifetimes), keeping every resolved interval inside one settled slide visit and reveal state. Choose visible `text` targets, normalized regions, normalized points (for `stamp`), Slidev element selectors, native PowerPoint shape IDs, slide-relative `path` waypoints (for `laser`), or slide-relative `connector` endpoints (`from`/`to` with explicit `anchor` on target attachments for `arrow`) as appropriate. Keep highlight padding and optional `bottom_border` under `highlight`, use `underline` for standalone solid or dashed strokes with normalized `width`, optional `offset` and `padding_x`, and optional `motion: { type: wipe }`, use `spotlight` to dim the surrounding slide while keeping `rounded-rect` or `ellipse` apertures bright (with optional `padding`, `radius`, `softness`, and `motion: { type: fade }`), use `zoom` to smoothly pan and magnify a target (with optional `fit`, `scale`, `max_scale`, `padding`, and `motion: { type: ease }`) while keeping attached annotations locked to slide content and `overlays`/watermarks frame-fixed, use `laser` to move a glowing pointer with optional dwell and decaying trail along normalized or target-anchored waypoints without clicking or mutating the deck, use `stamp` to place reproducible bundled-font text and/or vector symbols (`check`, `cross`, `warning`, `star`, `info`, `arrow-right`) with optional background, border, rotation, multiline wrapping, and `fade` or `pop` motion, and use `arrow` to draw straight solid or dashed arrows with `filled` or `open` arrowheads, endpoint padding, and optional `fade` or `draw` motion. Moving targets, overlapping `zoom` intervals, curved arrows, and unimplemented effects are unsupported.
40
+ Use the `annotations` array for `highlight`, `underline`, `spotlight`, `zoom`, `laser`, `stamp`, and `arrow` effects. The [marker reference](references/storyboard.md#marker-highlights), [underline reference](references/storyboard.md#underline-annotations), [spotlight reference](references/storyboard.md#spotlight-annotations), [zoom reference](references/storyboard.md#zoom-and-pan), [laser pointer reference](references/storyboard.md#laser-pointer), [stamp and badge reference](references/storyboard.md#stamp-and-badge-annotations), and [arrow reference](references/storyboard.md#arrow-annotations) cover Slidev and PowerPoint. Bind each annotation to a scene using either `at` (a phrase cue, a video-anchored media timestamp `{ media, time_ms }`, or an explicit scene-relative millisecond offset) with an explicit positive `duration_ms` or `follow` against retained speech alignment (`mode: words` for word-by-word read-along on `type: text` targets, or `mode: phrase` for exact spoken-span lifetimes), keeping every resolved interval inside one settled slide visit and reveal state. Choose visible `text` targets, normalized regions, normalized points (for `stamp`), Slidev element selectors, native PowerPoint shape IDs, slide-relative `path` waypoints (for `laser`), or slide-relative `connector` endpoints (`from`/`to` with explicit `anchor` on target attachments for `arrow`) as appropriate. Keep highlight padding and optional `bottom_border` under `highlight`, use `underline` for standalone solid or dashed strokes with normalized `width`, optional `offset` and `padding_x`, and optional `motion: { type: wipe }`, use `spotlight` to dim the surrounding slide while keeping `rounded-rect` or `ellipse` apertures bright (with optional `padding`, `radius`, `softness`, and `motion: { type: fade }`), use `zoom` to smoothly pan and magnify a target (with optional `fit`, `scale`, `max_scale`, `padding`, and `motion: { type: ease }`) while keeping attached annotations locked to slide content and `overlays`/watermarks frame-fixed, use `laser` to move a glowing pointer with optional dwell and decaying trail along normalized or target-anchored waypoints without clicking or mutating the deck, use `stamp` to place reproducible bundled-font text and/or vector symbols (`check`, `cross`, `warning`, `star`, `info`, `arrow-right`) with optional background, border, rotation, multiline wrapping, and `fade` or `pop` motion, and use `arrow` to draw straight solid or dashed arrows with `filled` or `open` arrowheads, endpoint padding, and optional `fade` or `draw` motion. Moving targets, overlapping `zoom` intervals, curved arrows, and unimplemented effects are unsupported.
41
41
 
42
42
  Add, change or remove only the requested annotation and preserve unrelated annotations, narration, scene actions, media, IDs and settings. A new video after an annotation-only edit needs a new run and can reuse matching speech. Validate the draft through the real CLI. Required phrase alignment and actual target geometry are checked during resolution and capture. Highlights are composited into the final MP4, so ordinary deck playback and the raw recording remain unannotated.
43
43
 
44
- When the creator wants to watch the storyboard, run `slidevideo play --storyboard <file>` and give them the local URL. It automatically reads matching speech timing and synchronized cached narration audio (with a Mute/Unmute toggle) from `.slidevideo/speech` beside the storyboard; pass `--cache-dir <directory>` to use another cache or `--no-cache` to disable cache reads. For uncached segments, preview estimates durations at 150 words/min and approximates phrase-cue and `follow` alignment (labeled clearly as approximate in CLI and browser output), while `resolve` and `build` still require synthesized provider alignment. The browser player shows live highlights and supports Play, Pause, Replay, timeline scrubbing, and scene jumping. Restart the command after a YAML edit. [Preview and recording commands](references/production.md#choose-the-operation)
44
+ When the creator wants to watch the storyboard, run `slidevideo play --storyboard <file>` and give them the local URL. It automatically reads matching speech timing and synchronized cached narration audio (with a Mute/Unmute toggle) from `.slidevideo/speech` beside the storyboard; pass `--cache-dir <directory>` to use another cache or `--no-cache` to disable cache reads. For uncached segments, preview estimates durations at 150 words/min and approximates phrase-cue and `follow` alignment (labeled clearly as approximate in CLI and browser output), while `resolve` and `build` still require synthesized provider alignment. The browser player shows live highlights and active/frozen media timestamps, and supports Play, Pause, Replay, timeline scrubbing, and scene jumping. Restart the command after a YAML edit. [Preview and recording commands](references/production.md#choose-the-operation)
45
45
 
46
46
  For an authoring or review request, deliver the YAML and a readable outline of the narration, slide changes, reveals, holds, media and voice. Point out assumptions, unsupported requests and choices that affect pacing. A compact table is useful when several scenes or cues need review. Do not generate speech or record a video merely to review a text draft.
47
47
 
@@ -37,8 +37,8 @@ Every storyboard `scene.slide` and `slide.target` value must match `^[a-zA-Z][a-
37
37
 
38
38
  ### Slidev
39
39
 
40
- - Declare controllable media with literal lowercase `<video id="...">` or `<audio id="...">` HTML tags in `slides.md`. Component wrappers such as `<SlidevVideo>` are not discovered as storyboard media targets.
41
- - Place local clip files in `public/` next to `slides.md`, reference `src="/clip.mp4"` on the `<video>` element with `preload="auto" muted playsinline`, and declare the same file under `media` in `slidevideo.yaml` as `src: ./public/clip.mp4`.
40
+ - Declare controllable media embedded in a slide with literal lowercase `<video id="...">` or `<audio id="...">` HTML tags in `slides.md`. Component wrappers such as `<SlidevVideo>` are not discovered as storyboard media targets. For standalone MP4 scenes (`scenes[].media`, such as intro/outro branding bumpers or deck-free screen recordings), omit the `<video>` tag from `slides.md` altogether—FFmpeg splices those clips directly from `media[].src`.
41
+ - Place local clip files in `public/` next to `slides.md`, reference `src="/clip.mp4"` on the `<video>` element with `preload="auto" muted playsinline`, and declare the same file under `media` in `slidevideo.yaml` as `src: ./public/clip.mp4`. To use an MP4 as a full-bleed background behind Slidev content, position the `<video>` with `class="absolute inset-0 w-full h-full object-cover -z-10 pointer-events-none"` (omitting `autoplay` and `loop`) and wrap foreground slide content in `<div class="relative z-10">`.
42
42
  - During preparation, SlideVideo fetches the browser's resolved media URL and verifies that its SHA-256 digest matches `media[].src`. A re-encoded copy fails with `MEDIA_SOURCE_MISMATCH`.
43
43
  - Browser audio, WebAudio, and iframe audio are muted during capture. Exported audio comes only from synthesized narration and scheduled `play` actions with `audio: source`.
44
44
 
@@ -46,7 +46,7 @@ Every storyboard `scene.slide` and `slide.target` value must match `^[a-zA-Z][a-
46
46
 
47
47
  - Embed the local video file directly on the slide as an ungrouped shape and set `Shape.Name` to the storyboard `media[].id`. Linked or online video fails capability validation.
48
48
  - Point `media[].src` in `slidevideo.yaml` at the exact file embedded into the `.pptx` package so its SHA-256 digest and duration match.
49
- - Disable autoplay, loop, rewind, native trims, fullscreen playback, rotation, flipping, 3D transforms, and shape animations on the video shape. Static cropping and borders or shadows are allowed. PowerPoint `play` actions run at `rate: 1` and support optional storyboard `trim_start_ms` and `trim_end_ms`.
49
+ - Disable autoplay, loop, rewind, native trims, fullscreen playback, rotation, flipping, 3D transforms, and shape animations on the video shape. Static cropping and borders or shadows are allowed. PowerPoint `play` actions run at `rate: 1` with `overflow: continuous` and support optional storyboard `trim_start_ms` and `trim_end_ms`.
50
50
 
51
51
  ## Annotation targets and canvas bounds
52
52
 
@@ -12,9 +12,9 @@ Keep the existing presentation as input. The production CLI does not require an
12
12
 
13
13
  ## Choose the operation
14
14
 
15
- Before drafting a storyboard for an existing presentation, run `slidevideo inspect --deck <file> --json` to list slide targets, click counts, media IDs, and highlight targets without generating speech or recording. For an authoring or explanation request, return the draft, revision, or answer without starting production. When validation is requested, use `validate`; it checks syntax, references, and capabilities without requesting speech or recording. Pending phrase alignment is checked later, during resolution.
15
+ Before drafting a storyboard for an existing presentation, run `slidevideo inspect --deck <file> --json` to list slide targets, click counts, speaker notes (`slides[].notes`), media IDs, and highlight targets without generating speech or recording. You can also run `slidevideo init --deck <file>` to scaffold a starter `slidevideo.yaml` directly from slide structure, speaker notes, and reveal clicks. For an authoring or explanation request, return the draft, revision, or answer without starting production. When validation is requested, use `validate`; it checks syntax, references, and capabilities without requesting speech or recording. Pending phrase alignment is checked later, during resolution.
16
16
 
17
- For a visual pacing review, use `play --storyboard <file>` and open the printed URL. Pass `--width` and `--height` together as even integers from `640` to `3840` wide and `360` to `2160` high to test a non-default viewport; the default is `1920` by `1080`. `play` automatically reads retained speech timing and synchronized cached narration audio (with a Mute/Unmute toggle) from `.slidevideo/speech` beside the storyboard; pass `--cache-dir <directory>` to override the cache path or `--no-cache` to ignore cached speech. Uncached segments estimate duration and stay silent while embedded media stays muted. Phrase cues and `follow` annotations require matching alignment. Keep the CLI running while the creator uses the browser controls, timeline scrubber, and scene selector. Stop and relaunch it after storyboard edits.
17
+ For a visual pacing review, use `play --storyboard <file>` and open the printed URL. Pass `--width` and `--height` together as even integers from `640` to `3840` wide and `360` to `2160` high to test a non-default viewport; the default is `1920` by `1080`. `play` automatically reads retained speech timing and synchronized cached narration audio (with a Mute/Unmute toggle) from `.slidevideo/speech` beside the storyboard; pass `--cache-dir <directory>` to override the cache path or `--no-cache` to ignore cached speech. Standalone MP4 scenes (`scenes[].media`) play natively in preview with `audio: source` respecting the Mute/Unmute toggle, while deck-embedded media stays muted. Uncached segments estimate duration and stay silent. Phrase cues and `follow` annotations require matching alignment. Keep the CLI running while the creator uses the browser controls, timeline scrubber, live media timestamp readout (showing active and frozen video timestamps for authoring beat-synced cues), and scene selector. Stop and relaunch it after storyboard edits.
18
18
 
19
19
  For a requested finished video, use `build`. It validates inputs, generates or reuses matching speech, resolves timing, captures the presentation, and assembles the MP4 at `1920` by `1080` and `30 fps` by default, along with speech-aligned `final.vtt` and `final.srt` captions in the run directory whenever narration is present. Pass `--captions <vtt|srt|both|none>` on `build`, `assemble`, or `resolve` to select one format, write alongside an external `--output`, export during `resolve` (`timing/captions.<ext>`), or disable captions. Pass `--width` and `--height` together and optional `--fps` of `15`, `24`, `30`, or `60` to `build` or `record` to select another resolution or frame rate. `record` and `build` bind `width`, `height`, and `fps` in the run manifest. `assemble` and `build --resume` inherit those settings and fail with `RUN_MODE_MISMATCH` when you pass conflicting values.
20
20
 
@@ -15,12 +15,12 @@ IDs and slide targets use `^[a-zA-Z][a-zA-Z0-9_-]*$`. They start with an ASCII l
15
15
  | Field | Required | Meaning |
16
16
  | --- | --- | --- |
17
17
  | `version` | Yes | Schema version. Always `1`. |
18
- | `deck` | Yes | Nonempty path to an existing Slidev `.md` or native PowerPoint `.pptx` input. |
18
+ | `deck` | Conditional | Nonempty path to an existing Slidev `.md` or native PowerPoint `.pptx` input. Required whenever any scene uses `slide`; optional for storyboards containing only standalone `media` scenes. |
19
19
  | `voice` | No | Default voice for narration. Every spoken segment needs either this default or its own voice. Silent productions can omit it. |
20
20
  | `media` | Yes | Array of declared source media. `[]` is valid when none is used. |
21
21
  | `narration` | Yes | Array of text segments. `[]` supports a silent or source-audio-only production. |
22
22
  | `scenes` | Yes | Ordered scenes and their sequential actions. Total resolved production duration must be positive. |
23
- | `cues` | Yes | Array of phrase-driven visual actions. `[]` is valid. |
23
+ | `cues` | Yes | Array of phrase-driven or video-anchored actions. `[]` is valid. |
24
24
  | `annotations` | Yes | Array of phrase-triggered or speech-following slide annotations (`highlight`, `underline`, and `spotlight`). Use `[]` when none are needed. |
25
25
  | `overlays` | No | Frame-fixed image layers for the exported video. |
26
26
 
@@ -65,11 +65,35 @@ The spoken duration comes from the generated audio. The YAML has no narration-du
65
65
  | Field | Required | Meaning |
66
66
  | --- | --- | --- |
67
67
  | `id` | Yes | Stable scene ID. |
68
- | `slide` | Yes | Actual starting slide target. Each scene selects it at scene start and resets its reveal count. |
69
- | `actions` | Yes | Ordered array of sequential actions. |
68
+ | `slide` | Exclusive with `media` | Actual starting slide target in `deck`. Selects that slide at scene start and resets its reveal count. |
69
+ | `media` | Exclusive with `slide` | Declared media ID for a standalone MP4 scene separate from `deck` (such as an intro/outro branding bumper with `audio: source` or a mid-deck/deck-free screen recording). Reads frames directly from `media[].src` in FFmpeg without embedding video into `slides.md` or `.pptx`. |
70
+ | `actions` | Yes | Ordered array of sequential actions. Standalone `media` scenes support `play` (referencing the scene's `media`, including `overflow: continuous \| freeze \| fit_video`), `speak`, and `hold`, and disallow `slide` and `reveal`. |
70
71
  | `duration_ms` | No | Nonnegative fixed total scene duration, including its actions. Remaining time becomes a final hold. Actions that exceed it fail resolution. |
71
72
 
72
- Scenes execute in array order. A scene can navigate across slides, and several scenes can start on the same slide. A scene is a narrative unit rather than a required one-to-one mapping to a slide.
73
+ Scenes execute in array order. Slide scenes can navigate across slides, and several scenes can start on the same slide. Standalone `media` scenes support video-anchored `cues`, normalized coordinate annotations (`region`, `point`, `path`, `connector`), and `hide_in_scenes` on global `overlays` (so persistent corner logos stay clear of branding bumpers).
74
+
75
+ Example interleaving an intro branding bumper with a presentation slide:
76
+
77
+ ```yaml
78
+ media:
79
+ - id: intro-bumper
80
+ src: ./assets/brand-intro.mp4
81
+ scenes:
82
+ - id: intro
83
+ media: intro-bumper
84
+ actions:
85
+ - id: play-intro
86
+ type: play
87
+ media: intro-bumper
88
+ audio: source
89
+ volume: 1
90
+ - id: main
91
+ slide: overview
92
+ actions:
93
+ - id: speak-main
94
+ type: speak
95
+ segment: overview-narration
96
+ ```
73
97
 
74
98
  ## Sequential actions
75
99
 
@@ -81,7 +105,7 @@ Every scene action has required `id` and `type`. The other fields depend on the
81
105
  | `slide` | `target`, `duration_ms` | None | Selects the target slide and resets reveals. Reserves the declared settling interval. The deck supplies the visual transition. |
82
106
  | `reveal` | `click`, `duration_ms` | None | Advances to an integer click step of at least 1 on the active slide. Reserves the complete effect duration. |
83
107
  | `hold` | `duration_ms` | None | Adds waiting time without issuing a visual or audio action. Independent cues and audio can continue. |
84
- | `play` | `media`, `audio`, `volume` | `trim_start_ms`, `trim_end_ms`, `rate` | Plays declared media. Duration is the selected source interval divided by playback rate. |
108
+ | `play` | `media`, `audio`, `volume` | `trim_start_ms`, `trim_end_ms`, `rate`, `overflow`, `min_rate`, `max_rate` | Plays declared media. Duration is the selected source interval divided by playback rate, plus any resolved beat holds or rate fits. |
85
109
 
86
110
  `segment` references a narration ID. `target` is a slide target. `media` references a declared media ID. A reveal's `click` is the target step, not a count of extra clicks. Clicks advance until a slide selection resets them.
87
111
 
@@ -94,8 +118,10 @@ Every scene action has required `id` and `type`. The other fields depend on the
94
118
  | `trim_start_ms` | Optional nonnegative source position. Default `0`. |
95
119
  | `trim_end_ms` | Optional nonnegative source position. Default source duration. Must be after the start and no later than source duration. |
96
120
  | `rate` | Optional number from 0.5 to 2. Default `1`. Picture and source audio use the same rate. |
121
+ | `overflow` | Optional `continuous` (default), `freeze`, or `fit_video` on scene `play` actions. Controls what happens when video-anchored `speak` cues overrun the next beat or clip end: `continuous` fails resolution with exact overrun milliseconds, `freeze` pauses the video on the beat frame until speech finishes, and `fit_video` computes a bounded playback rate for the overrunning interval. |
122
+ | `min_rate` / `max_rate` | Optional numbers from 0.5 to 2 (default `0.75` and `1.3`). Valid only with `overflow: fit_video`; `min_rate` cannot exceed `max_rate`. |
97
123
 
98
- The duration formula is `(trim_end_ms - trim_start_ms) / rate`, with omitted trims replaced by their defaults. Schema acceptance does not imply adapter support. Native PowerPoint currently requires rate `1` and supports optional `trim_start_ms` and `trim_end_ms`.
124
+ The duration formula is `(trim_end_ms - trim_start_ms) / rate`, with omitted trims replaced by their defaults, extended by any `freeze` holds or `fit_video` rate adjustments when video-anchored `speak` cues are attached. Schema acceptance does not imply adapter support. Native PowerPoint currently requires rate `1` and `overflow: continuous` and supports optional `trim_start_ms` and `trim_end_ms`.
99
125
 
100
126
  Source-audio volume is an explicit fixed gain. The storyboard has no automatic ducking option.
101
127
 
@@ -111,7 +137,46 @@ Each cue has required `id`, `at` and `action`. Cues run independently of the seq
111
137
  | `boundary` | Yes | `start` uses the first aligned unit's start. `end` uses the last aligned unit's end. |
112
138
  | `offset_ms` | Yes | Number added to that boundary. Negative values lead the phrase, positive values delay the action. |
113
139
 
114
- The cue's `action` is `slide`, `reveal` or `play`, with the same fields as a sequential visual action except it has no nested `id`. The cue's own ID identifies the action. `speak` and `hold` are not cue actions.
140
+ The cue's `action` is `slide`, `reveal` or `play`, with the same fields as a sequential visual action except it has no nested `id`. The cue's own ID identifies the action. `hold` is not a cue action; `speak` is allowed only on media-anchored cues.
141
+
142
+ ### Video-anchored cues
143
+
144
+ A cue or annotation `at` can also anchor to a scene `play` action using `{ media, time_ms, play?, offset_ms? }` instead of a phrase cue:
145
+
146
+ | `at` field | Required | Meaning |
147
+ | --- | --- | --- |
148
+ | `media` | Yes | Declared media ID played by a scene `play` action. |
149
+ | `time_ms` | Yes | Nonnegative source timestamp inside the clip's `[trim_start_ms, trim_end_ms]` window. |
150
+ | `play` | No | Scene `play` action ID. Required when the same `media` is played more than once. |
151
+ | `offset_ms` | No | Optional millisecond offset added to `time_ms`. |
152
+
153
+ Media-anchored cues support `speak`, `reveal`, `slide`, and `play` actions. A media-anchored `speak` cue also accepts optional `align: { phrase, occurrence?, boundary, offset_ms? }` to land a specific spoken phrase boundary on `time_ms` using TTS alignment (`speak.start_ms = target_ms - phrase_offset_ms`). Each narration segment must still be scheduled exactly once across `scenes[].actions` and `cues`. When `overflow: freeze` or `overflow: fit_video` splits or adjusts the clip, media-anchored `reveal` cues and `annotations` shift in lockstep with the resolved video slices.
154
+
155
+ Example of a beat-synced screen recording with `overflow: freeze` and phrase-to-frame alignment:
156
+
157
+ ```yaml
158
+ scenes:
159
+ - id: walkthrough
160
+ slide: demo
161
+ actions:
162
+ - id: play-demo
163
+ type: play
164
+ media: demo-video
165
+ audio: muted
166
+ volume: 0
167
+ overflow: freeze
168
+ cues:
169
+ - id: say-open
170
+ at: { media: demo-video, time_ms: 0 }
171
+ action: { type: speak, segment: beat-1 }
172
+ - id: say-deploy
173
+ at: { media: demo-video, time_ms: 6400 }
174
+ align: { phrase: "click Deploy", boundary: start }
175
+ action: { type: speak, segment: beat-2 }
176
+ - id: reveal-callout
177
+ at: { media: demo-video, time_ms: 6400 }
178
+ action: { type: reveal, click: 1, duration_ms: 300 }
179
+ ```
115
180
 
116
181
  The resolved start is the narration segment's scheduled start plus its aligned phrase boundary plus `offset_ms`. The action starts at that time. For slide and reveal actions, `duration_ms` is a settling allowance, not an instruction to complete at the phrase boundary.
117
182
 
@@ -134,7 +199,7 @@ The storyboard reserves intended durations. The resolved schedule establishes ex
134
199
  | Slide targets | Authored frontmatter `name`, otherwise `slide-<one-based effective index>`. Imports and filtering affect that index. | Unique native `Slide.Name`, or unambiguous `slide-<SlideID>`. SlideID is not the slide position. Names must also fit the YAML target syntax. |
135
200
  | Reveals | Native click-driven content, such as `v-click`. Steps advance and must fit known or runtime-checked bounds. | Consecutive finite `MainSequence` click groups (entrance, emphasis, exit, and motion presets). The declared duration must cover the complete native group. |
136
201
  | Slide changes | Authored deck transition, with a matching settling allowance. | Cuts or finite native slide transitions, plus optional automatic pre-click entry animations. Timed advancement, hidden slides, and interactive sequences are unsupported. |
137
- | Video | Managed media element with a matching declared source. Trims and rates follow the shared action contract. | Embedded video at rate `1` with exact source-byte matching and optional storyboard `trim_start_ms` / `trim_end_ms`. No native trim, autoplay, loop, rewind, or fullscreen transform. |
202
+ | Video | Managed media element with a matching declared source. Trims, rates, video-anchored cues, and `overflow` policies follow the shared action contract. | Embedded video at rate `1` and `overflow: continuous` with exact source-byte matching and optional storyboard `trim_start_ms` / `trim_end_ms`. No native trim, autoplay, loop, rewind, or fullscreen transform. |
138
203
  | Runtime | Playwright-controlled Chromium and the playback addon. | Windows desktop PowerPoint and FFmpeg native window capture on an unlocked interactive desktop. |
139
204
  | Viewport and aspect ratio | Scales the deck to `--width` and `--height`, letterboxing when the aspect ratio differs from the slide canvas. | Scales the deck to `--width` and `--height`, letterboxing when the aspect ratio differs from the slide size and sizing the capture window dynamically to the monitor bounds. |
140
205
 
@@ -150,11 +150,41 @@ function Part-Hash($zip, [string]$name) {
150
150
  try { return [BitConverter]::ToString($sha.ComputeHash($stream)).Replace('-', '').ToLowerInvariant() }
151
151
  finally { $sha.Dispose(); $stream.Dispose() }
152
152
  }
153
+ function Read-SlideNotes($zip, [string]$slidePart, $slideRelations) {
154
+ $notesRelation = $null
155
+ foreach ($relationship in $slideRelations.Values) {
156
+ if ($relationship.GetAttribute('TargetMode') -ne 'External' -and $relationship.GetAttribute('Type').EndsWith('/notesSlide')) {
157
+ $notesRelation = $relationship
158
+ break
159
+ }
160
+ }
161
+ if ($null -eq $notesRelation) { return $null }
162
+ $notesPart = Part-Name $slidePart $notesRelation.GetAttribute('Target')
163
+ if ($null -eq $zip.GetEntry($notesPart)) { return $null }
164
+ $notesXml = Read-Part $zip $notesPart
165
+ $paragraphs = [Collections.Generic.List[string]]::new()
166
+ foreach ($shape in $notesXml.SelectNodes('//*[local-name()="sp"]')) {
167
+ $placeholder = $shape.SelectSingleNode('./*[local-name()="nvSpPr"]/*[local-name()="nvPr"]/*[local-name()="ph"][@type="body"]')
168
+ if ($null -eq $placeholder) { continue }
169
+ foreach ($paragraph in $shape.SelectNodes('./*[local-name()="txBody"]/*[local-name()="p"]')) {
170
+ $line = [Text.StringBuilder]::new()
171
+ foreach ($node in $paragraph.SelectNodes('.//*[local-name()="t" or local-name()="br"]')) {
172
+ if ($node.LocalName -eq 'br') { [void]$line.Append("`n") }
173
+ else { [void]$line.Append($node.InnerText) }
174
+ }
175
+ $paragraphs.Add($line.ToString())
176
+ }
177
+ }
178
+ $text = ([string]::Join("`n", $paragraphs.ToArray()) -replace "`r`n?", "`n").Trim()
179
+ if ($text.Length -eq 0) { return $null }
180
+ return $text
181
+ }
153
182
  function Read-Package([string]$file) {
154
183
  $zip = [IO.Compression.ZipFile]::OpenRead($file)
155
184
  $media = [Collections.Generic.List[object]]::new()
156
185
  $unsupported = [Collections.Generic.List[object]]::new()
157
186
  $targets = [Collections.Generic.List[object]]::new()
187
+ $notes = @{}
158
188
  try {
159
189
  foreach ($entry in $zip.Entries) {
160
190
  if ($entry.FullName.EndsWith('.rels')) {
@@ -216,6 +246,8 @@ function Read-Package([string]$file) {
216
246
  $slideRels = Read-Part $zip $relationPart
217
247
  foreach ($relationship in $slideRels.DocumentElement.ChildNodes) { $slideRelations[$relationship.GetAttribute('Id')] = $relationship }
218
248
  }
249
+ $slideNotes = Read-SlideNotes $zip $part $slideRelations
250
+ if ($null -ne $slideNotes) { $notes[$nativeId] = $slideNotes }
219
251
  foreach ($picture in $slideXml.SelectNodes('//*[local-name()="pic"]')) {
220
252
  $video = $picture.SelectSingleNode('.//*[local-name()="videoFile"]')
221
253
  $audio = $picture.SelectSingleNode('.//*[local-name()="audioFile"]')
@@ -259,7 +291,7 @@ function Read-Package([string]$file) {
259
291
  if (($node.HasAttribute('repeatCount') -and $node.GetAttribute('repeatCount') -eq 'indefinite') -or ($node.HasAttribute('repeatDur') -and $node.GetAttribute('repeatDur') -eq 'indefinite')) { $unsupported.Add(@{ slide = [string]$nativeId; reason = 'Unbounded native animation repeats are unsupported.' }) }
260
292
  }
261
293
  }
262
- return @{ media = @($media.ToArray()); unsupported = @($unsupported.ToArray()); targets = @($targets.ToArray()) }
294
+ return @{ media = @($media.ToArray()); unsupported = @($unsupported.ToArray()); targets = @($targets.ToArray()); notes = $notes }
263
295
  } finally { $zip.Dispose() }
264
296
  }
265
297
  function Open-PrivateDeck([bool]$visible) {
@@ -408,7 +440,9 @@ function Inspect-Native($package) {
408
440
  $shapes = @(Inspect-Shapes $slideId $slideWidth $slideHeight $slide.Shapes $targetsByKey $effectsByShape $false)
409
441
  $transitionEffect = [int]$slide.SlideShowTransition.EntryEffect
410
442
  $transitionDurationMs = $(if ($transitionEffect -ne 0) { [Math]::Round([double]$slide.SlideShowTransition.Duration * 1000) } else { 0 })
411
- $slides.Add(@{ id = $slideName; native_id = $slideId; index = [int]$slide.SlideIndex; effects = @($effects.ToArray()); shapes = $shapes; transition = $transitionEffect; transition_duration_ms = $transitionDurationMs; auto_advance = [int]$slide.SlideShowTransition.AdvanceOnTime; hidden = [int]$slide.SlideShowTransition.Hidden; interactive = [int]$slide.TimeLine.InteractiveSequences.Count })
443
+ $slideEntry = @{ id = $slideName; native_id = $slideId; index = [int]$slide.SlideIndex; effects = @($effects.ToArray()); shapes = $shapes; transition = $transitionEffect; transition_duration_ms = $transitionDurationMs; auto_advance = [int]$slide.SlideShowTransition.AdvanceOnTime; hidden = [int]$slide.SlideShowTransition.Hidden; interactive = [int]$slide.TimeLine.InteractiveSequences.Count }
444
+ if ($package.notes.ContainsKey($slideId)) { $slideEntry.notes = $package.notes[$slideId] }
445
+ $slides.Add($slideEntry)
412
446
  foreach ($shape in $slide.Shapes) {
413
447
  if ([int]$shape.Type -eq 16) {
414
448
  $videoShapeId = [int]$shape.Id