hyperframes 0.7.1 → 0.7.2
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/cli.js +47 -4
- package/dist/studio/assets/{index-wWkKTkIq.js → index-BG050Nfr.js} +1 -1
- package/dist/studio/assets/{index-Z4bA3Fi0.js → index-C3MVn8bx.js} +2 -2
- package/dist/studio/assets/{index-CnYOrmoA.js → index-swAL4KtD.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -50,7 +50,7 @@ var VERSION;
|
|
|
50
50
|
var init_version = __esm({
|
|
51
51
|
"src/version.ts"() {
|
|
52
52
|
"use strict";
|
|
53
|
-
VERSION = true ? "0.7.
|
|
53
|
+
VERSION = true ? "0.7.2" : "0.0.0-dev";
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
|
|
@@ -35159,8 +35159,10 @@ async function extractAudioMetadata(filePath) {
|
|
|
35159
35159
|
const audioStream = output.streams.find((s2) => s2.codec_type === "audio");
|
|
35160
35160
|
if (!audioStream) throw new Error("[FFmpeg] No audio stream found");
|
|
35161
35161
|
const durationSeconds = output.format.duration ? parseFloat(output.format.duration) : 0;
|
|
35162
|
+
const streamDuration = audioStream.duration ? parseFloat(audioStream.duration) : void 0;
|
|
35162
35163
|
return {
|
|
35163
35164
|
durationSeconds,
|
|
35165
|
+
streamDurationSeconds: streamDuration && streamDuration > 0 ? streamDuration : void 0,
|
|
35164
35166
|
sampleRate: audioStream.sample_rate ? parseInt(audioStream.sample_rate) : 44100,
|
|
35165
35167
|
channels: audioStream.channels || 2,
|
|
35166
35168
|
audioCodec: audioStream.codec_name || "unknown",
|
|
@@ -35754,7 +35756,7 @@ async function muxVideoWithAudio(videoPath, audioPath, outputPath, signal, confi
|
|
|
35754
35756
|
if (fps !== void 0) {
|
|
35755
35757
|
args.push("-r", fpsToFfmpegArg(fps));
|
|
35756
35758
|
}
|
|
35757
|
-
args.push("-
|
|
35759
|
+
args.push("-y", outputPath);
|
|
35758
35760
|
const processTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG2.ffmpegProcessTimeout;
|
|
35759
35761
|
const result = await runFfmpeg(args, { signal, timeout: processTimeout });
|
|
35760
35762
|
if (signal?.aborted) {
|
|
@@ -42425,6 +42427,8 @@ function trackRenderComplete(props) {
|
|
|
42425
42427
|
stage_video_extract_ms: props.stageVideoExtractMs,
|
|
42426
42428
|
stage_audio_process_ms: props.stageAudioProcessMs,
|
|
42427
42429
|
stage_capture_ms: props.stageCaptureMs,
|
|
42430
|
+
stage_capture_setup_ms: props.stageCaptureSetupMs,
|
|
42431
|
+
stage_capture_frame_ms: props.stageCaptureFrameMs,
|
|
42428
42432
|
stage_encode_ms: props.stageEncodeMs,
|
|
42429
42433
|
stage_assemble_ms: props.stageAssembleMs,
|
|
42430
42434
|
extract_resolve_ms: props.extractResolveMs,
|
|
@@ -47115,6 +47119,8 @@ function stagesPayload(stages) {
|
|
|
47115
47119
|
stageVideoExtractMs: stages.videoExtractMs,
|
|
47116
47120
|
stageAudioProcessMs: stages.audioProcessMs,
|
|
47117
47121
|
stageCaptureMs: stages.captureMs,
|
|
47122
|
+
stageCaptureSetupMs: stages.captureSetupMs,
|
|
47123
|
+
stageCaptureFrameMs: stages.captureFrameMs,
|
|
47118
47124
|
stageEncodeMs: stages.encodeMs,
|
|
47119
47125
|
stageAssembleMs: stages.assembleMs
|
|
47120
47126
|
};
|
|
@@ -92490,6 +92496,7 @@ function extractRequestedFontFamilies(html) {
|
|
|
92490
92496
|
for (const originalCase of families) {
|
|
92491
92497
|
const normalized = originalCase.toLowerCase();
|
|
92492
92498
|
if (!normalized || GENERIC_FAMILIES2.has(normalized)) continue;
|
|
92499
|
+
if (normalized.startsWith("var(")) continue;
|
|
92493
92500
|
if (!requested.has(normalized)) requested.set(normalized, originalCase);
|
|
92494
92501
|
}
|
|
92495
92502
|
}
|
|
@@ -94335,7 +94342,9 @@ function buildRenderPerfSummary(input2) {
|
|
|
94335
94342
|
hdrDiagnostics: input2.hdrDiagnostics.videoExtractionFailures > 0 || input2.hdrDiagnostics.imageDecodeFailures > 0 ? { ...input2.hdrDiagnostics } : void 0,
|
|
94336
94343
|
hdrPerf: input2.hdrPerf ? finalizeHdrPerf(input2.hdrPerf) : void 0,
|
|
94337
94344
|
observability: input2.observability,
|
|
94338
|
-
captureAvgMs: input2.totalFrames > 0 ? Math.round(
|
|
94345
|
+
captureAvgMs: input2.totalFrames > 0 ? Math.round(
|
|
94346
|
+
(input2.perfStages.captureFrameMs ?? input2.perfStages.captureMs ?? 0) / input2.totalFrames
|
|
94347
|
+
) : void 0,
|
|
94339
94348
|
peakRssMb: Math.round(input2.peakRssBytes / (1024 * 1024)),
|
|
94340
94349
|
peakHeapUsedMb: Math.round(input2.peakHeapUsedBytes / (1024 * 1024)),
|
|
94341
94350
|
staticDedup: aggregateDedup(input2.dedupPerfs)
|
|
@@ -99458,6 +99467,12 @@ function shouldUseStreamingEncode(cfg, outputFormat, workerCount, durationSecond
|
|
|
99458
99467
|
if (durationSeconds > cfg.streamingEncodeMaxDurationSeconds) return false;
|
|
99459
99468
|
return workerCount === 1;
|
|
99460
99469
|
}
|
|
99470
|
+
function resolveCaptureForceScreenshotForPageSideCompositing(args) {
|
|
99471
|
+
return args.usePageSideCompositing ? true : args.forceScreenshot;
|
|
99472
|
+
}
|
|
99473
|
+
function shouldDiscardProbeSessionForPageSideCompositing(args) {
|
|
99474
|
+
return args.hasProbeSession && args.usePageSideCompositing;
|
|
99475
|
+
}
|
|
99461
99476
|
function extractStandaloneEntryFromIndex(indexHtml, entryFile) {
|
|
99462
99477
|
const normalizedEntryFile = normalizeCompositionSrcPath(entryFile);
|
|
99463
99478
|
const { document: document2 } = parseHTML(indexHtml);
|
|
@@ -99875,8 +99890,24 @@ async function executeRenderJob(job, projectDir, outputPath, onProgress, abortSi
|
|
|
99875
99890
|
const usePageSideCompositingForTransitions = (cfg.enablePageSideCompositing || isGif) && compiled.hasShaderTransitions && !hasHdrContent && !isPngSequence && !needsAlpha;
|
|
99876
99891
|
if (usePageSideCompositingForTransitions) {
|
|
99877
99892
|
activeFileServer.addPreHeadScript(HF_PAGE_SIDE_COMPOSITING_STUB);
|
|
99893
|
+
if (shouldDiscardProbeSessionForPageSideCompositing({
|
|
99894
|
+
hasProbeSession: probeSession !== null,
|
|
99895
|
+
usePageSideCompositing: true
|
|
99896
|
+
}) && probeSession) {
|
|
99897
|
+
lastBrowserConsole = probeSession.browserConsoleBuffer;
|
|
99898
|
+
await closeCaptureSession(probeSession);
|
|
99899
|
+
probeSession = null;
|
|
99900
|
+
log2.info(
|
|
99901
|
+
"[Render] Recreating capture session so page-side compositing pre-head script is loaded."
|
|
99902
|
+
);
|
|
99903
|
+
}
|
|
99904
|
+
captureForceScreenshot = resolveCaptureForceScreenshotForPageSideCompositing({
|
|
99905
|
+
forceScreenshot: captureForceScreenshot,
|
|
99906
|
+
usePageSideCompositing: true
|
|
99907
|
+
});
|
|
99908
|
+
updateCaptureObservability({ forceScreenshot: captureForceScreenshot });
|
|
99878
99909
|
log2.info(
|
|
99879
|
-
"[Render] Page-side compositing enabled \u2014 bypassing Node-side layered shader-blend path. Engine will capture one opaque RGB
|
|
99910
|
+
"[Render] Page-side compositing enabled \u2014 bypassing Node-side layered shader-blend path. Engine will capture one opaque RGB screenshot per output frame."
|
|
99880
99911
|
);
|
|
99881
99912
|
}
|
|
99882
99913
|
const useLayeredComposite = !usePageSideCompositingForTransitions && shouldUseLayeredComposite({
|
|
@@ -99955,10 +99986,13 @@ async function executeRenderJob(job, projectDir, outputPath, onProgress, abortSi
|
|
|
99955
99986
|
lastBrowserConsole = hdrRes.lastBrowserConsole;
|
|
99956
99987
|
hdrPerf = hdrRes.hdrPerf;
|
|
99957
99988
|
perfStages.captureMs = hdrRes.captureDurationMs;
|
|
99989
|
+
perfStages.captureFrameMs = hdrRes.captureDurationMs;
|
|
99990
|
+
perfStages.captureSetupMs = Math.max(0, Date.now() - stage4Start - hdrRes.captureDurationMs);
|
|
99958
99991
|
perfStages.encodeMs = hdrRes.encodeMs;
|
|
99959
99992
|
} else {
|
|
99960
99993
|
let streamingHandled = false;
|
|
99961
99994
|
if (useStreamingEncode) {
|
|
99995
|
+
const captureFrameStart = Date.now();
|
|
99962
99996
|
const streamingRes = await observeRenderStage(
|
|
99963
99997
|
observability,
|
|
99964
99998
|
"capture_streaming",
|
|
@@ -99998,6 +100032,7 @@ async function executeRenderJob(job, projectDir, outputPath, onProgress, abortSi
|
|
|
99998
100032
|
dedupPerfs
|
|
99999
100033
|
})
|
|
100000
100034
|
);
|
|
100035
|
+
const captureFrameMs = Date.now() - captureFrameStart;
|
|
100001
100036
|
if (streamingRes.success) {
|
|
100002
100037
|
streamingHandled = true;
|
|
100003
100038
|
workerCount = streamingRes.workerCount;
|
|
@@ -100005,6 +100040,8 @@ async function executeRenderJob(job, projectDir, outputPath, onProgress, abortSi
|
|
|
100005
100040
|
probeSession = streamingRes.probeSession;
|
|
100006
100041
|
lastBrowserConsole = streamingRes.lastBrowserConsole;
|
|
100007
100042
|
perfStages.captureMs = Date.now() - stage4Start;
|
|
100043
|
+
perfStages.captureFrameMs = captureFrameMs;
|
|
100044
|
+
perfStages.captureSetupMs = Math.max(0, perfStages.captureMs - captureFrameMs);
|
|
100008
100045
|
perfStages.encodeMs = streamingRes.encodeMs;
|
|
100009
100046
|
} else {
|
|
100010
100047
|
useStreamingEncode = false;
|
|
@@ -100013,6 +100050,7 @@ async function executeRenderJob(job, projectDir, outputPath, onProgress, abortSi
|
|
|
100013
100050
|
}
|
|
100014
100051
|
}
|
|
100015
100052
|
if (!streamingHandled) {
|
|
100053
|
+
const captureFrameStart = Date.now();
|
|
100016
100054
|
const captureRes = await observeRenderStage(
|
|
100017
100055
|
observability,
|
|
100018
100056
|
"capture_disk",
|
|
@@ -100038,11 +100076,14 @@ async function executeRenderJob(job, projectDir, outputPath, onProgress, abortSi
|
|
|
100038
100076
|
onProgress
|
|
100039
100077
|
})
|
|
100040
100078
|
);
|
|
100079
|
+
const captureFrameMs = Date.now() - captureFrameStart;
|
|
100041
100080
|
workerCount = captureRes.workerCount;
|
|
100042
100081
|
updateCaptureObservability({ workerCount });
|
|
100043
100082
|
probeSession = captureRes.probeSession;
|
|
100044
100083
|
lastBrowserConsole = captureRes.lastBrowserConsole;
|
|
100045
100084
|
perfStages.captureMs = Date.now() - stage4Start;
|
|
100085
|
+
perfStages.captureFrameMs = captureFrameMs;
|
|
100086
|
+
perfStages.captureSetupMs = Math.max(0, perfStages.captureMs - captureFrameMs);
|
|
100046
100087
|
const encodeRes = await observeRenderStage(
|
|
100047
100088
|
observability,
|
|
100048
100089
|
"encode",
|
|
@@ -107637,6 +107678,8 @@ function trackRenderMetrics(job, elapsedMs, options, docker) {
|
|
|
107637
107678
|
stageVideoExtractMs: stages.videoExtractMs,
|
|
107638
107679
|
stageAudioProcessMs: stages.audioProcessMs,
|
|
107639
107680
|
stageCaptureMs: stages.captureMs,
|
|
107681
|
+
stageCaptureSetupMs: stages.captureSetupMs,
|
|
107682
|
+
stageCaptureFrameMs: stages.captureFrameMs,
|
|
107640
107683
|
stageEncodeMs: stages.encodeMs,
|
|
107641
107684
|
stageAssembleMs: stages.assembleMs,
|
|
107642
107685
|
extractResolveMs: extract?.resolveMs,
|