@bitmagic/cli 0.1.64-dev.7 → 0.1.64-dev.8

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.
Files changed (41) hide show
  1. package/README.md +2 -2
  2. package/dist/commands/trailer.js +18 -4
  3. package/dist/commands/trailer.js.map +1 -1
  4. package/dist/editor/hud-replay-page.js +317 -22
  5. package/dist/editor/hud-replay-page.js.map +1 -1
  6. package/dist/render/qr-png.d.ts +6 -3
  7. package/dist/render/qr-png.js +8 -8
  8. package/dist/render/qr-png.js.map +1 -1
  9. package/dist/scaffold/skill-files.js +1 -0
  10. package/dist/scaffold/skill-files.js.map +1 -1
  11. package/dist/trailer/hud-raster.d.ts +12 -12
  12. package/dist/trailer/hud-raster.js +85 -32
  13. package/dist/trailer/hud-raster.js.map +1 -1
  14. package/dist/trailer/hud-state.d.ts +75 -4
  15. package/dist/trailer/hud-state.js +132 -17
  16. package/dist/trailer/hud-state.js.map +1 -1
  17. package/dist/trailer/io.d.ts +2 -0
  18. package/dist/trailer/io.js +6 -1
  19. package/dist/trailer/io.js.map +1 -1
  20. package/dist/trailer/link.d.ts +1 -0
  21. package/dist/trailer/link.js +15 -0
  22. package/dist/trailer/link.js.map +1 -0
  23. package/dist/trailer/make.d.ts +2 -0
  24. package/dist/trailer/make.js +1 -0
  25. package/dist/trailer/make.js.map +1 -1
  26. package/dist/trailer/merge.js +32 -11
  27. package/dist/trailer/merge.js.map +1 -1
  28. package/dist/trailer/render.d.ts +2 -0
  29. package/dist/trailer/render.js +94 -48
  30. package/dist/trailer/render.js.map +1 -1
  31. package/dist/trailer/timeline-types.d.ts +19 -0
  32. package/dist/trailer/timeline-types.js +42 -2
  33. package/dist/trailer/timeline-types.js.map +1 -1
  34. package/dist/trailer/title-raster.js +2 -1
  35. package/dist/trailer/title-raster.js.map +1 -1
  36. package/dist/trailer/titles.js +6 -1
  37. package/dist/trailer/titles.js.map +1 -1
  38. package/dist/trailer/video-chain.d.ts +96 -8
  39. package/dist/trailer/video-chain.js +183 -0
  40. package/dist/trailer/video-chain.js.map +1 -1
  41. package/package.json +4 -4
@@ -1,14 +1,102 @@
1
- /**
2
- * Video half of the trailer filtergraph: per-clip prep, then cut/crossfade
3
- * chaining.
4
- *
5
- * Split out of render.ts so it can be unit-tested — render.ts reaches
6
- * Playwright through hud-raster.ts, which jest can't parse under this
7
- * package's CommonJS transform.
8
- */
9
1
  import type { ClipTiming } from './edl-time.js';
10
2
  /** Format seconds/ratios for filtergraph text without float noise. */
11
3
  export declare function fmtNum(value: number): string;
4
+ /** One rasterized HUD overlay and the output window it is live for. */
5
+ export interface UiOverlay {
6
+ filePath: string;
7
+ /** Which EDL clip produced it; windows only ever chain within one clip. */
8
+ clipIndex: number;
9
+ startSec: number;
10
+ endSec: number;
11
+ }
12
+ /** An output-time window during which HUD overlays must not draw. */
13
+ export interface BlockedWindow {
14
+ startSec: number;
15
+ endSec: number;
16
+ }
17
+ /**
18
+ * Width/height straight out of a PNG's IHDR chunk, so the filtergraph only
19
+ * pays for a scale filter when the overlay really is the wrong size.
20
+ */
21
+ export declare function readPngSize(filePath: string): {
22
+ width: number;
23
+ height: number;
24
+ } | null;
25
+ /** One keyframe's window, as `foldUiOverlays` needs it. */
26
+ export interface UiKeyframeWindow {
27
+ clipIndex: number;
28
+ outputStartSec: number;
29
+ outputEndSec: number;
30
+ }
31
+ /** Overlays plus the count of windows left with no UI at all. */
32
+ export interface FoldedOverlays {
33
+ overlays: UiOverlay[];
34
+ bare: number;
35
+ }
36
+ /**
37
+ * Turn rasterized paths (with null for the ones that failed) into overlay
38
+ * windows, holding the previous overlay across a failure.
39
+ *
40
+ * The hold is deliberately limited to the SAME clip. A clip's last window ends
41
+ * at exactly the next clip's outputStart — for cuts and crossfades alike — so
42
+ * comparing times alone matches across the boundary too, and a failed first
43
+ * keyframe would stretch the previous SHOT's HUD over new footage: the wrong
44
+ * score over the wrong scene, which is worse than no HUD at all. A window with
45
+ * no in-clip predecessor goes bare instead.
46
+ *
47
+ * Pure and exported so this is testable: render.ts reaches Playwright through
48
+ * hud-raster.ts, which jest cannot load.
49
+ */
50
+ export declare function foldUiOverlays(paths: ReadonlyArray<string | null>, keyframes: readonly UiKeyframeWindow[]): FoldedOverlays;
51
+ /** A gap-free PNG sequence, one entry per output frame, ready for image2. */
52
+ export interface UiSequence {
53
+ /** Holds ui_%06d.png from index 0, plus the shared transparent filler. */
54
+ dir: string;
55
+ frameCount: number;
56
+ /** Entries resolved to the filler: no overlay owned them, or a card blocked them. */
57
+ blankFrames: number;
58
+ /** Overlay windows too short to contain a frame time. */
59
+ unusedOverlays: number;
60
+ }
61
+ /**
62
+ * A fully transparent PNG, written without shelling out.
63
+ *
64
+ * `ffmpeg -f lavfi -i color=black@0.0 -pix_fmt rgba` looks like it produces
65
+ * this and does not — every alpha byte comes back 255, which would black out
66
+ * the whole frame. The chunk/CRC primitives are the QR encoder's.
67
+ */
68
+ export declare function writeTransparentPng(filePath: string, width: number, height: number): void;
69
+ /**
70
+ * Densify the overlay windows into one gap-free image2 sequence in OUTPUT time.
71
+ *
72
+ * Why not one ffmpeg input per keyframe (what this replaced): that shape costs
73
+ * ~23 MB of RSS and one serial filter node per overlay, so it was the real
74
+ * ceiling on how often the HUD could change — measured 4.31 s / 3.8 GB for 126
75
+ * overlays, 32 s / 17.2 GB at one per output frame, and above ~400 inputs
76
+ * ffmpeg starts failing scaler allocations, drops the HUD from the rest of the
77
+ * video, and still exits 0. One sequence is flat in keyframe count: 2.83 s /
78
+ * 0.94 GB whether it carries 126 distinct rasters or 902.
79
+ *
80
+ * Output time, not per-clip source time: the windows are already computed in
81
+ * output time (so exactly one HUD is live across a crossfade), and title-card
82
+ * blocked windows are output time too. A per-clip overlay applied before the
83
+ * xfade would cross-dissolve two HUDs against each other.
84
+ *
85
+ * The sequence MUST be gap-free: a missing index truncates the image2 input,
86
+ * ffmpeg exits 0, and the HUD silently disappears for the rest of the video.
87
+ * Running long is free, so the frame count deliberately rounds up and adds one.
88
+ */
89
+ export declare function buildUiSequence(overlays: readonly UiOverlay[], fps: number, totalDurationSec: number, seqDir: string, blocked?: readonly BlockedWindow[]): UiSequence;
90
+ /**
91
+ * Chain the UI sequence onto the finished video chain. Runs in yuv444p so the
92
+ * alpha blend keeps HUD text edges crisp (yuv420 would subsample them), and
93
+ * converts back for libx264 at the end.
94
+ *
95
+ * `eof_action=pass`, never `repeat`: if the sequence ever does come up short,
96
+ * passing drops the HUD from that point, while repeating would freeze the last
97
+ * raster to the end AND punch it through every title card.
98
+ */
99
+ export declare function appendUiSequenceChain(lines: string[], sequence: UiSequence, uiIndex: number, width: number, height: number, endLabel: string): void;
12
100
  export interface LogoPlacement {
13
101
  /** ffmpeg input index of the logo image. */
14
102
  inputIndex: number;
@@ -1,8 +1,191 @@
1
+ /**
2
+ * Video half of the trailer filtergraph: per-clip prep, cut/crossfade
3
+ * chaining, and the HUD overlay chain.
4
+ *
5
+ * Split out of render.ts so it can be unit-tested — render.ts reaches
6
+ * Playwright through hud-raster.ts, which jest can't parse under this
7
+ * package's CommonJS transform.
8
+ */
9
+ import * as fs from 'fs';
10
+ import * as path from 'path';
11
+ import * as zlib from 'zlib';
12
+ import { warn } from './io.js';
13
+ import { linkOrCopy } from './link.js';
14
+ import { PNG_SIGNATURE, pngChunk } from '../render/qr-png.js';
1
15
  /** Format seconds/ratios for filtergraph text without float noise. */
2
16
  export function fmtNum(value) {
3
17
  const fixed = value.toFixed(6);
4
18
  return fixed.includes('.') ? fixed.replace(/0+$/, '').replace(/\.$/, '') : fixed;
5
19
  }
20
+ /**
21
+ * Width/height straight out of a PNG's IHDR chunk, so the filtergraph only
22
+ * pays for a scale filter when the overlay really is the wrong size.
23
+ */
24
+ export function readPngSize(filePath) {
25
+ const header = Buffer.alloc(24);
26
+ const fd = fs.openSync(filePath, 'r');
27
+ try {
28
+ if (fs.readSync(fd, header, 0, 24, 0) < 24)
29
+ return null;
30
+ }
31
+ finally {
32
+ fs.closeSync(fd);
33
+ }
34
+ if (header.readUInt32BE(0) !== 0x89504e47 || header.toString('ascii', 12, 16) !== 'IHDR')
35
+ return null;
36
+ return { width: header.readUInt32BE(16), height: header.readUInt32BE(20) };
37
+ }
38
+ /**
39
+ * Turn rasterized paths (with null for the ones that failed) into overlay
40
+ * windows, holding the previous overlay across a failure.
41
+ *
42
+ * The hold is deliberately limited to the SAME clip. A clip's last window ends
43
+ * at exactly the next clip's outputStart — for cuts and crossfades alike — so
44
+ * comparing times alone matches across the boundary too, and a failed first
45
+ * keyframe would stretch the previous SHOT's HUD over new footage: the wrong
46
+ * score over the wrong scene, which is worse than no HUD at all. A window with
47
+ * no in-clip predecessor goes bare instead.
48
+ *
49
+ * Pure and exported so this is testable: render.ts reaches Playwright through
50
+ * hud-raster.ts, which jest cannot load.
51
+ */
52
+ export function foldUiOverlays(paths, keyframes) {
53
+ const overlays = [];
54
+ let bare = 0;
55
+ for (let i = 0; i < keyframes.length; i++) {
56
+ const filePath = paths[i];
57
+ const keyframe = keyframes[i];
58
+ if (filePath === null || filePath === undefined) {
59
+ const previous = overlays[overlays.length - 1];
60
+ if (previous !== undefined &&
61
+ previous.clipIndex === keyframe.clipIndex &&
62
+ previous.endSec === keyframe.outputStartSec) {
63
+ previous.endSec = keyframe.outputEndSec;
64
+ }
65
+ else {
66
+ bare++;
67
+ }
68
+ continue;
69
+ }
70
+ overlays.push({
71
+ filePath,
72
+ clipIndex: keyframe.clipIndex,
73
+ startSec: keyframe.outputStartSec,
74
+ endSec: keyframe.outputEndSec,
75
+ });
76
+ }
77
+ return { overlays, bare };
78
+ }
79
+ /** Larger than float noise on a frame-time sum, far smaller than a frame. */
80
+ const BOUNDARY_EPSILON = 1e-9;
81
+ /**
82
+ * A fully transparent PNG, written without shelling out.
83
+ *
84
+ * `ffmpeg -f lavfi -i color=black@0.0 -pix_fmt rgba` looks like it produces
85
+ * this and does not — every alpha byte comes back 255, which would black out
86
+ * the whole frame. The chunk/CRC primitives are the QR encoder's.
87
+ */
88
+ export function writeTransparentPng(filePath, width, height) {
89
+ const ihdr = Buffer.alloc(13);
90
+ ihdr.writeUInt32BE(width, 0);
91
+ ihdr.writeUInt32BE(height, 4);
92
+ ihdr[8] = 8; // bit depth
93
+ ihdr[9] = 6; // RGBA
94
+ // One filter byte per row, then width*4 zero bytes — zeroes are transparent.
95
+ const raw = Buffer.alloc(height * (1 + width * 4));
96
+ fs.writeFileSync(filePath, Buffer.concat([
97
+ PNG_SIGNATURE,
98
+ pngChunk('IHDR', ihdr),
99
+ pngChunk('IDAT', zlib.deflateSync(raw)),
100
+ pngChunk('IEND', Buffer.alloc(0)),
101
+ ]));
102
+ }
103
+ /**
104
+ * Densify the overlay windows into one gap-free image2 sequence in OUTPUT time.
105
+ *
106
+ * Why not one ffmpeg input per keyframe (what this replaced): that shape costs
107
+ * ~23 MB of RSS and one serial filter node per overlay, so it was the real
108
+ * ceiling on how often the HUD could change — measured 4.31 s / 3.8 GB for 126
109
+ * overlays, 32 s / 17.2 GB at one per output frame, and above ~400 inputs
110
+ * ffmpeg starts failing scaler allocations, drops the HUD from the rest of the
111
+ * video, and still exits 0. One sequence is flat in keyframe count: 2.83 s /
112
+ * 0.94 GB whether it carries 126 distinct rasters or 902.
113
+ *
114
+ * Output time, not per-clip source time: the windows are already computed in
115
+ * output time (so exactly one HUD is live across a crossfade), and title-card
116
+ * blocked windows are output time too. A per-clip overlay applied before the
117
+ * xfade would cross-dissolve two HUDs against each other.
118
+ *
119
+ * The sequence MUST be gap-free: a missing index truncates the image2 input,
120
+ * ffmpeg exits 0, and the HUD silently disappears for the rest of the video.
121
+ * Running long is free, so the frame count deliberately rounds up and adds one.
122
+ */
123
+ export function buildUiSequence(overlays, fps, totalDurationSec, seqDir, blocked = []) {
124
+ // Never append to a stale dir: entries are hardlinks onto the .ui rasters,
125
+ // so writing through one would corrupt the raster it shares an inode with.
126
+ fs.rmSync(seqDir, { recursive: true, force: true });
127
+ fs.mkdirSync(seqDir, { recursive: true });
128
+ const size = overlays.length > 0 ? readPngSize(overlays[0].filePath) : null;
129
+ const blankPath = path.join(seqDir, 'blank.png');
130
+ // Named outside the ui_%06d.png glob so image2 cannot pick it up as a frame.
131
+ writeTransparentPng(blankPath, size?.width ?? 16, size?.height ?? 16);
132
+ const sorted = [...overlays].sort((a, b) => a.startSec - b.startSec);
133
+ const frameCount = Math.ceil(totalDurationSec * fps - 1e-9) + 1;
134
+ const owned = new Set();
135
+ let cursor = 0;
136
+ let blankFrames = 0;
137
+ for (let n = 0; n < frameCount; n++) {
138
+ const t = n / fps;
139
+ // Window bounds are `outputStart + k/fps/speed` sums, which land one ulp
140
+ // above the frame time they mean for ~5% of boundaries (8.666666666666668
141
+ // vs 520/60); a bound that is mathematically the frame time must own that
142
+ // frame, or a clip's first frame goes to the previous shot's HUD. The same
143
+ // epsilon decides release and ownership, so shared boundaries stay
144
+ // half-open. Blocked windows are compared exactly: they are already
145
+ // rounded to the card's own gate (render.ts), and an epsilon there would
146
+ // blank a frame the card never covers.
147
+ const tEps = t + BOUNDARY_EPSILON;
148
+ while (cursor < sorted.length && sorted[cursor].endSec <= tEps)
149
+ cursor++;
150
+ const own = sorted[cursor];
151
+ const isBlocked = blocked.some((w) => t >= w.startSec && t < w.endSec);
152
+ const drawable = own !== undefined && own.startSec <= tEps && !isBlocked;
153
+ if (drawable)
154
+ owned.add(own.filePath);
155
+ else
156
+ blankFrames++;
157
+ linkOrCopy(drawable ? own.filePath : blankPath, path.join(seqDir, `ui_${String(n).padStart(6, '0')}.png`));
158
+ }
159
+ return {
160
+ dir: seqDir,
161
+ frameCount,
162
+ blankFrames,
163
+ unusedOverlays: overlays.filter((o) => !owned.has(o.filePath)).length,
164
+ };
165
+ }
166
+ /**
167
+ * Chain the UI sequence onto the finished video chain. Runs in yuv444p so the
168
+ * alpha blend keeps HUD text edges crisp (yuv420 would subsample them), and
169
+ * converts back for libx264 at the end.
170
+ *
171
+ * `eof_action=pass`, never `repeat`: if the sequence ever does come up short,
172
+ * passing drops the HUD from that point, while repeating would freeze the last
173
+ * raster to the end AND punch it through every title card.
174
+ */
175
+ export function appendUiSequenceChain(lines, sequence, uiIndex, width, height, endLabel) {
176
+ const size = readPngSize(path.join(sequence.dir, 'ui_000000.png'));
177
+ const needsScale = size === null || size.width !== width || size.height !== height;
178
+ if (needsScale && size !== null) {
179
+ // One line, not one per frame: with window-parity rasterization every
180
+ // overlay is deliberately supersampled and lands here by design.
181
+ warn(`ui: scaling overlays from ${size.width}x${size.height} to ${width}x${height}`);
182
+ }
183
+ const prep = needsScale ? `scale=${width}:${height},format=yuva444p` : 'format=yuva444p';
184
+ lines.push('[vbase]format=yuv444p[uibase]');
185
+ lines.push(`[${uiIndex}:v]${prep}[uiseq]`);
186
+ lines.push('[uibase][uiseq]overlay=0:0:format=yuv444:eof_action=pass:shortest=0[uidone]');
187
+ lines.push(`[uidone]format=yuv420p[${endLabel}]`);
188
+ }
6
189
  /**
7
190
  * Watermark chain, applied last so the logo sits above the HUD overlay too.
8
191
  *
@@ -1 +1 @@
1
- {"version":3,"file":"video-chain.js","sourceRoot":"","sources":["../../src/trailer/video-chain.ts"],"names":[],"mappings":"AAUA,sEAAsE;AACtE,MAAM,UAAU,MAAM,CAAC,KAAa;IAClC,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC/B,OAAO,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AACnF,CAAC;AAaD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,cAAc,CAC5B,OAAe,EACf,QAAgB,EAChB,SAAwB,EACxB,KAAa,EACb,MAAc;IAEd,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAA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,EAAE,CAAC,EAAE,EAAE,CAAC;QACxC,MAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QAC1B,MAAM,SAAS,GAAG,CAAC,KAAK,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC;QACrE,IAAI,MAAM,CAAC,UAAU,KAAK,WAAW,EAAE,CAAC;YACtC,wEAAwE;YACxE,yEAAyE;YACzE,qEAAqE;YACrE,KAAK,CAAC,IAAI,CAAC,IAAI,OAAO,eAAe,OAAO,KAAK,CAAC,CAAC;YACnD,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;YACzC,KAAK,CAAC,IAAI,CACR,IAAI,OAAO,QAAQ,CAAC,qCAAqC,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,WAAW,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,SAAS,GAAG,CAChJ,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,IAAI,OAAO,MAAM,CAAC,uBAAuB,SAAS,GAAG,CAAC,CAAC;QACpE,CAAC;QACD,OAAO,GAAG,SAAS,CAAC;IACtB,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitmagic/cli",
3
- "version": "0.1.64-dev.7",
3
+ "version": "0.1.64-dev.8",
4
4
  "description": "Build Bitmagic games from your own agent tool",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Bitmagic Oy",
@@ -25,9 +25,9 @@
25
25
  "playwright-core": "^1.59.1",
26
26
  "tar": "^7.4.3",
27
27
  "ws": "^8.21.3",
28
- "@bitmagic/asset-core": "0.2.19-dev.7",
29
- "@bitmagic/animation-forger": "0.1.19-dev.7",
30
- "@bitmagic/world-forger": "0.1.24-dev.7"
28
+ "@bitmagic/animation-forger": "0.1.19-dev.8",
29
+ "@bitmagic/asset-core": "0.2.19-dev.8",
30
+ "@bitmagic/world-forger": "0.1.24-dev.8"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@eslint/js": "^9.38.0",