@softure-ai/marketing-kit 0.1.5 → 0.1.7
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 +49 -12
- package/dist/cli/main.js +15 -9
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/options.d.ts +14 -1
- package/dist/cli/options.d.ts.map +1 -1
- package/dist/cli/options.js +22 -9
- package/dist/cli/options.js.map +1 -1
- package/dist/cli/voice.d.ts +5 -0
- package/dist/cli/voice.d.ts.map +1 -1
- package/dist/cli/voice.js +28 -8
- package/dist/cli/voice.js.map +1 -1
- package/dist/compose/compose.d.ts +3 -3
- package/dist/compose/compose.d.ts.map +1 -1
- package/dist/compose/compose.js +7 -7
- package/dist/compose/compose.js.map +1 -1
- package/dist/compose/timeline.d.ts +19 -0
- package/dist/compose/timeline.d.ts.map +1 -1
- package/dist/compose/timeline.js +42 -0
- package/dist/compose/timeline.js.map +1 -1
- package/dist/config/config.d.ts +5 -0
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +3 -1
- package/dist/config/config.js.map +1 -1
- package/dist/config/day.d.ts +5 -0
- package/dist/config/day.d.ts.map +1 -0
- package/dist/config/day.js +10 -0
- package/dist/config/day.js.map +1 -0
- package/dist/config/schema.d.ts +9 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +22 -1
- package/dist/config/schema.js.map +1 -1
- package/dist/film.d.ts +3 -1
- package/dist/film.d.ts.map +1 -1
- package/dist/film.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/posts/posts.d.ts +2 -1
- package/dist/posts/posts.d.ts.map +1 -1
- package/dist/posts/posts.js +1 -1
- package/dist/posts/posts.js.map +1 -1
- package/dist/record/record.d.ts +1 -1
- package/dist/record/record.d.ts.map +1 -1
- package/dist/record/record.js +2 -2
- package/dist/record/record.js.map +1 -1
- package/dist/render/render.js +10 -10
- package/dist/render/render.js.map +1 -1
- package/dist/voice/batch.d.ts +28 -0
- package/dist/voice/batch.d.ts.map +1 -0
- package/dist/voice/batch.js +46 -0
- package/dist/voice/batch.js.map +1 -0
- package/dist/voice/cache.d.ts +11 -2
- package/dist/voice/cache.d.ts.map +1 -1
- package/dist/voice/cache.js +30 -5
- package/dist/voice/cache.js.map +1 -1
- package/dist/voice/elevenlabs.d.ts.map +1 -1
- package/dist/voice/elevenlabs.js +11 -1
- package/dist/voice/elevenlabs.js.map +1 -1
- package/dist/voice/pace.d.ts +22 -0
- package/dist/voice/pace.d.ts.map +1 -0
- package/dist/voice/pace.js +39 -0
- package/dist/voice/pace.js.map +1 -0
- package/dist/voice/produce.d.ts +8 -0
- package/dist/voice/produce.d.ts.map +1 -1
- package/dist/voice/produce.js +26 -5
- package/dist/voice/produce.js.map +1 -1
- package/dist/voice/provider.d.ts +2 -0
- package/dist/voice/provider.d.ts.map +1 -1
- package/dist/voice/provider.js.map +1 -1
- package/package.json +1 -1
- package/schema/marketing.schema.json +31 -0
- package/src/cli/main.ts +14 -9
- package/src/cli/options.ts +24 -7
- package/src/cli/voice.ts +28 -9
- package/src/compose/compose.ts +9 -9
- package/src/compose/timeline.ts +55 -0
- package/src/config/config.ts +9 -2
- package/src/config/day.ts +9 -0
- package/src/config/schema.ts +25 -1
- package/src/film.ts +3 -2
- package/src/index.ts +10 -2
- package/src/posts/posts.ts +3 -2
- package/src/record/record.ts +3 -3
- package/src/render/render.ts +10 -10
- package/src/voice/batch.ts +65 -0
- package/src/voice/cache.ts +33 -5
- package/src/voice/elevenlabs.ts +11 -1
- package/src/voice/pace.ts +55 -0
- package/src/voice/produce.ts +31 -6
- package/src/voice/provider.ts +2 -0
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ TTS providers (MK-7), screenshots (MK-4) and OG images (MK-5) build on it. Backg
|
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
18
|
softure-marketing all <video> # voiceover from the cache -> recording -> render -> post copy
|
|
19
|
-
softure-marketing voice <video
|
|
19
|
+
softure-marketing voice <video>... [--commit] # voiceovers in order; without --commit only the cost estimate
|
|
20
20
|
softure-marketing record <video> [--today=YYYY-MM-DD] [--url=...]
|
|
21
21
|
softure-marketing render <video> [--quality=draft|standard|high]
|
|
22
22
|
softure-marketing preview <video> # the composition in the hyperframes preview
|
|
@@ -30,10 +30,17 @@ the screen guard refused the recording (the screen did not show what the voiceov
|
|
|
30
30
|
|
|
31
31
|
- **`--commit`** is the only way to spend money: `voice` prints the cost estimate, then calls the
|
|
32
32
|
configured TTS provider (ElevenLabs, `ELEVENLABS_API_KEY` from the environment) and writes
|
|
33
|
-
`<key>.mp3` + `<key>.json` into `voice.cacheDir`. Commit them: the next render of the same text costs
|
|
33
|
+
`<video>/<key>.mp3` + `<video>/<key>.json` into `voice.cacheDir`. Commit them: the next render of the same text costs
|
|
34
34
|
nothing. `all` never pays; on a cache miss it prints the estimate and stops. See
|
|
35
35
|
[Voiceover providers and cost](#voiceover-providers-and-cost).
|
|
36
|
-
-
|
|
36
|
+
- **`voice` takes several videos** and records them in order: each paid call waits until `voice.minIntervalSeconds`
|
|
37
|
+
have passed since the newest recording in the cache, and the first failure stops the batch (the summary names
|
|
38
|
+
what was recorded, where it stopped and which videos were never sent). Without `--commit` the summary prints
|
|
39
|
+
the batch's characters and estimate, so the cost is known before paying. Use it instead of a shell loop: a
|
|
40
|
+
loop runs on after a failed call, and the provider sees every call it makes.
|
|
41
|
+
- **`--today`** records the app as of another day for one run; it overrides the video's `today`. Once a
|
|
42
|
+
voiceover is paid for, pin its day in the video's `today` instead, so a plain `all` reproduces the film in any
|
|
43
|
+
later month (the voiceover says numbers that depend on the day).
|
|
37
44
|
- **Server:** when the configured app does not answer, `record` starts `app.startCommand` in the config
|
|
38
45
|
folder on `app.port` and stops it afterwards (log in `<output.buildDir>/server.log`).
|
|
39
46
|
- Every command checks that the video's scene module exists (when it has one); `render`, `preview` and `all` also check
|
|
@@ -143,14 +150,17 @@ folder of `marketing.json`. A complete example: [examples/fixture/marketing.json
|
|
|
143
150
|
| `app` | `baseUrl`, `port`, `startCommand` | the running app, or the one the CLI starts (`startCommand` as arguments, no shell, `{port}` replaced) |
|
|
144
151
|
| | `colorScheme` (`light`), `hideSelectors` (`[]`), `screenGuardSelector` (`body`) | what the recording browser prefers; elements hidden while recording; the element whose text the screen guard reads |
|
|
145
152
|
| | `device` | the recording device: `kind` (`phone`, or `desktop` for a browser window in a 16:9 film), `viewport` `[width, height]` in CSS px (a desktop's at least 1024 wide, not taller than wide), `scale` (device pixels per CSS pixel), `mobile` (a phone's, default `true`; not allowed on a desktop); a video can override it |
|
|
146
|
-
| `voice` | `provider` (`elevenlabs`), `voiceId`, `model` (`eleven_multilingual_v2`), `language`, `tempo` (`1`, 0.8-1.3), `cacheDir` (`marketing/voiceover`) | the voiceover; text, voice, model and language make the cache key, the tempo is applied at build time |
|
|
153
|
+
| `voice` | `provider` (`elevenlabs`), `voiceId`, `model` (`eleven_multilingual_v2`), `language`, `tempo` (`1`, 0.8-1.3), `cacheDir` (`marketing/voiceover`), `minIntervalSeconds` (`60`, 0-3600, `0` off) | the voiceover; text, voice, model and language make the cache key, the tempo is applied at build time; paid calls are spaced by `minIntervalSeconds`, counted from the newest recording in the cache, so separate runs are spaced too |
|
|
147
154
|
| `videos[]` | `id`, `title`, `path`, `format` (`9:16`, or `1:1`, `16:9`), `device`, `voice` (`voiceId`, `model`, `tempo`) | a film and its overrides |
|
|
148
155
|
| | `persona`, `beats`, `hook`, `screenGuard`, `endCard` | the script, see [A film](#a-film) |
|
|
156
|
+
| | `hook.transition` (`fade`, or `rewind`, `cut`) | how the opening frame hands over to the scene |
|
|
157
|
+
| | `today` (`YYYY-MM-DD`) | the day the app is recorded as of; none: the day of the run; `--today` wins |
|
|
149
158
|
| | `beats[].actions`, `beats[].pad` | the scene as data, see [Scene actions](#scene-actions) |
|
|
150
159
|
| | `sceneModule` | instead of actions: the TS module exporting `scene` |
|
|
151
160
|
| `social` | `linkTemplate` | the link every post carries, `{code}` replaced by the platform's channel code |
|
|
152
161
|
| | `platforms` | `instagram`, `facebook`, `tiktok`, `youtube`, `linkedin`, `x`: `code`, `linkInBio` (true for Instagram, TikTok, YouTube) |
|
|
153
|
-
| | `posts[]` | `video`, `caption`, `hashtags`, `codes` (this video's own codes); a video without one gets no `posts.md` |
|
|
162
|
+
| | `posts[]` | `video`, `caption`, `hashtags`, `codes` (this video's own codes), `disclosure` (`true`; `false` leaves the disclosure out); a video without one gets no `posts.md` |
|
|
163
|
+
| | `disclosure` | a paragraph after every post's caption, before the link: that the persona is an example, that it is not advice, that the voice is AI-generated; `{persona}` becomes the video's persona name |
|
|
154
164
|
| `screenshots[]` | `id`, `path`, `width`, `height`, `full` (`false`), `expect`, `motion` (`reduce`), `minBytes` (`40000`), `scale` (`1`), `colorSchemes` | for `softure-marketing shots`, see [Screenshots](#screenshots) |
|
|
155
165
|
| `ogImages[]` | `id`, `template` (`headline-cta`, `headline-chart`), `size` (`[1200, 630]`), `data` | for `softure-marketing og`, see [OG images](#og-images) |
|
|
156
166
|
| `layout` | per layout (`9:16`, `1:1`, `16:9` for phone films; `desktop` for desktop films): `caption` (`top`, `left`, `right`, `fontSize`), `persona` (`top`, `left`, `right`), `endCard` (`top`, `left`, `right`, `headlineSize`, `phone.scale`, `phone.center`) | overrides of the layout's geometry table for every film of that layout, in frame px (`endCard.phone` is the browser window's pose in `desktop`); a missing key keeps the table's value. Values must fit the frame and each box's margins must leave at least 200 px for its text. The frame, the screen box and the camera target are fixed |
|
|
@@ -202,8 +212,14 @@ The fixture has the same film both ways in [examples/fixture/marketing.json](exa
|
|
|
202
212
|
`fixture-tour-actions` with actions, `fixture-tour` with the module
|
|
203
213
|
[examples/fixture/films/fixture-tour.ts](examples/fixture/films/fixture-tour.ts). Both record the same log.
|
|
204
214
|
|
|
205
|
-
- **`beats`**: the voiceover sentences. The first plays over the opening (a frame of the result
|
|
206
|
-
|
|
215
|
+
- **`beats`**: the voiceover sentences. The first plays over the opening (a frame of the result), the last
|
|
216
|
+
ends on the end card. Changing the text means a new, paid recording.
|
|
217
|
+
- **`hook.transition`**: how the opening frame hands over to the scene's first frame. `fade` (the default) is a
|
|
218
|
+
0.8 s cross-fade; `rewind` runs 0.8 s back through the scene in five key frames joined by dissolves; `cut`
|
|
219
|
+
starts the scene at once. Before 0.1.6 every film had a rewind of 24 blended frames that flickered; a film
|
|
220
|
+
rendered again now opens with a fade unless it asks for `rewind`.
|
|
221
|
+
- **`today`**: the day the app is recorded as of. Pin it to the day the voiceover's numbers were true, so the
|
|
222
|
+
screen guard keeps passing after the calendar moves.
|
|
207
223
|
- **`actions`** on every beat after the first: what happens on screen during that sentence (below).
|
|
208
224
|
- **`sceneModule`**, the escape hatch for a scene that needs logic: a TS module exporting `scene`
|
|
209
225
|
(typed `Scene`) that drives the Director itself: `d.beat(id, …, { pad })`, then the same methods as
|
|
@@ -275,29 +291,50 @@ changing it costs nothing.
|
|
|
275
291
|
|
|
276
292
|
| Run | What happens |
|
|
277
293
|
| --- | --- |
|
|
278
|
-
| the cache has `<key>.mp3` and `<key>.json` | `voiceover: from the cache <key>, nothing spent.` |
|
|
294
|
+
| the cache has `<video>/<key>.mp3` and `.json` (or, from 0.1.5 and earlier, `<key>.mp3` and `.json` in the cache root) | `voiceover: from the cache <key>, nothing spent.` |
|
|
279
295
|
| no cache, no `--commit` | `voiceover estimate (elevenlabs): 412 characters, at most 412 ElevenLabs credits.` and a dry-run line; no request is sent |
|
|
280
|
-
| no cache, `--commit` | the same estimate line **first**, then one paid request, then the files are written |
|
|
296
|
+
| no cache, `--commit` | the same estimate line **first**, a wait when the last paid recording is under `voice.minIntervalSeconds` old, then one paid request, the charge the provider reported (`voiceover: elevenlabs charged 175 ElevenLabs credits for 412 characters (the estimate was at most 412).`), then the files are written |
|
|
281
297
|
|
|
282
298
|
ElevenLabs bills per input character, at most one credit each; API plans may discount it, so the
|
|
283
|
-
estimate is an upper bound
|
|
299
|
+
estimate is an upper bound (FIRE_TRACKER paid about 0.42 credits per character). The real charge comes from the
|
|
300
|
+
`character-cost` response header; a provider that does not report one gets a line saying so. Providers available to `voice.provider`: `elevenlabs`. For tests, the
|
|
284
301
|
package exports `createFakeTtsProvider()` (deterministic audio, evenly spaced words, records its calls)
|
|
285
|
-
and `produceVoiceover({ cacheDir, input, provider, isCommit, log })
|
|
302
|
+
and `produceVoiceover({ cacheDir, input, provider, isCommit, pace, log })` (`produceVoiceovers` for a batch,
|
|
303
|
+
`waitForPace` for a project's own loop), so a project can test its films
|
|
286
304
|
without the network. A second real provider must add its id to the cache key, so that its recordings
|
|
287
305
|
never collide with ElevenLabs's under the same voice and model names.
|
|
288
306
|
|
|
307
|
+
### The cache layout
|
|
308
|
+
|
|
309
|
+
Each video keeps its recordings in its own folder, `<voice.cacheDir>/<video id>/<key>.mp3` and `<key>.json`, so a
|
|
310
|
+
reader sees which film a paid file belongs to. The key is unchanged from earlier versions, so nothing is recorded
|
|
311
|
+
again:
|
|
312
|
+
|
|
313
|
+
- A recording saved by 0.1.5 or earlier sits flat in `voice.cacheDir`. It is still found (the video's folder first,
|
|
314
|
+
then the flat file), and `voice`/`all` print where to move it; `git mv` both files into the video's folder.
|
|
315
|
+
- When the script changes, the new recording lands next to the old one, and `voice`/`all` list the files in the
|
|
316
|
+
folder the current script no longer uses. Delete them in git once no film needs them.
|
|
317
|
+
|
|
289
318
|
### Migrating FIRE_TRACKER's voiceover cache
|
|
290
319
|
|
|
291
320
|
FIRE's key hashed the same object with the language fixed to `pl`, and its words files have the same
|
|
292
321
|
format, so its paid recordings are reused as they are, with no re-keying and no new paid call:
|
|
293
322
|
|
|
294
|
-
1. Copy FIRE's voiceover folder (`<key>.mp3` + `<key>.json` pairs) into `voice.cacheDir
|
|
323
|
+
1. Copy FIRE's voiceover folder (`<key>.mp3` + `<key>.json` pairs) into `voice.cacheDir`, ideally into the folder of
|
|
324
|
+
the video each pair belongs to (`<voice.cacheDir>/<video id>/`); flat files are found too.
|
|
295
325
|
2. Set `voice.language` to `"pl"`, and `voice.voiceId` and `voice.model` (or a video's `voice`
|
|
296
326
|
override) to the values FIRE used.
|
|
297
327
|
3. Run `softure-marketing voice <video>` **without** `--commit` for every video. Each must print
|
|
298
328
|
`from the cache`; an estimate line means the text, voice or model differs from FIRE's, and nothing
|
|
299
329
|
was spent.
|
|
300
330
|
|
|
331
|
+
### Upgrading to 0.1.7
|
|
332
|
+
|
|
333
|
+
- A batch of voiceovers is one command: `voice a b c --commit` instead of a shell loop. Paid calls are spaced by
|
|
334
|
+
`voice.minIntervalSeconds` (default 60 s); set it to `0` to keep 0.1.6's back-to-back calls.
|
|
335
|
+
- A disclosure pasted into every caption moves to `social.disclosure` with `{persona}` for the name; delete it from
|
|
336
|
+
the captions, or the posts carry it twice.
|
|
337
|
+
|
|
301
338
|
## OG images
|
|
302
339
|
|
|
303
340
|
`softure-marketing og` renders each `ogImages` entry with [Satori](https://github.com/vercel/satori)
|
package/dist/cli/main.js
CHANGED
|
@@ -15,15 +15,15 @@ import { splitIntoBeats } from "../voice/voiceover.js";
|
|
|
15
15
|
import { CliFailure, fail } from "./failure.js";
|
|
16
16
|
import { loadFilm } from "./films.js";
|
|
17
17
|
import { writeOgImages } from "./og.js";
|
|
18
|
-
import { readOptions } from "./options.js";
|
|
18
|
+
import { getRecordingDay, readOptions } from "./options.js";
|
|
19
19
|
import { ensureServer } from "./server.js";
|
|
20
|
-
import { getVoiceoverPaths, produceVoiceover, readJson, requireVoiceover } from "./voice.js";
|
|
20
|
+
import { getVoiceoverPaths, produceVoiceover, produceVoiceovers, readJson, requireVoiceover } from "./voice.js";
|
|
21
21
|
/**
|
|
22
22
|
* `softure-marketing`: the only way into the films.
|
|
23
23
|
*
|
|
24
24
|
* all <film> voiceover from the cache -> recording -> render -> post copy
|
|
25
|
-
* voice <film
|
|
26
|
-
* record <film> [--today=YYYY-MM-DD] [--url=...]
|
|
25
|
+
* voice <film>... [--commit] voiceovers in order (paid only with --commit), spaced and stopped at the first error
|
|
26
|
+
* record <film> [--today=YYYY-MM-DD] [--url=...] (--today overrides the video's today)
|
|
27
27
|
* render <film> [--quality=draft|standard|high]
|
|
28
28
|
* preview <film>
|
|
29
29
|
* posts <film>
|
|
@@ -45,16 +45,17 @@ async function record(config, film, options) {
|
|
|
45
45
|
const voices = splitIntoBeats(voiceover.words, film.beats, film.voice.tempo);
|
|
46
46
|
const server = await ensureServer(config, film, options.url);
|
|
47
47
|
mkdirSync(getBuildDir(config, film), { recursive: true });
|
|
48
|
+
const recordingDay = getRecordingDay(options.today, film.today);
|
|
48
49
|
let log;
|
|
49
50
|
try {
|
|
50
|
-
console.log(`recording: ${server.url} frame by frame; this takes a few minutes.`);
|
|
51
|
+
console.log(`recording: ${server.url} frame by frame, the app as of ${recordingDay.day ?? "today"} (${recordingDay.source}); this takes a few minutes.`);
|
|
51
52
|
log = await recordFilm({
|
|
52
53
|
film,
|
|
53
54
|
url: server.url,
|
|
54
55
|
outDir: getBuildDir(config, film),
|
|
55
56
|
voices,
|
|
56
57
|
voiceoverKey: getVoiceoverPaths(config, film).key,
|
|
57
|
-
today:
|
|
58
|
+
today: recordingDay.day ?? undefined,
|
|
58
59
|
filmPath: film.scenePath,
|
|
59
60
|
executablePath: process.env.PLAYWRIGHT_CHROMIUM_PATH || undefined,
|
|
60
61
|
browser: {
|
|
@@ -195,11 +196,16 @@ async function main(argv) {
|
|
|
195
196
|
await shots(config, options);
|
|
196
197
|
return;
|
|
197
198
|
}
|
|
199
|
+
if (options.command === "voice") {
|
|
200
|
+
// Every film is loaded before the first paid call, so a typo in the fifth id costs nothing.
|
|
201
|
+
const films = [];
|
|
202
|
+
for (const id of options.filmIds)
|
|
203
|
+
films.push(await loadFilm(config, id));
|
|
204
|
+
await produceVoiceovers(config, films, options.isCommit);
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
198
207
|
const film = await loadFilm(config, options.filmId);
|
|
199
208
|
switch (options.command) {
|
|
200
|
-
case "voice":
|
|
201
|
-
await produceVoiceover(config, film, options.isCommit);
|
|
202
|
-
return;
|
|
203
209
|
case "record":
|
|
204
210
|
preflight(config, film, false);
|
|
205
211
|
await record(config, film, options);
|
package/dist/cli/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,mBAAmB,EAAwB,MAAM,qBAAqB,CAAC;AACtH,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAqB,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAwB,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAmB,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,WAAW,EAAuC,MAAM,cAAc,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,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OAAO,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC/E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/cli/options.d.ts
CHANGED
|
@@ -8,10 +8,13 @@ export declare const COMMANDS: readonly ["all", "voice", "record", "render", "pr
|
|
|
8
8
|
export type Command = (typeof COMMANDS)[number];
|
|
9
9
|
export interface FilmOptions {
|
|
10
10
|
command: Exclude<Command, "og" | "shots">;
|
|
11
|
+
/** The first film named; the only one for every command but `voice`. */
|
|
11
12
|
filmId: string;
|
|
13
|
+
/** Every film named, in order; `voice` takes several, the other commands one. */
|
|
14
|
+
filmIds: string[];
|
|
12
15
|
/** `voice` really pays for the voiceover only with `--commit`. */
|
|
13
16
|
isCommit: boolean;
|
|
14
|
-
/** The day the app counts from
|
|
17
|
+
/** The day the app counts from; overrides the video's `today` for one run. */
|
|
15
18
|
today?: string;
|
|
16
19
|
/** Another address of the recorded page. */
|
|
17
20
|
url?: string;
|
|
@@ -45,4 +48,14 @@ export type ReadOptionsResult = {
|
|
|
45
48
|
};
|
|
46
49
|
export declare const USAGE: string;
|
|
47
50
|
export declare function readOptions(argv: string[]): ReadOptionsResult;
|
|
51
|
+
/** The day a recording starts its page clock at, and where it came from. */
|
|
52
|
+
export type RecordingDay = {
|
|
53
|
+
day: string;
|
|
54
|
+
source: "--today" | "videos[].today";
|
|
55
|
+
} | {
|
|
56
|
+
day: null;
|
|
57
|
+
source: "the day of the run";
|
|
58
|
+
};
|
|
59
|
+
/** `--today` wins over the video's `today`; without either, the page clock starts now. */
|
|
60
|
+
export declare function getRecordingDay(flag: string | undefined, configured: string | null): RecordingDay;
|
|
48
61
|
//# sourceMappingURL=options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/cli/options.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/cli/options.ts"],"names":[],"mappings":"AACA,OAAO,EAAkC,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnF;;;;GAIG;AAEH,eAAO,MAAM,QAAQ,kFAAmF,CAAC;AAEzG,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;AAOhD,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,GAAG,OAAO,CAAC,CAAC;IAC1C,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,kEAAkE;IAClE,QAAQ,EAAE,OAAO,CAAC;IAClB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kEAAkE;IAClE,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,8DAA8D;AAC9D,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,IAAI,CAAC;IACd,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,mEAAmE;AACnE,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,SAAS,GAAG,YAAY,CAAC;AAEhE,MAAM,MAAM,iBAAiB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,UAAU,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjG,eAAO,MAAM,KAAK,QAWN,CAAC;AAUb,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,iBAAiB,CA6C7D;AA4BD,4EAA4E;AAC5E,MAAM,MAAM,YAAY,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,SAAS,GAAG,gBAAgB,CAAA;CAAE,GAAG;IAAE,GAAG,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,oBAAoB,CAAA;CAAE,CAAC;AAE/H,0FAA0F;AAC1F,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,YAAY,CAIjG"}
|
package/dist/cli/options.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isCalendarDay } from "../config/day.js";
|
|
1
2
|
import { DEFAULT_CONFIG_FILE, QUALITIES } from "../config/schema.js";
|
|
2
3
|
/**
|
|
3
4
|
* `softure-marketing <command> <film> [flags]` (and `og [image]`, `shots [<id>]`): argument parsing, kept apart from
|
|
@@ -13,8 +14,8 @@ export const USAGE = [
|
|
|
13
14
|
`Usage: softure-marketing <command> <film> [--config=${DEFAULT_CONFIG_FILE}]`,
|
|
14
15
|
"",
|
|
15
16
|
" all <film> voiceover from the cache -> recording -> render -> post copy",
|
|
16
|
-
" voice <film
|
|
17
|
-
" record <film> [--today=YYYY-MM-DD] [--url=...]",
|
|
17
|
+
" voice <film>... [--commit] voiceovers in order; without --commit it only counts the characters",
|
|
18
|
+
" record <film> [--today=YYYY-MM-DD] [--url=...] --today overrides the video's \"today\"",
|
|
18
19
|
" render <film> [--quality=draft|standard|high]",
|
|
19
20
|
" preview <film> open the composition in the hyperframes preview",
|
|
20
21
|
" posts <film> post copy for the configured platforms",
|
|
@@ -56,13 +57,17 @@ export function readOptions(argv) {
|
|
|
56
57
|
const filmId = positional[0];
|
|
57
58
|
if (filmId === undefined)
|
|
58
59
|
return { ok: false, error: `name the film, e.g. softure-marketing ${command} <film>.` };
|
|
59
|
-
if (positional.length > 1)
|
|
60
|
-
return { ok: false, error: `one film at a time, got ${positional.join(", ")}.` };
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
if (positional.length > 1 && command !== "voice")
|
|
61
|
+
return { ok: false, error: `one film at a time, got ${positional.join(", ")}; only voice takes several.` };
|
|
62
|
+
const badId = positional.find((id) => !FILM_ID.test(id));
|
|
63
|
+
if (badId !== undefined)
|
|
64
|
+
return { ok: false, error: `film name "${badId}": lowercase letters, digits and hyphens only.` };
|
|
65
|
+
const repeated = positional.find((id, index) => positional.indexOf(id) !== index);
|
|
66
|
+
if (repeated !== undefined)
|
|
67
|
+
return { ok: false, error: `film "${repeated}" is named twice.` };
|
|
63
68
|
const today = flags.get("today");
|
|
64
|
-
if (today !== undefined &&
|
|
65
|
-
return { ok: false, error: `--today=${today}: expected YYYY-MM-DD.` };
|
|
69
|
+
if (today !== undefined && !isCalendarDay(today))
|
|
70
|
+
return { ok: false, error: `--today=${today}: expected a real day as YYYY-MM-DD.` };
|
|
66
71
|
const quality = flags.get("quality");
|
|
67
72
|
if (quality !== undefined && !isQuality(quality))
|
|
68
73
|
return { ok: false, error: `--quality=${quality}: expected ${QUALITIES.join(" | ")}.` };
|
|
@@ -77,7 +82,7 @@ export function readOptions(argv) {
|
|
|
77
82
|
return { ok: false, error: "--url needs an address, e.g. --url=http://localhost:3000/calculator." };
|
|
78
83
|
return {
|
|
79
84
|
ok: true,
|
|
80
|
-
options: { command, filmId, isCommit: commit === "true", today, url, quality, configPath },
|
|
85
|
+
options: { command, filmId, filmIds: positional, isCommit: commit === "true", today, url, quality, configPath },
|
|
81
86
|
};
|
|
82
87
|
}
|
|
83
88
|
function readOgOptions(positional, flags, configPath) {
|
|
@@ -111,4 +116,12 @@ function readShotsOptions(positional, flags, configPath) {
|
|
|
111
116
|
return { ok: false, error: `--url=${url}: expected an address such as http://localhost:3000.` };
|
|
112
117
|
return { ok: true, options: { command: "shots", shotId, url, configPath } };
|
|
113
118
|
}
|
|
119
|
+
/** `--today` wins over the video's `today`; without either, the page clock starts now. */
|
|
120
|
+
export function getRecordingDay(flag, configured) {
|
|
121
|
+
if (flag !== undefined)
|
|
122
|
+
return { day: flag, source: "--today" };
|
|
123
|
+
if (configured !== null)
|
|
124
|
+
return { day: configured, source: "videos[].today" };
|
|
125
|
+
return { day: null, source: "the day of the run" };
|
|
126
|
+
}
|
|
114
127
|
//# sourceMappingURL=options.js.map
|
package/dist/cli/options.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/cli/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAgB,MAAM,qBAAqB,CAAC;AAEnF;;;;GAIG;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,CAAU,CAAC;AAIzG,MAAM,WAAW,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;AACpE,uEAAuE;AACvE,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AACtC,MAAM,OAAO,GAAG,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/cli/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAgB,MAAM,qBAAqB,CAAC;AAEnF;;;;GAIG;AAEH,MAAM,CAA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@ export declare function requireVoiceover(config: MarketingConfig, film: Film): V
|
|
|
11
11
|
* Without `--commit` it prints the cost estimate, spends nothing and returns null.
|
|
12
12
|
*/
|
|
13
13
|
export declare function produceVoiceover(config: MarketingConfig, film: Film, isCommit: boolean): Promise<Voiceover | null>;
|
|
14
|
+
/**
|
|
15
|
+
* `voice <film>...`: the films' voiceovers in order, paid calls spaced by `voice.minIntervalSeconds`. The first
|
|
16
|
+
* failure stops the batch; the summary names what was recorded, where it stopped and what was never sent.
|
|
17
|
+
*/
|
|
18
|
+
export declare function produceVoiceovers(config: MarketingConfig, films: Film[], isCommit: boolean): Promise<void>;
|
|
14
19
|
//# sourceMappingURL=voice.d.ts.map
|
package/dist/cli/voice.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["../../src/cli/voice.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAA2D,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["../../src/cli/voice.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAA2D,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAQjI,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAMnD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,GAAG,cAAc,CAErF;AAED,qFAAqF;AACrF,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAM9C;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,GAAG,SAAS,CAK/E;AAcD;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAIxH;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAMhH"}
|
package/dist/cli/voice.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { readFileSync } from "node:fs";
|
|
2
2
|
import { getVoiceoverPaths as getCachePaths, readCachedVoiceover } from "../voice/cache.js";
|
|
3
|
+
import { describeVoiceoverBatch, produceVoiceovers as produceBatch } from "../voice/batch.js";
|
|
3
4
|
import { produceVoiceover as produce } from "../voice/produce.js";
|
|
4
5
|
import { createTtsProvider } from "../voice/providers.js";
|
|
5
6
|
import { voiceoverText } from "../voice/voiceover.js";
|
|
@@ -8,7 +9,7 @@ function getTtsInput(film) {
|
|
|
8
9
|
return { text: voiceoverText(film.beats), voiceId: film.voice.voiceId, model: film.voice.modelId, language: film.voice.language };
|
|
9
10
|
}
|
|
10
11
|
export function getVoiceoverPaths(config, film) {
|
|
11
|
-
return getCachePaths(config.voice.cacheDir, getTtsInput(film));
|
|
12
|
+
return getCachePaths(config.voice.cacheDir, getTtsInput(film), film.id);
|
|
12
13
|
}
|
|
13
14
|
/** JSON from disk with the file name in the error, not a bare "Unexpected token". */
|
|
14
15
|
export function readJson(path) {
|
|
@@ -27,20 +28,39 @@ export function requireVoiceover(config, film) {
|
|
|
27
28
|
fail(`no voiceover for "${film.id}": run softure-marketing voice ${film.id} --commit first.`);
|
|
28
29
|
return cached.value;
|
|
29
30
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
* Without `--commit` it prints the cost estimate, spends nothing and returns null.
|
|
33
|
-
*/
|
|
34
|
-
export async function produceVoiceover(config, film, isCommit) {
|
|
35
|
-
const result = await produce({
|
|
31
|
+
function getProduceOptions(config, film, isCommit) {
|
|
32
|
+
return {
|
|
36
33
|
cacheDir: config.voice.cacheDir,
|
|
37
34
|
input: getTtsInput(film),
|
|
35
|
+
videoId: film.id,
|
|
38
36
|
provider: createTtsProvider(config.voice.provider, { env: process.env }),
|
|
39
37
|
isCommit,
|
|
38
|
+
pace: { minIntervalSeconds: config.voice.minIntervalSeconds },
|
|
40
39
|
log: (line) => console.log(line),
|
|
41
|
-
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The voiceover from the cache, or a paid recording from the configured provider with `--commit`.
|
|
44
|
+
* Without `--commit` it prints the cost estimate, spends nothing and returns null.
|
|
45
|
+
*/
|
|
46
|
+
export async function produceVoiceover(config, film, isCommit) {
|
|
47
|
+
const result = await produce(getProduceOptions(config, film, isCommit));
|
|
42
48
|
if (!result.ok)
|
|
43
49
|
fail(result.error);
|
|
44
50
|
return result.value.kind === "dry-run" ? null : result.value.voiceover;
|
|
45
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* `voice <film>...`: the films' voiceovers in order, paid calls spaced by `voice.minIntervalSeconds`. The first
|
|
54
|
+
* failure stops the batch; the summary names what was recorded, where it stopped and what was never sent.
|
|
55
|
+
*/
|
|
56
|
+
export async function produceVoiceovers(config, films, isCommit) {
|
|
57
|
+
const result = await produceBatch(films.map((film) => ({ id: film.id, options: getProduceOptions(config, film, isCommit) })));
|
|
58
|
+
if (films.length > 1)
|
|
59
|
+
console.log(["", ...describeVoiceoverBatch(result)].join("\n"));
|
|
60
|
+
if (result.failed === null)
|
|
61
|
+
return;
|
|
62
|
+
if (films.length > 1)
|
|
63
|
+
fail(`the batch stopped at ${result.failed.id}; ${result.notAttempted.length} ${result.notAttempted.length === 1 ? "film was" : "films were"} not sent. See above.`);
|
|
64
|
+
fail(result.failed.error);
|
|
65
|
+
}
|
|
46
66
|
//# sourceMappingURL=voice.js.map
|
package/dist/cli/voice.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voice.js","sourceRoot":"","sources":["../../src/cli/voice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAIvC,OAAO,EAAE,iBAAiB,IAAI,aAAa,EAAE,mBAAmB,EAAuC,MAAM,mBAAmB,CAAC;AACjI,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"voice.js","sourceRoot":"","sources":["../../src/cli/voice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAIvC,OAAO,EAAE,iBAAiB,IAAI,aAAa,EAAE,mBAAmB,EAAuC,MAAM,mBAAmB,CAAC;AACjI,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC9F,OAAO,EAAE,gBAAgB,IAAI,OAAO,EAAgC,MAAM,qBAAqB,CAAC;AAEhG,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAIpC,SAAS,WAAW,CAAC,IAAU;IAC7B,OAAO,EAAE,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;AACpI,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,MAAuB,EAAE,IAAU;IACnE,OAAO,aAAa,CAAC,MAAM,CA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MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,uBAAuB,CAAC,CAAC;IAC3L,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -6,9 +6,9 @@ import type { RecordingLog } from "../record/record.js";
|
|
|
6
6
|
import { type CameraPose, type Geometry } from "./timeline.js";
|
|
7
7
|
import type { BeatVoice } from "../voice/voiceover.js";
|
|
8
8
|
export interface ComposeAssets {
|
|
9
|
-
/** Screen recording (mp4 from frames), the
|
|
9
|
+
/** Screen recording (mp4 from frames), the transition clip (null for a cut), the opening frame, the last frame, the tempo-shifted voiceover. */
|
|
10
10
|
screen: string;
|
|
11
|
-
|
|
11
|
+
transition: string | null;
|
|
12
12
|
hookStill: string;
|
|
13
13
|
lastFrame: string;
|
|
14
14
|
voiceover: string;
|
|
@@ -70,7 +70,7 @@ export declare function resolveCameraTweens(tweens: CameraTween[]): ResolvedTwee
|
|
|
70
70
|
/** The film's timeline derived from the recording and the voiceover: one place for every time. */
|
|
71
71
|
export declare function filmTimes(film: Film, log: RecordingLog, voices: BeatVoice[]): {
|
|
72
72
|
hook: number;
|
|
73
|
-
|
|
73
|
+
transition: number;
|
|
74
74
|
firstFrame: number;
|
|
75
75
|
at: (frame: number) => number;
|
|
76
76
|
endCard: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/compose/compose.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAA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CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,IAAI,CAAC;IACX,GAAG,EAAE,YAAY,CAAC;IAClB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,EAAE;QAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;QAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAAA;KAAE,CAAC;IACjE,MAAM,EAAE,aAAa,CAAC;IACtB,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,iBAAiB,CAAC;CAC7B;AAED,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,UAAU,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAc,SAAQ,WAAW;IAChD,IAAI,EAAE,UAAU,CAAC;CAClB;AAKD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,aAAa,EAAE,CAoB1E;AA8DD,kGAAkG;AAClG,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE;;;;gBAYvD,MAAM,KAAG,MAAM;;;;;EAYnC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CA6NvD"}
|
package/dist/compose/compose.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { formatMessage } from "../messages/index.js";
|
|
2
|
-
import { BROWSER_BAR_HEIGHT, cameraPose, captionChunks, widePose } from "./timeline.js";
|
|
2
|
+
import { BROWSER_BAR_HEIGHT, cameraPose, captionChunks, getTransitionSeconds, widePose } from "./timeline.js";
|
|
3
3
|
/**
|
|
4
4
|
* HyperFrames composition from the recording: the phone (or, for a desktop recording, a browser window) with the real screen, a camera that follows
|
|
5
5
|
* the thumb, a touch marker, captions in one place, the persona card, an opening from the result
|
|
6
|
-
* frame with
|
|
6
|
+
* frame with its transition into the scene (fade, rewind or cut), the end card and sounds.
|
|
7
7
|
*
|
|
8
8
|
* HyperFrames 0.8.85 contract: a root with `data-composition-id`, clips with
|
|
9
9
|
* `data-start`/`data-duration`, `<audio>` with an `id`, a GSAP timeline `{ paused: true }` under
|
|
@@ -14,7 +14,6 @@ const COMPOSITION_ID = "film";
|
|
|
14
14
|
/** Pause before the first word of the opening. */
|
|
15
15
|
const HOOK_LEAD = 0.3;
|
|
16
16
|
const HOOK_MIN = 3.8;
|
|
17
|
-
const REWIND = 0.8;
|
|
18
17
|
const END_TAIL = 1.6;
|
|
19
18
|
/** The end card enters this long after the start of the last sentence. */
|
|
20
19
|
const END_CARD_DELAY = 0.9;
|
|
@@ -119,7 +118,8 @@ export function filmTimes(film, log, voices) {
|
|
|
119
118
|
if (firstBeat === undefined || last === undefined)
|
|
120
119
|
throw new Error("The recording has no sentences: record the film again (softure-marketing record).");
|
|
121
120
|
const firstFrame = firstBeat.f0;
|
|
122
|
-
const
|
|
121
|
+
const transition = getTransitionSeconds(film.hook.transition);
|
|
122
|
+
const offset = hook + transition - firstFrame / log.fps;
|
|
123
123
|
const at = (frame) => r3(frame / log.fps + offset);
|
|
124
124
|
const lastVoice = voice.get(last.id);
|
|
125
125
|
if (lastVoice === undefined)
|
|
@@ -133,7 +133,7 @@ export function filmTimes(film, log, voices) {
|
|
|
133
133
|
if (unplaced.length > 0) {
|
|
134
134
|
throw new Error(`The recording has no sentences ${unplaced.join(", ")}: record the film again (softure-marketing record).`);
|
|
135
135
|
}
|
|
136
|
-
return { hook,
|
|
136
|
+
return { hook, transition, firstFrame, at, endCard, end, screenEnd: at(log.frames), voiceStart };
|
|
137
137
|
}
|
|
138
138
|
export function composeFilm(input) {
|
|
139
139
|
const { film, log, voices, colors, geometry, fonts, assets, brandName, locale, messages } = input;
|
|
@@ -253,7 +253,7 @@ export function composeFilm(input) {
|
|
|
253
253
|
.map((s, i) => `<audio id="sfx${i}" src="${escapeHtml(s.src)}" data-start="${r3(s.t)}" data-duration="${s.dur}" data-volume="${s.volume}"></audio>`)
|
|
254
254
|
.join("\n ");
|
|
255
255
|
const personaOut = log.cues.find((cue) => cue.name === "persona-out");
|
|
256
|
-
const screenStart = r3(times.hook + times.
|
|
256
|
+
const screenStart = r3(times.hook + times.transition);
|
|
257
257
|
const screenDuration = r3(times.screenEnd - screenStart);
|
|
258
258
|
const tail = r3(Math.max(0.04, times.end - times.screenEnd));
|
|
259
259
|
const c = colors;
|
|
@@ -313,7 +313,7 @@ ${windowParts.css}
|
|
|
313
313
|
${windowParts.open}
|
|
314
314
|
<div class="screen">
|
|
315
315
|
<img id="hook" class="clip" src="${assets.hookStill}" data-start="0" data-duration="${times.hook}" />
|
|
316
|
-
|
|
316
|
+
${assets.transition === null || times.transition === 0 ? "" : `<video id="transition" class="clip" src="${assets.transition}" data-start="${times.hook}" data-duration="${times.transition}" muted playsinline></video>`}
|
|
317
317
|
<video id="recording" class="clip" src="${assets.screen}" data-start="${screenStart}" data-media-start="${r3(times.firstFrame / log.fps)}" data-duration="${screenDuration}" muted playsinline></video>
|
|
318
318
|
<img id="last" class="clip" src="${assets.lastFrame}" data-start="${times.screenEnd}" data-duration="${tail}" />
|
|
319
319
|
${taps.map((tap) => `<div class="touch" style="left:${tap.x}px;top:${tap.y}px"><div class="dot" id="td${tap.i}"></div><div class="ring" id="tr${tap.i}"></div></div>`).join("\n ")}
|