@hyperframes/producer 0.9.14 → 0.9.16
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/dist/distributed.js +205 -136
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +68 -68
- package/dist/index.js +233 -187
- package/dist/public-server.js +154 -107
- package/dist/services/render/audioPadTrim.d.ts +6 -0
- package/dist/services/render/stages/assembleStage.d.ts +1 -0
- package/dist/services/render/stages/audioStage.d.ts +4 -0
- package/dist/services/render/stages/compileStage.d.ts +12 -3
- package/dist/services/renderOrchestrator.d.ts +2 -5
- package/package.json +7 -7
|
@@ -44,6 +44,8 @@ export interface PadTrimAudioInput {
|
|
|
44
44
|
audioPath: string;
|
|
45
45
|
/** Path the helper writes the duration-corrected audio to. */
|
|
46
46
|
outputPath: string;
|
|
47
|
+
/** The PCM `audioPath` was encoded from: a pad, trim or peak correction encodes it instead of decoding the AAC. */
|
|
48
|
+
sourcePath?: string;
|
|
47
49
|
signal?: AbortSignal;
|
|
48
50
|
/** Deadline for each ffmpeg process; defaults to the engine's `ffmpegProcessTimeout`. */
|
|
49
51
|
timeoutMs?: number;
|
|
@@ -126,12 +128,16 @@ export declare function constrainAacTruePeak(input: {
|
|
|
126
128
|
timeoutMs?: number;
|
|
127
129
|
probeTruePeakDbfs?: (audioPath: string, signal?: AbortSignal) => Promise<number>;
|
|
128
130
|
encodeAac?: AacEncoder;
|
|
131
|
+
rewriteSource?: SourceRewriter;
|
|
129
132
|
}): Promise<{
|
|
130
133
|
success: boolean;
|
|
131
134
|
error?: string;
|
|
132
135
|
failureReason?: "external_interruption";
|
|
133
136
|
loweredDb?: number;
|
|
137
|
+
sourceStale?: true;
|
|
134
138
|
}>;
|
|
139
|
+
/** Writes `sourcePath` through `filter` to `outputPath` as float PCM. */
|
|
140
|
+
type SourceRewriter = (sourcePath: string, outputPath: string, filter: string) => Promise<StepResult>;
|
|
135
141
|
export declare function defaultProbeVideoFrameInfo(videoPath: string, signal?: AbortSignal): Promise<ProbeVideoFrameInfo>;
|
|
136
142
|
export declare function runFfprobeJson<T>(args: string[], signal?: AbortSignal): Promise<T>;
|
|
137
143
|
export {};
|
|
@@ -27,6 +27,7 @@ export interface AssembleStageInput {
|
|
|
27
27
|
videoOnlyPath: string;
|
|
28
28
|
/** Mixed audio path (only read when `hasAudio` is true). */
|
|
29
29
|
audioOutputPath: string;
|
|
30
|
+
audioPcmPath?: string;
|
|
30
31
|
/** Final on-disk output. A directory when `format` is `"hls"`. */
|
|
31
32
|
outputPath: string;
|
|
32
33
|
hasAudio: boolean;
|
|
@@ -41,12 +41,16 @@ export interface AudioStageInput {
|
|
|
41
41
|
assertNotAborted: () => void;
|
|
42
42
|
/** Where a per-track failure's detail goes. Optional so tests need not pass one. */
|
|
43
43
|
log?: ProducerLogger;
|
|
44
|
+
/** Leave the delivered PCM in `workDir` for the assemble stage; its owner removes the dir. */
|
|
45
|
+
keepDeliverySource?: boolean;
|
|
44
46
|
}
|
|
45
47
|
export interface AudioStageResult {
|
|
46
48
|
/** Actual delivery attenuation, for the render warning and metadata. */
|
|
47
49
|
audioLoweredDb?: number;
|
|
48
50
|
/** Always `join(workDir, MIXED_AUDIO_FILENAME)`. */
|
|
49
51
|
audioOutputPath: string;
|
|
52
|
+
/** The PCM `audioOutputPath` encodes, when `keepDeliverySource` asked for it. */
|
|
53
|
+
deliverySourcePath?: string;
|
|
50
54
|
/** True iff the audio mix actually produced a file. False when there are no audio elements. */
|
|
51
55
|
hasAudio: boolean;
|
|
52
56
|
/** Wall-clock ms for the audio mix phase. Zero-elements path is near-zero but always set. */
|
|
@@ -42,9 +42,7 @@ import type { RenderJob } from "../../renderOrchestrator.js";
|
|
|
42
42
|
export interface CompileStageInput {
|
|
43
43
|
projectDir: string;
|
|
44
44
|
workDir: string;
|
|
45
|
-
/**
|
|
46
|
-
htmlPath: string;
|
|
47
|
-
/** The relative `entryFile` string, used only for log payloads. */
|
|
45
|
+
/** Entry HTML relative to `projectDir`; a `<template>` sub-composition is isolated inside the index shell. */
|
|
48
46
|
entryFile: string;
|
|
49
47
|
job: RenderJob;
|
|
50
48
|
/**
|
|
@@ -104,4 +102,15 @@ export interface CompileStageResult {
|
|
|
104
102
|
* `3d` | `ancestor_background_image` | `shader_transitions`. Undefined when none fired. */
|
|
105
103
|
deCompileGate?: string;
|
|
106
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* The HTML file to compile for `entryFile`. A `<template>`-wrapped
|
|
107
|
+
* sub-composition has no live root, timeline or duration of its own, so it is
|
|
108
|
+
* rendered through the project's index.html shell with only its mount host kept.
|
|
109
|
+
*/
|
|
110
|
+
export declare function resolveEntryHtmlPath(input: {
|
|
111
|
+
projectDir: string;
|
|
112
|
+
workDir: string;
|
|
113
|
+
entryFile: string;
|
|
114
|
+
log: ProducerLogger;
|
|
115
|
+
}): string;
|
|
107
116
|
export declare function runCompileStage(input: CompileStageInput): Promise<CompileStageResult>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CanvasResolution, type Fps, type FpsInput, type HfVfxCapture } from "@hyperframes/core";
|
|
2
|
-
import { type EngineConfig, type ExtractionPhaseBreakdown, type VideoFrameFormat, type CaptureOptions, type CaptureVideoMetadataHint, type CaptureSession, type BeforeCaptureHook, type ProresProfile, type ParallelProgress, type WorkerTask, type CapturePerfSummary, type CaptureWarning, type SubTimelineWaitOutcome, type WorkerSizing, type StaticVerificationOutcome, explainDrawElementDisabled, type CaptureFailureKind, type MotionBlurOptions } from "@hyperframes/engine";
|
|
2
|
+
import { type EngineConfig, type ExtractionPhaseBreakdown, type VideoFrameFormat, type CaptureOptions, type CaptureVideoMetadataHint, type CaptureSession, type BeforeCaptureHook, type ProresProfile, type ParallelProgress, type WorkerTask, type CapturePerfSummary, type CaptureWarning, type SubTimelineWaitOutcome, type WorkerSizing, type StaticVerificationOutcome, explainDrawElementDisabled, type CaptureFailureKind, displaySize, type MotionBlurOptions } from "@hyperframes/engine";
|
|
3
3
|
import { type ReferenceBackgroundResult } from "@hyperframes/engine";
|
|
4
4
|
import { type ProducerLogger } from "../logger.js";
|
|
5
5
|
import { type RenderOutputFormat } from "./render/renderFormat.js";
|
|
@@ -480,10 +480,7 @@ export declare function createRenderFileLogger(logPath: string, base?: ProducerL
|
|
|
480
480
|
export declare function collectVideoReadinessSkipIds(nativeHdrVideoIds: ReadonlySet<string>, extractedVideos: readonly ExtractedVideoReadinessInput[]): string[];
|
|
481
481
|
interface ExtractedVideoReadinessInput {
|
|
482
482
|
videoId: string;
|
|
483
|
-
metadata:
|
|
484
|
-
width: number;
|
|
485
|
-
height: number;
|
|
486
|
-
};
|
|
483
|
+
metadata: Parameters<typeof displaySize>[0];
|
|
487
484
|
}
|
|
488
485
|
export declare function collectVideoMetadataHints(extractedVideos: readonly ExtractedVideoReadinessInput[]): CaptureVideoMetadataHint[];
|
|
489
486
|
export declare function findMissingFrameRanges(totalFrames: number, framesDir: string, frameExt: "jpg" | "png"): FrameRange[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/producer",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.16",
|
|
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.11.0",
|
|
37
37
|
"puppeteer-core": "^25.11.0",
|
|
38
|
-
"@hyperframes/
|
|
39
|
-
"@hyperframes/
|
|
40
|
-
"@hyperframes/
|
|
41
|
-
"@hyperframes/
|
|
42
|
-
"@hyperframes/
|
|
38
|
+
"@hyperframes/lint": "0.9.16",
|
|
39
|
+
"@hyperframes/engine": "0.9.16",
|
|
40
|
+
"@hyperframes/core": "0.9.16",
|
|
41
|
+
"@hyperframes/parsers": "0.9.16",
|
|
42
|
+
"@hyperframes/studio-server": "0.9.16"
|
|
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.9.
|
|
51
|
+
"@hyperframes/aws-lambda": "0.9.16"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=22"
|