@aicopycoders/exodus 2026.11.1200-beta.15 → 2026.11.1200-beta.17
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/assets/skills/exodus-video/SKILL.md +38 -9
- package/assets/skills/exodus-video/scripts/first-cut.d.mts +28 -0
- package/assets/skills/exodus-video/scripts/first-cut.mjs +115 -38
- package/dist/commands/video-customer.d.ts +28 -0
- package/dist/commands/video-customer.js +17 -0
- package/dist/commands/video-swipe.d.ts +2 -0
- package/dist/commands/video-swipe.js +46 -14
- package/dist/commands/video.d.ts +14 -1
- package/dist/commands/video.js +47 -5
- package/package.json +1 -1
|
@@ -703,9 +703,9 @@ The rows:
|
|
|
703
703
|
"ugc-one-take" in the sheet before its next run.": set it only on their yes,
|
|
704
704
|
and say that the next run writes that ad again, which is paid. On an ad it
|
|
705
705
|
can't be made from, the write refuses it and says why. It buys a face photo,
|
|
706
|
-
a picture of the room, a cut-out of the product
|
|
707
|
-
|
|
708
|
-
key; it needs their ElevenLabs key and their Kie key. Its price is the
|
|
706
|
+
a picture of the room, a cut-out of the product, a picture of an animal when
|
|
707
|
+
the script puts one in the picture, and one take for each 15 or 25 seconds of
|
|
708
|
+
script, on the member's Kie key, and text calls on their model key; it needs their ElevenLabs key and their Kie key. Its price is the
|
|
709
709
|
server's estimate, known once the swipe is written: `exodus video swipe
|
|
710
710
|
sheet price <swipeId>` (free) prints it at 720p or a 480p draft, the whole
|
|
711
711
|
video or the first take only, each with the most it can cost. The "about"
|
|
@@ -720,10 +720,11 @@ The rows:
|
|
|
720
720
|
- **The saved sheet** (a kind that has one; One-take UGC today). The server
|
|
721
721
|
keeps one for each swipe of such a kind, made after its write. For such a
|
|
722
722
|
video this sheet's yes covers the write and its people only, and **It
|
|
723
|
-
buys:** says so: "<n> scripts now, each with <k> people to pick from
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
723
|
+
buys:** says so: "<n> scripts now, each with <k> people to pick from and
|
|
724
|
+
the animal when its script puts one in the picture (at most $<most> for each
|
|
725
|
+
script's people and animal); each video after your yes on its saved sheet",
|
|
726
|
+
with the people's part only when the dry write printed their price (People,
|
|
727
|
+
below). The saved sheet and its yes come in step 4.
|
|
727
728
|
- **People** (a kind whose write can make them: One-take UGC, when the
|
|
728
729
|
server offers people to pick from). Before you
|
|
729
730
|
send the sheet, run that video's write line (step 4) without `--yes`: it
|
|
@@ -732,7 +733,14 @@ The rows:
|
|
|
732
733
|
("About $… for new people: …" and "At most $… in all: …") and the line to
|
|
733
734
|
run: "On their yes, run the same command with --yes --people-max-usd
|
|
734
735
|
<most>". Put that most on the sheet, as above: the sheet's yes is the yes to
|
|
735
|
-
it.
|
|
736
|
+
it. The same price names the animal: "A picture of the animal, if the
|
|
737
|
+
script puts one in the picture: $…". With that yes, the write also reads the
|
|
738
|
+
stored script for an animal it puts in the picture (the dog in a dog
|
|
739
|
+
product's ad) and draws one picture of it with the people, inside the same
|
|
740
|
+
most. The saved sheet shows it on the row "The animal", with its picture;
|
|
741
|
+
`exodus video swipe sheet set <swipeId> animal=none` takes it out of the
|
|
742
|
+
video (free). With no animal in the script the row says "No animal in the
|
|
743
|
+
script." and no picture is paid for. When the member gave a money limit and the people's most, added over
|
|
736
744
|
every video on the sheet, is already over it, say so on the sheet and ask:
|
|
737
745
|
no write goes out until what it can cost fits. When it prints no people's
|
|
738
746
|
price, the write makes none. When the member
|
|
@@ -913,6 +921,20 @@ only (`takes=first`), you may name it as a smaller thing they can choose,
|
|
|
913
921
|
never as the whole video. The `--max-usd` you start with is the "at most" the
|
|
914
922
|
price shows, so it is never above what is left of the member's limit.
|
|
915
923
|
|
|
924
|
+
**A video that reached its estimate.** A regular video (not One-take) keeps
|
|
925
|
+
the estimate it showed before the start. When its next take would cost more
|
|
926
|
+
than that, it stops before ordering it and waits for the member. `exodus
|
|
927
|
+
video status` then prints a line that starts "Waiting for you:", with what
|
|
928
|
+
the video has cost so far, its estimate, what it wants to film next and
|
|
929
|
+
about what that costs, and under it two commands: `exodus video keep-going
|
|
930
|
+
<runId>` and `exodus video stop-here <runId>`. That choice is the member's,
|
|
931
|
+
never yours: show them that line word for word, and run the command they
|
|
932
|
+
pick only after they answer. A money limit they gave you, or a `--max-usd`,
|
|
933
|
+
does not answer it for them. Nothing is paid while it waits, and it waits
|
|
934
|
+
until they answer. Keep going films on and asks again if it passes the next
|
|
935
|
+
whole estimate. Stop here orders nothing more: each scene keeps the clip it
|
|
936
|
+
has, and a scene with none is named; status says what was kept.
|
|
937
|
+
|
|
916
938
|
A write that carried the people's most makes the first people to pick from
|
|
917
939
|
(People, step 3). Offer more people, or voices to pick from, only when the
|
|
918
940
|
member asks for options. More people are paid on the member's keys: run
|
|
@@ -964,7 +986,10 @@ every video has started:
|
|
|
964
986
|
write: its yes carried no --people-max-usd. See their price (free): …".
|
|
965
987
|
With the figure, the write waits for the people (a line ending "Waiting for
|
|
966
988
|
them, up to 5 minutes."), then prints how their ask ended and each person
|
|
967
|
-
with their picture's address.
|
|
989
|
+
with their picture's address. The animal, when the script puts one in the
|
|
990
|
+
picture, is on the saved sheet's row "The animal" a few minutes later
|
|
991
|
+
(`exodus video swipe sheet <swipeId>` shows it with its picture's address);
|
|
992
|
+
a start waits for it while it is still being made. Show each person's name and picture. Read the
|
|
968
993
|
write's own lines; never assume one is recommended. When the ask names one
|
|
969
994
|
("Person N is recommended." and why), the write says "A start with no pick
|
|
970
995
|
films person N, the recommended one." When it names none, it says "… films
|
|
@@ -1611,6 +1636,10 @@ exodus video retry-clip <runId> --scene <n> [--node <nodeId>] [--note "…"] [--
|
|
|
1611
1636
|
exodus video revoice <runId> --all | --scene <n> redo only the voice; no new video
|
|
1612
1637
|
exodus video keep <runId> --scene <n> keep a held scene as it is; orders nothing;
|
|
1613
1638
|
only after the member's yes
|
|
1639
|
+
exodus video keep-going <runId> a video waiting at its estimate films on;
|
|
1640
|
+
only after the member's own yes
|
|
1641
|
+
exodus video stop-here <runId> a video waiting at its estimate orders nothing
|
|
1642
|
+
more; only on the member's own answer
|
|
1614
1643
|
… make the cut (your choice of tool)
|
|
1615
1644
|
exodus video upload <runId> --file ./ad-<runId>/cut.mp4 attach it
|
|
1616
1645
|
exodus video review <runId> --file ./ad-<runId>/cut.mp4 --accept | --reject
|
|
@@ -98,6 +98,34 @@ export class SourceMapRefusal extends FirstCutError {
|
|
|
98
98
|
readonly findings: SourceMapFinding[];
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
/** A heard word on the cut's clock before its speed-up. */
|
|
102
|
+
export interface CutWordRow { text: string; start: number; end: number; scene: number }
|
|
103
|
+
|
|
104
|
+
/** #4585: the heard words the end card would cover; empty with no card or when every word ends before it. */
|
|
105
|
+
export function voiceUnderEndCard(rows: CutWordRow[], endCard: { in: number } | null): CutWordRow[];
|
|
106
|
+
|
|
107
|
+
/** #4585: the staff message of a cut refused because the end card would cover some of its voice. */
|
|
108
|
+
export function voiceUnderEndCardMessage(words: CutWordRow[]): string;
|
|
109
|
+
|
|
110
|
+
/** #4585: the end card's place and length, after the last heard word; `holdSec` is how long the picture runs on under it. */
|
|
111
|
+
export function endCardLayersOf(
|
|
112
|
+
brand: unknown, storyboard: unknown, pictureSec: number, speed?: number, voiceEndSec?: number | null,
|
|
113
|
+
): { file: string; in: number; out: number; seconds: number; holdSec?: number } | null;
|
|
114
|
+
|
|
115
|
+
/** #4585: the seconds between the last heard word's end and the end card. */
|
|
116
|
+
export const END_CARD_AFTER_VOICE_SEC: number;
|
|
117
|
+
|
|
118
|
+
/** #4585: the end card on the cut, holding the last scene's picture under it; throws VoiceUnderEndCardRefusal when it would cover a word. */
|
|
119
|
+
export function placeEndCard(
|
|
120
|
+
timeline: unknown, brand: unknown, storyboard: unknown, pictureSec: number, speed: number, notes: string[],
|
|
121
|
+
): ReturnType<typeof endCardLayersOf>;
|
|
122
|
+
|
|
123
|
+
/** #4585: the end card would cover some of the cut's voice, so the cut is not delivered. */
|
|
124
|
+
export class VoiceUnderEndCardRefusal extends FirstCutError {
|
|
125
|
+
constructor(words: CutWordRow[]);
|
|
126
|
+
readonly words: CutWordRow[];
|
|
127
|
+
}
|
|
128
|
+
|
|
101
129
|
export interface SourceMapFinding {
|
|
102
130
|
/** "refuse" stops the cut and nothing is delivered; "declared" is a measured fact the cut carries out. */
|
|
103
131
|
severity: "refuse" | "declared";
|
|
@@ -2196,9 +2196,11 @@ function trimTemplateTerminalSilence(file, timeline, manifest, board, notes) {
|
|
|
2196
2196
|
if (Math.max(authoredEnd, reservedEnd, resolvedEnd) > silenceStart + 1 / FPS) notes.push(
|
|
2197
2197
|
`terminal-silence-authored: measured -50dB EOF silence starts ${silenceStart.toFixed(3)}s; ` +
|
|
2198
2198
|
`resolved picture/acting reservation retained through ${Math.max(authoredEnd, reservedEnd, resolvedEnd).toFixed(3)}s, not claimed observed`);
|
|
2199
|
+
// #4585: the end card is quiet after the voice on purpose, so a cut with one is never trimmed short of its end.
|
|
2200
|
+
const cardEnd = timeline.endCard ? Math.max(0, ...timeline.spine.map((seg) => seg.startSec + seg.seconds)) : 0;
|
|
2199
2201
|
const frames = Math.max(Math.ceil(silenceStart * FPS - 1e-6),
|
|
2200
2202
|
Math.floor((lastWord + .3) * FPS + 1e-6), Math.ceil(authoredEnd * FPS - 1e-6),
|
|
2201
|
-
Math.ceil(reservedEnd * FPS - 1e-6), Math.ceil(resolvedEnd * FPS - 1e-6));
|
|
2203
|
+
Math.ceil(reservedEnd * FPS - 1e-6), Math.ceil(resolvedEnd * FPS - 1e-6), Math.ceil(cardEnd * FPS - 1e-6));
|
|
2202
2204
|
if (frames >= media.picture.frames || frames <= 0) return false;
|
|
2203
2205
|
const endSec = frames / FPS;
|
|
2204
2206
|
const spine = timeline.spine.filter((seg) => seg.startSec < endSec).map((seg) => {
|
|
@@ -3996,9 +3998,12 @@ export function buildFfmpegArgs(timeline, { resolve, music, out, finish = null,
|
|
|
3996
3998
|
const [fadeIn, fadeOut] = [seg.fadeInSec ?? EDGE_FADE_SEC, seg.fadeOutSec ?? EDGE_FADE_SEC];
|
|
3997
3999
|
// A cubic rise keeps a reaction's quiet start near silent until its laugh (#2666).
|
|
3998
4000
|
const rise = fadeIn > EDGE_FADE_SEC ? ":curve=cub" : "";
|
|
4001
|
+
// #4585: the end card's held picture runs on in silence after the segment's own sound has faded out.
|
|
4002
|
+
const sounding = seg.seconds - (seg.endCardHoldSec ?? 0);
|
|
3999
4003
|
const fitLength =
|
|
4000
|
-
`apad,atrim=0:${sec(
|
|
4001
|
-
`afade=t=out:st=${sec(
|
|
4004
|
+
`apad,atrim=0:${sec(sounding)},afade=t=in:d=${sec(fadeIn)}${rise},` +
|
|
4005
|
+
`afade=t=out:st=${sec(sounding - fadeOut)}:d=${sec(fadeOut)}` +
|
|
4006
|
+
(seg.endCardHoldSec ? `,apad,atrim=0:${sec(seg.seconds)}` : "");
|
|
4002
4007
|
const fitSound = `${level},${fitLength}`;
|
|
4003
4008
|
if (seg.wholeVoice) {
|
|
4004
4009
|
filters.push(`anullsrc=r=48000:cl=stereo,atrim=0:${sec(seg.seconds)}[a${i}]`);
|
|
@@ -4100,25 +4105,28 @@ export function buildFfmpegArgs(timeline, { resolve, music, out, finish = null,
|
|
|
4100
4105
|
);
|
|
4101
4106
|
videoLabel = `pin${j}`;
|
|
4102
4107
|
});
|
|
4103
|
-
// endCardLayers: the brand's ground over the whole frame
|
|
4108
|
+
// endCardLayers: the brand's ground over the whole frame and the pack photo in its box, pushing in slowly, made as
|
|
4109
|
+
// one card on its own clock and dissolved in over the last picture (#4585: never the ground alone, never black).
|
|
4104
4110
|
if (finish?.endCard) {
|
|
4105
4111
|
const e = finish.endCard;
|
|
4106
4112
|
const box = END_CARD_PHOTO_BOX;
|
|
4107
4113
|
const w = even((box[2] - box[0]) * WIDTH);
|
|
4108
4114
|
const h = even((box[3] - box[1]) * HEIGHT);
|
|
4109
4115
|
const frames = Math.max(1, Math.round(e.seconds * FPS));
|
|
4110
|
-
const
|
|
4111
|
-
|
|
4112
|
-
filters.push(`
|
|
4116
|
+
const length = sec(e.out - e.in);
|
|
4117
|
+
const k = addInput("-loop", "1", "-t", length, "-i", resolve(e.file));
|
|
4118
|
+
filters.push(`color=c=0x${e.colors.background}:s=${WIDTH}x${HEIGHT}:r=${FPS}:d=${length},format=yuv420p[ecground]`);
|
|
4113
4119
|
filters.push(
|
|
4114
4120
|
`[${k}:v]fps=${FPS},scale=${w}:${h}:force_original_aspect_ratio=decrease,` +
|
|
4115
4121
|
`pad=${w}:${h}:(ow-iw)/2:(oh-ih)/2:color=0x${e.colors.background},setsar=1,` +
|
|
4116
4122
|
`zoompan=z=1+${END_CARD_PUSH_IN}*on/${frames}:x=iw/2-(iw/zoom/2):y=ih/2-(ih/zoom/2):d=1:s=${w}x${h}:fps=${FPS},` +
|
|
4117
|
-
`format=yuv420p
|
|
4123
|
+
`format=yuv420p[ecpic]`,
|
|
4118
4124
|
);
|
|
4119
4125
|
filters.push(
|
|
4120
|
-
`[
|
|
4126
|
+
`[ecground][ecpic]overlay=x=${Math.round(box[0] * WIDTH)}:y=${Math.round(box[1] * HEIGHT)},` +
|
|
4127
|
+
`format=yuva420p,fade=t=in:st=0:d=${END_CARD_FADE_SEC}:alpha=1,setpts=PTS-STARTPTS+${sec(e.in)}/TB[ecbody]`,
|
|
4121
4128
|
);
|
|
4129
|
+
filters.push(`[${videoLabel}][ecbody]overlay=enable=between(t\\,${sec(e.in)}\\,${sec(e.out)}):eof_action=pass[ecard]`);
|
|
4122
4130
|
videoLabel = "ecard";
|
|
4123
4131
|
}
|
|
4124
4132
|
const speed = finish?.speed > 1 ? finish.speed : null;
|
|
@@ -4340,7 +4348,8 @@ export function sceneTimes(timeline, exact = false) {
|
|
|
4340
4348
|
.filter((c) => c.seconds > 0)
|
|
4341
4349
|
.map((c) => ({ from: c.startSec, to: c.startSec + c.seconds }));
|
|
4342
4350
|
const visible = timeline.spine.flatMap((seg) => {
|
|
4343
|
-
|
|
4351
|
+
// #4585: the picture held under the end card is the card's, not the scene's.
|
|
4352
|
+
let pieces = [{ from: seg.startSec, to: seg.startSec + seg.seconds - (seg.endCardHoldSec ?? 0) }];
|
|
4344
4353
|
for (const c of covers) {
|
|
4345
4354
|
pieces = pieces.flatMap((p) =>
|
|
4346
4355
|
c.to <= p.from || c.from >= p.to
|
|
@@ -4917,40 +4926,45 @@ export function sourceAdPaceShots(sourceAd) {
|
|
|
4917
4926
|
}
|
|
4918
4927
|
|
|
4919
4928
|
/**
|
|
4920
|
-
*
|
|
4921
|
-
*
|
|
4922
|
-
* (`packPhoto`, a file in the folder), the product's name, the scenes whose
|
|
4923
|
-
* picture the pull's rule draws from that photo (`photoScenes`), the end
|
|
4924
|
-
* card's length and the brand's colours (hex), each optional. Null when the
|
|
4925
|
-
* manifest has none, so a cut without it is the one it always was.
|
|
4929
|
+
* How long the end card shows, the same for every brand: Daniel's ruling on COP-309 (2026-11-14, #4585), "the card
|
|
4930
|
+
* comes up just after the last spoken word and shows for about 2 seconds, so nothing said is covered".
|
|
4926
4931
|
*/
|
|
4927
|
-
export const END_CARD_LAYERS_SEC =
|
|
4928
|
-
export const END_CARD_MIN_SEC = 5;
|
|
4929
|
-
export const END_CARD_MAX_SEC = 8;
|
|
4932
|
+
export const END_CARD_LAYERS_SEC = 2;
|
|
4930
4933
|
/** The end card's colours when the brand gives none: a near-black ground, white words, a white call-to-action box. */
|
|
4931
4934
|
export const END_CARD_COLORS = { background: "111111", text: "FFFFFF", accent: "FFFFFF" };
|
|
4932
4935
|
/** Where the pack photo sits on the end card, as shares of the frame, and how far it pushes in across the card. */
|
|
4933
4936
|
export const END_CARD_PHOTO_BOX = [0.1, 0.1, 0.9, 0.56];
|
|
4934
4937
|
export const END_CARD_PUSH_IN = 0.05;
|
|
4935
|
-
/**
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
+
/**
|
|
4939
|
+
* #4585: the card dissolves in over the last picture in END_CARD_FADE_SEC, so its ground never shows alone before the
|
|
4940
|
+
* photo, and its words build in one after another, this far apart, each fading in over END_CARD_WORD_FADE_MS, as the
|
|
4941
|
+
* dissolve ends. On a 2 s card the headline is fully on screen for 1.65 s, the offer 1.5 s, the call to action 1.35 s.
|
|
4942
|
+
*/
|
|
4943
|
+
const END_CARD_WORD_STEP_SEC = 0.15;
|
|
4944
|
+
const END_CARD_FADE_SEC = 0.2;
|
|
4945
|
+
const END_CARD_WORD_FADE_MS = 150;
|
|
4938
4946
|
/** A spoken call to action longer than this many words is too long to letter; the card then shows none. */
|
|
4939
4947
|
const END_CARD_CTA_MAX_WORDS = 8;
|
|
4940
4948
|
|
|
4941
4949
|
const hexColour = (value) => (typeof value === "string" && /^#?[0-9a-f]{6}$/i.test(value.trim()) ? value.trim().replace(/^#/, "").toUpperCase() : null);
|
|
4942
4950
|
|
|
4951
|
+
/**
|
|
4952
|
+
* endCardLayers and brandCheck (Plan 14): the manifest's `brand`, written by
|
|
4953
|
+
* the worker beside `finishing`: the product's pack photo it downloaded
|
|
4954
|
+
* (`packPhoto`, a file in the folder), the product's name, the scenes whose
|
|
4955
|
+
* picture the pull's rule draws from that photo (`photoScenes`) and the
|
|
4956
|
+
* brand's colours (hex), each optional. Null when the manifest has none, so a
|
|
4957
|
+
* cut without it is the one it always was.
|
|
4958
|
+
*/
|
|
4943
4959
|
export function brandOf(manifest) {
|
|
4944
4960
|
const b = manifest?.brand;
|
|
4945
4961
|
if (!b || typeof b !== "object") return null;
|
|
4946
4962
|
const text = (v) => (hasText(v) ? v.trim() : null);
|
|
4947
4963
|
const colors = b.colors && typeof b.colors === "object" ? b.colors : {};
|
|
4948
|
-
const seconds = Number.isFinite(b.endCardSec) ? Math.min(END_CARD_MAX_SEC, Math.max(END_CARD_MIN_SEC, b.endCardSec)) : END_CARD_LAYERS_SEC;
|
|
4949
4964
|
return {
|
|
4950
4965
|
packPhoto: text(b.packPhoto),
|
|
4951
4966
|
productName: text(b.productName),
|
|
4952
4967
|
photoScenes: Array.isArray(b.photoScenes) ? b.photoScenes.filter((n) => Number.isInteger(n)) : [],
|
|
4953
|
-
endCardSec: seconds,
|
|
4954
4968
|
colors: {
|
|
4955
4969
|
background: hexColour(colors.background) ?? END_CARD_COLORS.background,
|
|
4956
4970
|
text: hexColour(colors.text) ?? END_CARD_COLORS.text,
|
|
@@ -4983,28 +4997,81 @@ export function endCardWords(storyboard, productName = null) {
|
|
|
4983
4997
|
};
|
|
4984
4998
|
}
|
|
4985
4999
|
|
|
5000
|
+
/** #4585: the end card comes up this long after the last heard word ends. */
|
|
5001
|
+
export const END_CARD_AFTER_VOICE_SEC = 0.3;
|
|
5002
|
+
|
|
4986
5003
|
/**
|
|
4987
|
-
* endCardLayers: the ad's last
|
|
5004
|
+
* endCardLayers: the ad's last END_CARD_LAYERS_SEC seconds of screen time (`speed`
|
|
4988
5005
|
* is the cut's speed-up, applied after) become the end card: the brand's
|
|
4989
5006
|
* ground colour, the pack photo pushing in slowly, and the words drawn by
|
|
4990
|
-
* code over it.
|
|
4991
|
-
*
|
|
5007
|
+
* code over it. Never more than half the ad. Null without a pack photo.
|
|
5008
|
+
* #4585: the card never covers a heard word. When the last word (`voiceEndSec`,
|
|
5009
|
+
* on the cut's clock before the speed-up) ends inside those seconds, the card
|
|
5010
|
+
* comes up just after it, and `holdSec` is how much longer the picture must run
|
|
5011
|
+
* under the card so the card keeps its length.
|
|
4992
5012
|
*/
|
|
4993
|
-
export function endCardLayersOf(brand, storyboard, pictureSec, speed = 1) {
|
|
5013
|
+
export function endCardLayersOf(brand, storyboard, pictureSec, speed = 1, voiceEndSec = null) {
|
|
4994
5014
|
if (!brand?.packPhoto) return null;
|
|
4995
|
-
const seconds = Math.min(
|
|
5015
|
+
const seconds = Math.min(END_CARD_LAYERS_SEC * speed, pictureSec / 2);
|
|
4996
5016
|
if (!(seconds > 0)) return null;
|
|
4997
|
-
|
|
5017
|
+
// Only a card that would cover a word moves; one that comes up after the last word stays where it was.
|
|
5018
|
+
const waits = Number.isFinite(voiceEndSec) && voiceEndSec > Math.max(0, pictureSec - seconds) + 1e-3;
|
|
5019
|
+
const afterVoice = waits ? voiceEndSec + END_CARD_AFTER_VOICE_SEC : 0;
|
|
5020
|
+
const at = roundMs(Math.max(0, waits ? afterVoice : pictureSec - seconds));
|
|
5021
|
+
// Whole frames, so the held picture ends on the cut's own frame clock.
|
|
5022
|
+
const holdSec = waits ? Math.max(0, Math.ceil((at + seconds - pictureSec) * FPS - 1e-6)) / FPS : 0;
|
|
5023
|
+
const end = pictureSec + holdSec;
|
|
4998
5024
|
return {
|
|
4999
5025
|
file: brand.packPhoto,
|
|
5000
5026
|
in: at,
|
|
5001
|
-
out: roundMs(
|
|
5002
|
-
seconds: roundMs(
|
|
5027
|
+
out: roundMs(end + 1),
|
|
5028
|
+
seconds: roundMs(end - at),
|
|
5029
|
+
...(holdSec > 0 ? { holdSec } : {}),
|
|
5003
5030
|
words: endCardWords(storyboard, brand.productName),
|
|
5004
5031
|
colors: brand.colors,
|
|
5005
5032
|
};
|
|
5006
5033
|
}
|
|
5007
5034
|
|
|
5035
|
+
/**
|
|
5036
|
+
* #4585: the heard words the end card would cover, so they would play with no picture of their scene. Each is a word
|
|
5037
|
+
* row (the cut's clock before the speed-up). Empty with no card, or when every word ends before the card comes up.
|
|
5038
|
+
*/
|
|
5039
|
+
export function voiceUnderEndCard(rows, endCard) {
|
|
5040
|
+
return endCard ? rows.filter((r) => r.end > endCard.in + 1e-3) : [];
|
|
5041
|
+
}
|
|
5042
|
+
|
|
5043
|
+
/**
|
|
5044
|
+
* #4585: the end card on the cut. It comes up after the last heard word, and the last scene's picture runs on under it
|
|
5045
|
+
* (its sound faded out where it ends, then silence), so the card keeps its length. A cut laid on its measured map
|
|
5046
|
+
* cannot run on past its picture, so its card keeps the ad's last seconds. A card that would cover a heard word refuses
|
|
5047
|
+
* the cut (VoiceUnderEndCardRefusal). What it did goes in `notes`.
|
|
5048
|
+
*/
|
|
5049
|
+
export function placeEndCard(timeline, brand, storyboard, pictureSec, speed, notes) {
|
|
5050
|
+
const rows = wordRows(timeline);
|
|
5051
|
+
const voiceEndSec = timeline.mapped ? null : Math.max(...rows.map((r) => r.end));
|
|
5052
|
+
const card = endCardLayersOf(brand, storyboard, pictureSec, speed, voiceEndSec);
|
|
5053
|
+
if (card?.holdSec) {
|
|
5054
|
+
const last = timeline.spine.at(-1);
|
|
5055
|
+
last.endCardHoldSec = card.holdSec;
|
|
5056
|
+
last.holdSec = (last.holdSec ?? 0) + card.holdSec;
|
|
5057
|
+
last.seconds += card.holdSec;
|
|
5058
|
+
notes.push(`the end card waits for the last word, so the ad runs ${card.holdSec.toFixed(2)}s longer under it`);
|
|
5059
|
+
}
|
|
5060
|
+
const covered = voiceUnderEndCard(rows, card);
|
|
5061
|
+
if (covered.length > 0) throw new VoiceUnderEndCardRefusal(covered);
|
|
5062
|
+
if (card) timeline.endCard = { in: card.in, out: card.out };
|
|
5063
|
+
return card;
|
|
5064
|
+
}
|
|
5065
|
+
|
|
5066
|
+
/** The staff message of a cut refused because the end card would cover some of its voice (VoiceUnderEndCardRefusal). */
|
|
5067
|
+
export function voiceUnderEndCardMessage(words) {
|
|
5068
|
+
const scenes = [...new Set(words.map((r) => r.scene))].sort((a, b) => a - b);
|
|
5069
|
+
const named = scenes.length > 1 ? `scenes ${scenes.slice(0, -1).join(", ")} and ${scenes.at(-1)}` : `scene ${scenes[0]}`;
|
|
5070
|
+
const from = Math.min(...words.map((r) => r.start));
|
|
5071
|
+
const to = Math.max(...words.map((r) => r.end));
|
|
5072
|
+
return `The end card would cover the voice of ${named} from ${from.toFixed(2)}s to ${to.toFixed(2)}s, so the cut was not attached`;
|
|
5073
|
+
}
|
|
5074
|
+
|
|
5008
5075
|
/** An ASS colour (&HAABBGGRR) from a hex RRGGBB. */
|
|
5009
5076
|
const assColour = (hex, alpha = "00") => `&H${alpha}${hex.slice(4, 6)}${hex.slice(2, 4)}${hex.slice(0, 2)}`;
|
|
5010
5077
|
|
|
@@ -5019,7 +5086,7 @@ function endCardStyles(colors, H) {
|
|
|
5019
5086
|
];
|
|
5020
5087
|
}
|
|
5021
5088
|
|
|
5022
|
-
/** The end card's words, building in one after another
|
|
5089
|
+
/** The end card's words, building in one after another as the card's dissolve ends. `at` writes a time of the cut's clock. */
|
|
5023
5090
|
function endCardDialogues(e, W, H, at = assTime) {
|
|
5024
5091
|
const rows = [
|
|
5025
5092
|
["EndHead", e.words.headline, 0.64],
|
|
@@ -5027,8 +5094,8 @@ function endCardDialogues(e, W, H, at = assTime) {
|
|
|
5027
5094
|
["EndCta", e.words.cta, 0.82],
|
|
5028
5095
|
].filter(([, words]) => hasText(words));
|
|
5029
5096
|
return rows.map(([style, words, y], k) => {
|
|
5030
|
-
const from = roundMs(e.in +
|
|
5031
|
-
return `Dialogue: 5,${at(from)},${at(e.out)},${style},,0,0,0,,{\\pos(${W / 2},${Math.round(H * y)})\\fad(
|
|
5097
|
+
const from = roundMs(e.in + END_CARD_FADE_SEC + k * END_CARD_WORD_STEP_SEC);
|
|
5098
|
+
return `Dialogue: 5,${at(from)},${at(e.out)},${style},,0,0,0,,{\\pos(${W / 2},${Math.round(H * y)})\\fad(${END_CARD_WORD_FADE_MS},0)}${assText(words)}`;
|
|
5032
5099
|
});
|
|
5033
5100
|
}
|
|
5034
5101
|
|
|
@@ -5339,11 +5406,12 @@ export function takesOf(timeline, plans, speed = 1) {
|
|
|
5339
5406
|
const last = takes.at(-1);
|
|
5340
5407
|
const endsOnReaction = Boolean(timeline.spine[i + 1]?.reaction);
|
|
5341
5408
|
if (last && last.n === seg.sceneIndex && last.lastSeg === i - 1) {
|
|
5342
|
-
Object.assign(last, { takeSec: last.takeSec + seg.seconds, lastSeg: i, endsOnReaction });
|
|
5409
|
+
Object.assign(last, { takeSec: last.takeSec + seg.seconds - (seg.endCardHoldSec ?? 0), lastSeg: i, endsOnReaction });
|
|
5343
5410
|
return;
|
|
5344
5411
|
}
|
|
5412
|
+
// #4585: the picture held under the end card is not the take's.
|
|
5345
5413
|
takes.push({
|
|
5346
|
-
n: seg.sceneIndex, start: seg.startSec, takeSec: seg.seconds, dialogue: seg.audio === "clip",
|
|
5414
|
+
n: seg.sceneIndex, start: seg.startSec, takeSec: seg.seconds - (seg.endCardHoldSec ?? 0), dialogue: seg.audio === "clip",
|
|
5347
5415
|
planSec: plans.get(seg.sceneIndex)?.durationSec ?? 0, lastSeg: i, endsOnReaction,
|
|
5348
5416
|
});
|
|
5349
5417
|
});
|
|
@@ -5857,6 +5925,15 @@ function mediaReader(here, exists) {
|
|
|
5857
5925
|
export const sourceMapPath = (outPath) =>
|
|
5858
5926
|
path.join(path.dirname(outPath), `${path.basename(outPath, path.extname(outPath))}.source-map.json`);
|
|
5859
5927
|
|
|
5928
|
+
/** #4585: the end card would cover some of the cut's voice (voiceUnderEndCard), so the cut is not delivered. */
|
|
5929
|
+
export class VoiceUnderEndCardRefusal extends FirstCutError {
|
|
5930
|
+
constructor(words) {
|
|
5931
|
+
super(1, voiceUnderEndCardMessage(words));
|
|
5932
|
+
this.name = "VoiceUnderEndCardRefusal";
|
|
5933
|
+
this.words = words;
|
|
5934
|
+
}
|
|
5935
|
+
}
|
|
5936
|
+
|
|
5860
5937
|
/** A required text/fulfillment obligation cannot be claimed as delivered. */
|
|
5861
5938
|
export class TextFinishRefusal extends FirstCutError {
|
|
5862
5939
|
constructor(holds) {
|
|
@@ -6995,7 +7072,7 @@ export function firstCut({ dir, out: outOpt, skip = new Set(), music: musicOn =
|
|
|
6995
7072
|
const packPhoto = Boolean(brand?.packPhoto) && exists(brand.packPhoto);
|
|
6996
7073
|
let endLayers = null;
|
|
6997
7074
|
if (finish?.endCardLayers) {
|
|
6998
|
-
endLayers = packPhoto ?
|
|
7075
|
+
endLayers = packPhoto ? placeEndCard(timeline, brand, storyboard, pictureSec, speed, notes) : null;
|
|
6999
7076
|
if (!endLayers) notes.push("the pull has no pack photo of the product, so the end card was not drawn");
|
|
7000
7077
|
}
|
|
7001
7078
|
if (finish && (finish.captions || finish.cards || endLayers) && !stagedText) {
|
|
@@ -86,7 +86,35 @@ export interface CustomerRun {
|
|
|
86
86
|
sentence: string;
|
|
87
87
|
take: boolean;
|
|
88
88
|
}>;
|
|
89
|
+
spend?: {
|
|
90
|
+
spentUsd: number;
|
|
91
|
+
estimateUsd: number | null;
|
|
92
|
+
final: boolean;
|
|
93
|
+
line: string;
|
|
94
|
+
};
|
|
95
|
+
spendAsk?: {
|
|
96
|
+
sentence: string;
|
|
97
|
+
};
|
|
98
|
+
spendWentOn?: {
|
|
99
|
+
sentence: string;
|
|
100
|
+
};
|
|
101
|
+
spendStopped?: {
|
|
102
|
+
sentence?: string;
|
|
103
|
+
};
|
|
89
104
|
}
|
|
105
|
+
export declare function spendAskLines(run: {
|
|
106
|
+
spendAsk?: {
|
|
107
|
+
sentence: string;
|
|
108
|
+
};
|
|
109
|
+
spendWentOn?: {
|
|
110
|
+
sentence: string;
|
|
111
|
+
};
|
|
112
|
+
spendStopped?: {
|
|
113
|
+
at?: number;
|
|
114
|
+
sentence?: string;
|
|
115
|
+
};
|
|
116
|
+
}, runId: string): string[];
|
|
117
|
+
export declare const SPEND_STOPPED_LINE = "You stopped this video at its estimate. Nothing more will be filmed.";
|
|
90
118
|
export declare function customerCutHeld(run: CustomerRun): boolean;
|
|
91
119
|
export interface ScriptTidied {
|
|
92
120
|
setAside: string[];
|
|
@@ -7,6 +7,21 @@ export function speechSummaryLines(speech) {
|
|
|
7
7
|
"speech-issue": "Speech issue — review required", unverified: "Speech not verified" };
|
|
8
8
|
return [labels[speech.status], ...speech.issues.map(speechIssueText)];
|
|
9
9
|
}
|
|
10
|
+
export function spendAskLines(run, runId) {
|
|
11
|
+
if (run.spendAsk) {
|
|
12
|
+
return [
|
|
13
|
+
`Waiting for you: ${run.spendAsk.sentence}`,
|
|
14
|
+
`Keep going: exodus video keep-going ${runId}`,
|
|
15
|
+
`Stop here: exodus video stop-here ${runId}`,
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
if (run.spendStopped)
|
|
19
|
+
return [run.spendStopped.sentence ?? SPEND_STOPPED_LINE];
|
|
20
|
+
if (run.spendWentOn)
|
|
21
|
+
return [run.spendWentOn.sentence];
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
export const SPEND_STOPPED_LINE = "You stopped this video at its estimate. Nothing more will be filmed.";
|
|
10
25
|
export function customerCutHeld(run) {
|
|
11
26
|
return (run.cutHolds?.length ?? 0) > 0;
|
|
12
27
|
}
|
|
@@ -172,6 +187,8 @@ export function customerStatusLines(run, dashboardUrl) {
|
|
|
172
187
|
run.mode === "guided" ? "Storyboard first" : "In one go",
|
|
173
188
|
"",
|
|
174
189
|
...customerStageLines(run, page),
|
|
190
|
+
...(run.spend ? [run.spend.line] : []),
|
|
191
|
+
...spendAskLines(run, run.runId),
|
|
175
192
|
...(run.scenes ?? []).flatMap(scene => scene.clip?.speech
|
|
176
193
|
? [`Scene ${scene.sceneIndex} speech:`, ...speechSummaryLines(scene.clip.speech).map(line => ` ${line}`)] : []),
|
|
177
194
|
"",
|
|
@@ -539,6 +539,8 @@ export declare function priceLines(price: SwipePrice, dashboardUrl: string): str
|
|
|
539
539
|
export declare function swipeSheetPriceFlow(swipeId: string, opts: SwipeOpts, deps: VideoDeps): Promise<FlowResult>;
|
|
540
540
|
export declare function swipeSheetPeopleFlow(swipeId: string, count: number | null, maxUsd: number | null, opts: SwipeRunOptions, deps: VideoDeps): Promise<FlowResult>;
|
|
541
541
|
export declare function swipeSheetVoicesFlow(swipeId: string, opts: SwipeOpts, deps: VideoDeps): Promise<FlowResult>;
|
|
542
|
+
export declare const ANIMAL_WAIT_LINE = "The animal the script puts in the picture is being found and drawn for this swipe. The start waits for it, until 5 minutes after the write asked for it, so the video films the one on the sheet and does not pay to find and draw it again.";
|
|
543
|
+
export declare const ANIMAL_GOES_ON_LINE = "The animal is still being found or drawn 5 minutes after the write asked for it, so the start goes on: the video looks for an animal in the script itself and draws one when it finds one.";
|
|
542
544
|
export declare const SWIPE_ALREADY_STARTED_CODE = "SWIPE_ALREADY_STARTED";
|
|
543
545
|
export declare function alreadyStartedOf(res: ApiResponse<unknown>): {
|
|
544
546
|
runId: string;
|
|
@@ -251,9 +251,9 @@ export function planSwipeCommand(rest, occurrences) {
|
|
|
251
251
|
return usage(`video swipe write --kind needs the key of a kind of ad. ${KIND_CHECKED}`);
|
|
252
252
|
const peopleMost = value("people-max-usd");
|
|
253
253
|
if (peopleMost === null)
|
|
254
|
-
return usage("video swipe write --people-max-usd needs the people's most the write showed, such as 1.
|
|
254
|
+
return usage("video swipe write --people-max-usd needs the people's most the write showed, such as 1.52.");
|
|
255
255
|
if (peopleMost !== undefined && !/^\d+(\.\d{1,2})?$/.test(peopleMost.trim())) {
|
|
256
|
-
return usage(`video swipe write --people-max-usd takes a dollar amount, such as 1.
|
|
256
|
+
return usage(`video swipe write --people-max-usd takes a dollar amount, such as 1.52 (got "${peopleMost}").`);
|
|
257
257
|
}
|
|
258
258
|
const noPeople = last("people")?.flag === "no-people";
|
|
259
259
|
if (peopleMost !== undefined && noPeople)
|
|
@@ -1153,7 +1153,7 @@ export async function swipeWriteFlow(breakdownId, ask, opts, deps) {
|
|
|
1153
1153
|
const out = progress(opts);
|
|
1154
1154
|
out.say("Writing the brand's version on the member's key. It takes four to nine minutes.");
|
|
1155
1155
|
if (ask.peopleMaxUsd !== undefined) {
|
|
1156
|
-
out.say(`Once the script is stored, the people to pick from are made, or taken from an earlier write of this ad with at most one check of their pictures paid; at most ${usd(ask.peopleMaxUsd)} on the member's keys.`);
|
|
1156
|
+
out.say(`Once the script is stored, the people to pick from are made, or taken from an earlier write of this ad with at most one check of their pictures paid, and the script is read for an animal it puts in the picture, whose picture is drawn when it has one; at most ${usd(ask.peopleMaxUsd)} on the member's keys for all of it.`);
|
|
1157
1157
|
}
|
|
1158
1158
|
const ended = await poll(() => deps.get(`${SWIPES_PATH}?job=${encodeURIComponent(job)}`), (polled) => {
|
|
1159
1159
|
if (!polled.ok)
|
|
@@ -1738,15 +1738,8 @@ export async function swipeSheetVoicesFlow(swipeId, opts, deps) {
|
|
|
1738
1738
|
],
|
|
1739
1739
|
};
|
|
1740
1740
|
}
|
|
1741
|
-
async function peopleBeforeStart(swipeId, opts, deps) {
|
|
1742
|
-
|
|
1743
|
-
try {
|
|
1744
|
-
const res = await deps.get(peopleSheetPath(swipeId));
|
|
1745
|
-
first = res.ok ? sheetOf(res.data) : null;
|
|
1746
|
-
}
|
|
1747
|
-
catch {
|
|
1748
|
-
first = null;
|
|
1749
|
-
}
|
|
1741
|
+
async function peopleBeforeStart(swipeId, opts, deps, read) {
|
|
1742
|
+
const first = read !== undefined ? read : await readSheetForStart(swipeId, deps);
|
|
1750
1743
|
const who = first ? rowOfSheet(first.sheet, "who") : undefined;
|
|
1751
1744
|
if (!who)
|
|
1752
1745
|
return null;
|
|
@@ -1773,6 +1766,40 @@ async function peopleBeforeStart(swipeId, opts, deps) {
|
|
|
1773
1766
|
return { lines: [...out.kept, ...(sentence ? [sentence] : []), ...(films ? [films] : [])], stillMaking: false, waited: true, who: ended.done.who };
|
|
1774
1767
|
}
|
|
1775
1768
|
const PEOPLE_MADE_WAIT_MS = 5 * 60_000;
|
|
1769
|
+
async function readSheetForStart(swipeId, deps) {
|
|
1770
|
+
try {
|
|
1771
|
+
const res = await deps.get(peopleSheetPath(swipeId));
|
|
1772
|
+
return res.ok ? sheetOf(res.data) : null;
|
|
1773
|
+
}
|
|
1774
|
+
catch {
|
|
1775
|
+
return null;
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
export const ANIMAL_WAIT_LINE = "The animal the script puts in the picture is being found and drawn for this swipe. The start waits for it, until 5 minutes after the write asked for it, so the video films the one on the sheet and does not pay to find and draw it again.";
|
|
1779
|
+
export const ANIMAL_GOES_ON_LINE = "The animal is still being found or drawn 5 minutes after the write asked for it, so the start goes on: the video looks for an animal in the script itself and draws one when it finds one.";
|
|
1780
|
+
async function animalBeforeStart(swipeId, first, opts, deps) {
|
|
1781
|
+
const animal = first ? rowOfSheet(first.sheet, "animal") : undefined;
|
|
1782
|
+
if (animal?.optionsStatus?.making !== true)
|
|
1783
|
+
return { sheet: first, lines: [] };
|
|
1784
|
+
const out = progress(opts);
|
|
1785
|
+
const leftMs = PEOPLE_MADE_WAIT_MS - Math.max(0, animal.optionsStatus.makingForMs ?? 0);
|
|
1786
|
+
if (leftMs <= 0) {
|
|
1787
|
+
out.say(ANIMAL_GOES_ON_LINE);
|
|
1788
|
+
return { sheet: first, lines: out.kept };
|
|
1789
|
+
}
|
|
1790
|
+
out.say(ANIMAL_WAIT_LINE);
|
|
1791
|
+
let last = first;
|
|
1792
|
+
const ended = await poll(() => deps.get(peopleSheetPath(swipeId)), (res) => {
|
|
1793
|
+
const sheet = res.ok ? sheetOf(res.data) : null;
|
|
1794
|
+
if (!sheet)
|
|
1795
|
+
return { done: false };
|
|
1796
|
+
last = sheet;
|
|
1797
|
+
return rowOfSheet(sheet.sheet, "animal")?.optionsStatus?.making === true ? null : { done: true };
|
|
1798
|
+
}, Math.ceil(leftMs / POLL_MS), deps, deps.now() + leftMs);
|
|
1799
|
+
if (!("done" in ended) || !ended.done)
|
|
1800
|
+
out.say(ANIMAL_GOES_ON_LINE);
|
|
1801
|
+
return { sheet: last, lines: out.kept };
|
|
1802
|
+
}
|
|
1776
1803
|
const checksOnly = (who, aged) => aged && who.optionsStatus?.making === true && typeof who.optionsStatus.count !== "number";
|
|
1777
1804
|
function goesOnLine(who, aged, why) {
|
|
1778
1805
|
const checking = checksOnly(who, aged);
|
|
@@ -1819,9 +1846,14 @@ export async function swipeStartFlow(swipeId, ask, opts, deps, again = false, wa
|
|
|
1819
1846
|
if (!opts.yes) {
|
|
1820
1847
|
return startNeedsYes(swipeId, ask.oneShot ? "start-one-shot" : "start", json, again, again ? ["With --again: a second video from this swipe, even if it already has one. It is paid on its own."] : [], deps);
|
|
1821
1848
|
}
|
|
1822
|
-
const
|
|
1849
|
+
const animal = waitPeople ? await animalBeforeStart(swipeId, await readSheetForStart(swipeId, deps), opts, deps) : null;
|
|
1850
|
+
const people = waitPeople ? await peopleBeforeStart(swipeId, opts, deps, animal?.sheet ?? null) : null;
|
|
1823
1851
|
if (people)
|
|
1824
|
-
return withPeopleWait(await swipeStartFlow(swipeId, ask, opts, deps, again), people, json);
|
|
1852
|
+
return withPeopleWait(await swipeStartFlow(swipeId, ask, opts, deps, again), { ...people, lines: [...(animal?.lines ?? []), ...people.lines] }, json);
|
|
1853
|
+
if (animal && animal.lines.length > 0) {
|
|
1854
|
+
const result = await swipeStartFlow(swipeId, ask, opts, deps, again);
|
|
1855
|
+
return json ? result : { ...result, lines: [...animal.lines, ...result.lines] };
|
|
1856
|
+
}
|
|
1825
1857
|
if (ask.maxUsd !== undefined) {
|
|
1826
1858
|
const unheld = await maxUsdUnsupported(swipeId, ask.maxUsd, deps);
|
|
1827
1859
|
if (unheld)
|
package/dist/commands/video.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export declare const RUN_PATH = "/api/v2/workflow";
|
|
|
25
25
|
export declare const ITEMS_PATH = "/api/v2/workflow/items";
|
|
26
26
|
export declare const FINAL_PATH = "/api/v2/video/final";
|
|
27
27
|
export declare const KEEP_SCENE_PATH = "/api/v2/video/keep-scene";
|
|
28
|
+
export declare const SPEND_ANSWER_PATH = "/api/v2/video/spend-answer";
|
|
28
29
|
export declare const VOICES_PATH = "/api/v2/video/voices";
|
|
29
30
|
export declare const PICKS_PATH = "/api/v2/video/picks";
|
|
30
31
|
export declare const MAP_PATH = "/api/v2/video/map";
|
|
@@ -94,7 +95,7 @@ export type ArtifactSubset = {
|
|
|
94
95
|
type: "image";
|
|
95
96
|
imageUrl?: string;
|
|
96
97
|
storageId?: string;
|
|
97
|
-
anchor?: "set-plate" | "product-sheet" | "filled-plate" | "product-plate" | "layout-plate";
|
|
98
|
+
anchor?: "set-plate" | "product-sheet" | "filled-plate" | "product-plate" | "layout-plate" | "animal-plate";
|
|
98
99
|
holds?: string[];
|
|
99
100
|
lid?: "closed";
|
|
100
101
|
camera?: string;
|
|
@@ -199,6 +200,17 @@ export interface VideoRun {
|
|
|
199
200
|
error?: string;
|
|
200
201
|
costUsd?: number;
|
|
201
202
|
costScope?: "soFar" | "final";
|
|
203
|
+
estimateUsd?: number;
|
|
204
|
+
spendAsk?: {
|
|
205
|
+
sentence: string;
|
|
206
|
+
};
|
|
207
|
+
spendWentOn?: {
|
|
208
|
+
sentence: string;
|
|
209
|
+
};
|
|
210
|
+
spendStopped?: {
|
|
211
|
+
at: number;
|
|
212
|
+
sentence?: string;
|
|
213
|
+
};
|
|
202
214
|
pauseReason?: BuilderPauseReason | "pilot";
|
|
203
215
|
pausedNodeId?: string;
|
|
204
216
|
pilot?: {
|
|
@@ -902,6 +914,7 @@ export type RevoiceTarget = ClipRedoTarget | {
|
|
|
902
914
|
all: true;
|
|
903
915
|
};
|
|
904
916
|
export declare function keepFlow(runId: string, sceneIndex: number, json: boolean, deps: VideoDeps): Promise<FlowResult>;
|
|
917
|
+
export declare function spendAnswerFlow(runId: string, answer: "go" | "stop", json: boolean, deps: VideoDeps): Promise<FlowResult>;
|
|
905
918
|
export declare function revoiceFlow(runId: string, target: RevoiceTarget, json: boolean, deps: VideoDeps): Promise<FlowResult>;
|
|
906
919
|
export interface CastVoiceRow {
|
|
907
920
|
characterId: string;
|
package/dist/commands/video.js
CHANGED
|
@@ -12,7 +12,7 @@ import { scriptApprovalExpiresAt, scriptApprovalNeedsReview } from "../lib/scrip
|
|
|
12
12
|
import { ASSET_UPLOAD_POLICY, pauseAheadLine, parseVoicesFlag, } from "./workflow.js";
|
|
13
13
|
import { HELPER_LEDGER_BASE, SET_OPTION_LEDGER_BASE } from "../lib/helperLedgerBase.js";
|
|
14
14
|
import { ONE_TAKE_HOLD_CODES } from "../lib/oneTakeHolds.js";
|
|
15
|
-
import { customerAnswer, customerRunPage, customerStageIsWorking, customerCutHeld, customerStageLines, customerStatusLines, customerStoryboardLines, customerVoicesLines, speechSummaryLines, } from "./video-customer.js";
|
|
15
|
+
import { customerAnswer, customerRunPage, customerStageIsWorking, customerCutHeld, customerStageLines, customerStatusLines, customerStoryboardLines, customerVoicesLines, speechSummaryLines, spendAskLines, } from "./video-customer.js";
|
|
16
16
|
import { planSwipeCommand, runSwipePlan } from "./video-swipe.js";
|
|
17
17
|
const VOICE_MODES = ["native", "voice-first"];
|
|
18
18
|
function joinedOr(items) {
|
|
@@ -164,6 +164,13 @@ The whole loop, in order:
|
|
|
164
164
|
video's page does. It orders nothing. Once no scene is held, the app's
|
|
165
165
|
own cut goes on and makes the final video.
|
|
166
166
|
|
|
167
|
+
exodus video keep-going <runId>
|
|
168
|
+
exodus video stop-here <runId>
|
|
169
|
+
A video that reached the estimate it showed before the start stops
|
|
170
|
+
and waits ("Waiting for you:" in status). Run one of these only on
|
|
171
|
+
the member's own answer: keep-going films on (it asks again at the
|
|
172
|
+
next whole estimate); stop-here orders nothing more.
|
|
173
|
+
|
|
167
174
|
9. Make your cut from those files.
|
|
168
175
|
|
|
169
176
|
10. exodus video upload <runId> --file cut.mp4
|
|
@@ -195,6 +202,8 @@ Usage:
|
|
|
195
202
|
exodus video retry-clip <runId> --scene <n> [--node <nodeId>] [--note "..."] [--voice-first] [--json]
|
|
196
203
|
exodus video revoice <runId> (--scene <n> | --all) [--node <nodeId>] [--json]
|
|
197
204
|
exodus video keep <runId> --scene <n> [--json]
|
|
205
|
+
exodus video keep-going <runId> [--json]
|
|
206
|
+
exodus video stop-here <runId> [--json]
|
|
198
207
|
exodus video voices <runId> [--set <character>=<voice>] [--clear <character>] [--from <file.json>] [--json]
|
|
199
208
|
exodus video voices [<runId>] --catalog [--json]
|
|
200
209
|
exodus video pull <runId> --out <dir> [--json]
|
|
@@ -561,9 +570,12 @@ swipe write also makes people to pick from for a kind whose sheet has a person,
|
|
|
561
570
|
when the server offers them: without --yes it says their price too, and the
|
|
562
571
|
yes line carries their most (--people-max-usd <n>). The write then makes 4 on
|
|
563
572
|
the member's own keys once the script is stored, waits a few minutes for them
|
|
564
|
-
and shows each, with the one a check of the faces recommends.
|
|
565
|
-
|
|
566
|
-
|
|
573
|
+
and shows each, with the one a check of the faces recommends. Inside the same
|
|
574
|
+
most it also reads the stored script for an animal it puts in the picture and
|
|
575
|
+
draws one picture of it: the sheet's row "The animal" shows it, and swipe sheet
|
|
576
|
+
set <swipeId> animal=none takes it out. --yes alone, or --no-people, writes
|
|
577
|
+
without them. swipe start waits while people or the animal are being made,
|
|
578
|
+
until 5 minutes after they were asked for.
|
|
567
579
|
The template picks the kind of ad: swipe template prints it and its look, so
|
|
568
580
|
ask the member before the write. A swipe run has no picks stop and no pilot
|
|
569
581
|
clip; it stops at the storyboard unless --one-shot. --wait on swipe and swipe
|
|
@@ -646,6 +658,7 @@ const REVOICE_NOT_ON_THIS_SERVER = "This Exodus server does not have the voice r
|
|
|
646
658
|
"was spent. It arrives with the next server update.";
|
|
647
659
|
export const FINAL_PATH = "/api/v2/video/final";
|
|
648
660
|
export const KEEP_SCENE_PATH = "/api/v2/video/keep-scene";
|
|
661
|
+
export const SPEND_ANSWER_PATH = "/api/v2/video/spend-answer";
|
|
649
662
|
export const VOICES_PATH = "/api/v2/video/voices";
|
|
650
663
|
export const PICKS_PATH = "/api/v2/video/picks";
|
|
651
664
|
export const MAP_PATH = "/api/v2/video/map";
|
|
@@ -4146,7 +4159,7 @@ export async function statusFlow(runId, json, deps) {
|
|
|
4146
4159
|
lines.push(...(await statusVoiceLines(runId, deps)));
|
|
4147
4160
|
}
|
|
4148
4161
|
const cost = runCostLine(run, items);
|
|
4149
|
-
lines.push("", ...(cost ? [cost] : []), runStopped(run)
|
|
4162
|
+
lines.push("", ...(cost ? [cost] : []), ...(run.estimateUsd !== undefined ? [`Estimate shown before the start: $${run.estimateUsd.toFixed(2)}`] : []), ...spendAskLines(run, runId), runStopped(run)
|
|
4150
4163
|
? hasFinal ? "Final cut: on the run, which stopped before it was delivered." : "Final cut: none. This run stopped before one was made."
|
|
4151
4164
|
: hasFinal && stop.at === "finished"
|
|
4152
4165
|
? "Final cut: approved and delivered."
|
|
@@ -5254,6 +5267,30 @@ export async function keepFlow(runId, sceneIndex, json, deps) {
|
|
|
5254
5267
|
],
|
|
5255
5268
|
};
|
|
5256
5269
|
}
|
|
5270
|
+
const SPEND_ANSWER_NOT_ON_THIS_SERVER = "This Exodus server cannot take this answer from the command line, so nothing changed. Answer on the video's page:";
|
|
5271
|
+
export async function spendAnswerFlow(runId, answer, json, deps) {
|
|
5272
|
+
const res = await deps.post(SPEND_ANSWER_PATH, { runId, answer });
|
|
5273
|
+
if (missingRouteLine(res, answer === "go" ? "exodus video keep-going" : "exodus video stop-here")) {
|
|
5274
|
+
const line = `${SPEND_ANSWER_NOT_ON_THIS_SERVER} ${customerRunPage(deps.dashboardUrl, runId)}`;
|
|
5275
|
+
return { code: 1, lines: json ? [JSON.stringify({ ok: false, status: 404, error: line })] : [line] };
|
|
5276
|
+
}
|
|
5277
|
+
if (!res.ok)
|
|
5278
|
+
return errorResult(res, json);
|
|
5279
|
+
const clearedToUsd = res.data?.clearedToUsd;
|
|
5280
|
+
if (json)
|
|
5281
|
+
return { code: 0, lines: [JSON.stringify({ ok: true, runId, answer, ...(typeof clearedToUsd === "number" ? { clearedToUsd } : {}) })] };
|
|
5282
|
+
return {
|
|
5283
|
+
code: 0,
|
|
5284
|
+
lines: [
|
|
5285
|
+
answer === "go"
|
|
5286
|
+
? typeof clearedToUsd === "number"
|
|
5287
|
+
? `Keeping going. It will ask again before it spends past $${clearedToUsd.toFixed(2)}.`
|
|
5288
|
+
: "Keeping going."
|
|
5289
|
+
: "Stopped at the estimate. Nothing more will be filmed. Every scene with a clip is kept.",
|
|
5290
|
+
`See where it stands: exodus video status ${runId}`,
|
|
5291
|
+
],
|
|
5292
|
+
};
|
|
5293
|
+
}
|
|
5257
5294
|
export async function revoiceFlow(runId, target, json, deps) {
|
|
5258
5295
|
const runRes = await deps.get(`${RUN_PATH}?runId=${encodeURIComponent(runId)}`);
|
|
5259
5296
|
if (!runRes.ok)
|
|
@@ -6503,6 +6540,8 @@ export async function run(flags, occurrences) {
|
|
|
6503
6540
|
"retry-clip",
|
|
6504
6541
|
"revoice",
|
|
6505
6542
|
"keep",
|
|
6543
|
+
"keep-going",
|
|
6544
|
+
"stop-here",
|
|
6506
6545
|
"voices",
|
|
6507
6546
|
"pull",
|
|
6508
6547
|
"upload",
|
|
@@ -6640,6 +6679,9 @@ export async function run(flags, occurrences) {
|
|
|
6640
6679
|
}
|
|
6641
6680
|
return printResult(await retryClipFlow(runId, { sceneIndex, nodeId: flagString(flags, "node") }, { note: flagString(flags, "note"), voiceFirst: flags["voice-first"] === true }, json, defaultDeps));
|
|
6642
6681
|
}
|
|
6682
|
+
if (sub === "keep-going" || sub === "stop-here") {
|
|
6683
|
+
return printResult(await spendAnswerFlow(runId, sub === "keep-going" ? "go" : "stop", json, defaultDeps));
|
|
6684
|
+
}
|
|
6643
6685
|
if (sub === "keep") {
|
|
6644
6686
|
const sceneRaw = flagString(flags, "scene");
|
|
6645
6687
|
if (sceneRaw === undefined)
|