@hyperframes/producer 0.8.199 → 0.8.201
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 +8 -8
- package/dist/distributed.js +105 -33
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +66 -62
- package/dist/index.js +175 -43
- package/dist/public-server.js +141 -38
- package/dist/regression-harness.d.ts +53 -0
- package/dist/services/distributed/chunkWeights.d.ts +2 -0
- package/dist/services/htmlCompiler.d.ts +0 -2
- package/dist/services/render/audioPadTrim.d.ts +2 -0
- package/dist/services/render/stages/captureStage.d.ts +1 -0
- package/dist/services/render/stages/compileStage.d.ts +1 -1
- package/dist/services/render/stages/freezePlan.d.ts +1 -0
- package/dist/services/renderMediaCollector.d.ts +2 -0
- package/dist/services/renderOrchestrator.d.ts +37 -45
- package/package.json +7 -7
|
@@ -29,51 +29,40 @@ export interface RenderConfig {
|
|
|
29
29
|
/** Segmented capture: keep renders/.hf-segments/<planHash> after a successful render. */
|
|
30
30
|
keepSegments?: boolean;
|
|
31
31
|
/**
|
|
32
|
-
* Output container format. Defaults to `"mp4"`;
|
|
33
|
-
* unaffected unless this field is set explicitly.
|
|
32
|
+
* Output container format. Defaults to `"mp4"`; set explicitly for other formats.
|
|
34
33
|
*
|
|
35
|
-
* - `"mp4"`: H.264
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* - `"
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* - `"
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* segments: `master.m3u8`, `video.m3u8` + `video_%05d.ts`, and
|
|
62
|
-
* `audio.m3u8` + `audio_%05d.ts` when the composition has audio.
|
|
63
|
-
* Segments are fixed-length (see {@link RenderConfig.hlsSegmentSeconds})
|
|
64
|
-
* and every one starts on an IDR frame, because the encoder's GOP is
|
|
65
|
-
* locked to `hlsSegmentSeconds × fps`. Like `"png-sequence"`,
|
|
66
|
-
* `outputPath` is treated as a directory. SDR only, software encoder
|
|
67
|
-
* only, and not available in distributed / Lambda / Cloud Run mode.
|
|
34
|
+
* - `"mp4"`: opaque H.264, or H.265 + HDR10 with HDR auto-detection or
|
|
35
|
+
* `hdrMode: "force-hdr"`. For streaming/social delivery; faststart puts the
|
|
36
|
+
* `moov` atom first so playback can begin during a partial download.
|
|
37
|
+
* - `"webm"`: VP9 + `yuva420p` with true alpha (no chroma key) and Opus audio.
|
|
38
|
+
* For `<video>` overlays in Chrome, Edge and Firefox; Safari's alpha-WebM
|
|
39
|
+
* support is incomplete.
|
|
40
|
+
* - `"mov"`: ProRes 4444 + `yuva444p10le` with true alpha and AAC audio.
|
|
41
|
+
* Chrome captures 8-bit RGBA; encoding it as 10-bit ProRes does not add
|
|
42
|
+
* capture precision. For editor ingest (Premiere, Final Cut Pro, DaVinci
|
|
43
|
+
* Resolve), rather than direct web playback.
|
|
44
|
+
* - `"gif"`: animated GIF from RGBA captures, using FFmpeg's two-pass
|
|
45
|
+
* `palettegen` + `paletteuse`. For inline autoplay in PRs, READMEs and docs
|
|
46
|
+
* when file size matters less. No audio; transparency is binary, not partial.
|
|
47
|
+
* - `"png-sequence"`: zero-padded RGBA PNGs (`frame_000001.png` ...), with
|
|
48
|
+
* lossless alpha and the largest disk footprint. No muxed audio; an
|
|
49
|
+
* `audio.m4a` sidecar is written when the composition contains audio.
|
|
50
|
+
* For After Effects / Nuke / Fusion or post-processing before encoding.
|
|
51
|
+
* `outputPath` is a directory, created if it does not exist.
|
|
52
|
+
* - `"hls"`: HLS VOD using the opaque H.264 + AAC encode from `"mp4"`,
|
|
53
|
+
* stream-copied without re-encoding into MPEG-TS in the `outputPath` directory:
|
|
54
|
+
* `master.m3u8`, `video.m3u8` + `video_%05d.ts`, and `audio.m3u8` +
|
|
55
|
+
* `audio_%05d.ts` when the composition contains audio. Segment length is
|
|
56
|
+
* {@link RenderConfig.hlsSegmentSeconds}; the encoder's GOP is locked to
|
|
57
|
+
* that length in frames, so each segment starts on an IDR frame.
|
|
58
|
+
* SDR and software encoders only; unavailable in distributed rendering,
|
|
59
|
+
* including Lambda and Cloud Run.
|
|
68
60
|
*
|
|
69
|
-
* Alpha
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* the engine's `initTransparentBackground` helper, so authors should
|
|
75
|
-
* not paint a fullscreen `body` / `#root` background in their
|
|
76
|
-
* compositions when targeting alpha output.
|
|
61
|
+
* Alpha formats (`"webm"`, `"mov"`, `"png-sequence"`, `"gif"`) force screenshot
|
|
62
|
+
* capture because BeginFrame does not preserve alpha on Linux headless-shell.
|
|
63
|
+
* HDR + alpha is unsupported: a warning is logged and output falls back to SDR.
|
|
64
|
+
* The engine's `initTransparentBackground` injects transparent-background CSS;
|
|
65
|
+
* avoid painting a fullscreen `body` / `#root` background for alpha output.
|
|
77
66
|
*/
|
|
78
67
|
format?: RenderOutputFormat;
|
|
79
68
|
/** GIF Netscape loop count. 0 means infinite looping. Only used with `format: "gif"`. */
|
|
@@ -290,7 +279,7 @@ export interface RenderPerfSummary {
|
|
|
290
279
|
drawElement?: {
|
|
291
280
|
/** Final capture mode: "drawelement" | "screenshot" | "beginframe" (|-joined if workers diverge). */
|
|
292
281
|
mode: string;
|
|
293
|
-
/** Compile-time gate that disabled default DE: 3d |
|
|
282
|
+
/** Compile-time gate that disabled default DE: 3d | ancestor_background_image | shader_transitions. */
|
|
294
283
|
compileGate?: string;
|
|
295
284
|
/** Producer clamp that disabled default DE: parallel | disk_path. */
|
|
296
285
|
clampReason?: string;
|
|
@@ -367,6 +356,7 @@ export interface RenderPerfSummary {
|
|
|
367
356
|
blankRecaptures: number;
|
|
368
357
|
/** Clip-cut boundary frames captured via per-frame screenshot. */
|
|
369
358
|
boundaryFrames: number;
|
|
359
|
+
riskFrames: number;
|
|
370
360
|
/** Per-frame "No cached paint record" screenshot fallbacks. */
|
|
371
361
|
ncprFallbacks: number;
|
|
372
362
|
/**
|
|
@@ -480,7 +470,7 @@ interface ExtractedVideoReadinessInput {
|
|
|
480
470
|
}
|
|
481
471
|
export declare function collectVideoMetadataHints(extractedVideos: readonly ExtractedVideoReadinessInput[]): CaptureVideoMetadataHint[];
|
|
482
472
|
export declare function findMissingFrameRanges(totalFrames: number, framesDir: string, frameExt: "jpg" | "png"): FrameRange[];
|
|
483
|
-
export declare function buildMissingFrameRetryBatches(ranges: FrameRange[], maxWorkers: number, workDir: string, attempt: number, rangeStart?: number): WorkerTask[][];
|
|
473
|
+
export declare function buildMissingFrameRetryBatches(ranges: FrameRange[], maxWorkers: number, workDir: string, attempt: number, rangeStart?: number, stride?: number): WorkerTask[][];
|
|
484
474
|
/**
|
|
485
475
|
* The capture mode this render will REPORT, pre-capture.
|
|
486
476
|
*
|
|
@@ -595,6 +585,8 @@ export declare function executeDiskCaptureWithAdaptiveRetry(options: {
|
|
|
595
585
|
createBeforeCaptureHook: () => BeforeCaptureHook | null;
|
|
596
586
|
abortSignal?: AbortSignal;
|
|
597
587
|
onProgress?: (progress: ParallelProgress) => void;
|
|
588
|
+
/** Workers take frames round-robin so an in-order consumer (the overlapped encoder) is never starved. */
|
|
589
|
+
interleaveFrames?: boolean;
|
|
598
590
|
cfg: EngineConfig;
|
|
599
591
|
log: ProducerLogger;
|
|
600
592
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/producer",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.201",
|
|
4
4
|
"description": "HTML-to-video rendering engine using Chrome's BeginFrame API",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"postcss": "^8.4.0",
|
|
36
36
|
"puppeteer": "^25.2.1",
|
|
37
37
|
"puppeteer-core": "^25.2.1",
|
|
38
|
-
"@hyperframes/core": "0.8.
|
|
39
|
-
"@hyperframes/
|
|
40
|
-
"@hyperframes/
|
|
41
|
-
"@hyperframes/
|
|
42
|
-
"@hyperframes/
|
|
38
|
+
"@hyperframes/core": "0.8.201",
|
|
39
|
+
"@hyperframes/engine": "0.8.201",
|
|
40
|
+
"@hyperframes/studio-server": "0.8.201",
|
|
41
|
+
"@hyperframes/parsers": "0.8.201",
|
|
42
|
+
"@hyperframes/lint": "0.8.201"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/node": "^25.0.10",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"tsx": "^4.21.0",
|
|
49
49
|
"typescript": "^5.7.2",
|
|
50
50
|
"vitest": "^4.1.11",
|
|
51
|
-
"@hyperframes/aws-lambda": "0.8.
|
|
51
|
+
"@hyperframes/aws-lambda": "0.8.201"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=22"
|