@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.
@@ -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"`; existing renders are
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 by default, or H.265 + HDR10 when HDR auto-detect
36
- * engages or `hdrMode: "force-hdr"` is set. Opaque. The
37
- * default streaming/social deliverable. Faststart is applied so the
38
- * `moov` atom sits at the file start and the file plays from a
39
- * partial download.
40
- * - `"webm"`: VP9 + `yuva420p` pixel format → **true alpha channel**, no
41
- * chroma key. Plays in Chrome, Edge, and Firefox; Safari support for
42
- * alpha-WebM is incomplete. Use this when the output should drop
43
- * straight into a `<video>` over a colored background on the web.
44
- * Audio is muxed as Opus.
45
- * - `"mov"`: ProRes 4444 + `yuva444p10le` → **true alpha channel +
46
- * 10-bit color**. Sized for editor ingest (Premiere, Final Cut Pro,
47
- * DaVinci Resolve), not direct web playback. Audio is muxed as AAC.
48
- * - `"gif"`: animated GIF encoded from captured RGBA frames with a two-pass
49
- * FFmpeg palette (`palettegen` + `paletteuse`). Use for PRs, READMEs,
50
- * and docs where inline autoplay matters more than file size. No audio
51
- * stream; transparency is binary because GIF has no partial alpha.
52
- * - `"png-sequence"`: a directory of zero-padded RGBA PNGs
53
- * (`frame_000001.png` …). Lossless alpha, largest on disk, no muxed
54
- * audio (an `audio.m4a` sidecar is written alongside the PNGs when
55
- * the composition has audio elements). Use for After Effects / Nuke
56
- * / Fusion ingest, or when frames need post-processing before
57
- * encoding. `outputPath` is treated as a directory; it is created if
58
- * it doesn't exist.
59
- * - `"hls"`: HLS VOD package — the same opaque H.264 + AAC encode as
60
- * `"mp4"`, stream-copied (no re-encode) into a directory of MPEG-TS
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 output (`"webm"`, `"mov"`, `"png-sequence"`, `"gif"`) automatically
70
- * forces screenshot capture (Chrome's BeginFrame compositor does not
71
- * preserve alpha on Linux headless-shell) and disables HDR — HDR +
72
- * alpha is not a supported combination, a warning is logged and HDR
73
- * falls back to SDR. The transparent-background CSS is injected by
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 | mix_blend_mode | shader_transitions. */
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.199",
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.199",
39
- "@hyperframes/lint": "0.8.199",
40
- "@hyperframes/parsers": "0.8.199",
41
- "@hyperframes/studio-server": "0.8.199",
42
- "@hyperframes/engine": "0.8.199"
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.199"
51
+ "@hyperframes/aws-lambda": "0.8.201"
52
52
  },
53
53
  "engines": {
54
54
  "node": ">=22"