@hyperframes/producer 0.8.222 → 0.8.224
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 +13 -7
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +70 -70
- package/dist/index.js +36 -10
- package/dist/public-server.js +36 -10
- package/dist/services/htmlCompiler.d.ts +1 -0
- package/dist/services/render/hdrMode.d.ts +4 -1
- package/dist/services/render/shared.d.ts +1 -0
- package/dist/services/render/stages/captureHdrStage.d.ts +1 -0
- package/dist/services/render/stages/extractVideosStage.d.ts +1 -1
- package/dist/services/renderMediaCollector.d.ts +1 -0
- package/package.json +7 -7
package/dist/distributed.js
CHANGED
|
@@ -1439,6 +1439,7 @@ import { renameWithRetry as renameWithRetry2 } from "@hyperframes/engine";
|
|
|
1439
1439
|
import {
|
|
1440
1440
|
analyzeCompositionHdr,
|
|
1441
1441
|
formatHdrAutoPromotionWarning,
|
|
1442
|
+
gradingKeepsSdr,
|
|
1442
1443
|
HDR_AUTO_PROMOTION_PIPELINE,
|
|
1443
1444
|
isHdrColorSpace,
|
|
1444
1445
|
sanitizeHdrAutoPromotionAsset
|
|
@@ -1446,8 +1447,8 @@ import {
|
|
|
1446
1447
|
function formatCarriesHdr(format) {
|
|
1447
1448
|
return format === "mp4";
|
|
1448
1449
|
}
|
|
1449
|
-
function rendersSdrOnly(config) {
|
|
1450
|
-
return config.hdrMode === "force-sdr" || !formatCarriesHdr(config.format ?? "mp4");
|
|
1450
|
+
function rendersSdrOnly(config, media) {
|
|
1451
|
+
return config.hdrMode === "force-sdr" || gradingKeepsSdr(config.hdrMode, media) || !formatCarriesHdr(config.format ?? "mp4");
|
|
1451
1452
|
}
|
|
1452
1453
|
|
|
1453
1454
|
// src/services/render/captureBeyondViewport.ts
|
|
@@ -1967,6 +1968,7 @@ import {
|
|
|
1967
1968
|
} from "@hyperframes/core/media-timing";
|
|
1968
1969
|
import {
|
|
1969
1970
|
parseVideoElements,
|
|
1971
|
+
hasGradedCanvas,
|
|
1970
1972
|
parseImageElements,
|
|
1971
1973
|
parseAudioElements,
|
|
1972
1974
|
isSelfOrAncestorHidden,
|
|
@@ -2101,7 +2103,7 @@ function collectRenderMedia(html) {
|
|
|
2101
2103
|
if (placed) audios.push(placed);
|
|
2102
2104
|
else droppedMediaIds.add(elementId);
|
|
2103
2105
|
}
|
|
2104
|
-
return { videos, audios, images, droppedMediaIds };
|
|
2106
|
+
return { videos, audios, images, droppedMediaIds, gradedCanvas: hasGradedCanvas(html) };
|
|
2105
2107
|
}
|
|
2106
2108
|
function placeAudio(audio, window2) {
|
|
2107
2109
|
const authoredEnd = audio.end > 0 ? audio.end : Infinity;
|
|
@@ -4156,7 +4158,7 @@ async function compileForRender(projectDir, htmlPath, downloadDir, options = {})
|
|
|
4156
4158
|
for (const [relPath, absPath] of preparedHeifAssets) {
|
|
4157
4159
|
externalAssets.set(relPath, absPath);
|
|
4158
4160
|
}
|
|
4159
|
-
const { videos, audios, images, droppedMediaIds } = collectRenderMedia(html);
|
|
4161
|
+
const { videos, audios, images, droppedMediaIds, gradedCanvas } = collectRenderMedia(html);
|
|
4160
4162
|
const masterFxChain = parseMasterFxChain(html);
|
|
4161
4163
|
const advised = /* @__PURE__ */ new Set();
|
|
4162
4164
|
for (const video of videos) {
|
|
@@ -4195,6 +4197,7 @@ async function compileForRender(projectDir, htmlPath, downloadDir, options = {})
|
|
|
4195
4197
|
audios,
|
|
4196
4198
|
images,
|
|
4197
4199
|
droppedMediaIds,
|
|
4200
|
+
gradedCanvas,
|
|
4198
4201
|
...masterFxChain ? { masterFxChain } : {},
|
|
4199
4202
|
unresolvedCompositions,
|
|
4200
4203
|
externalAssets,
|
|
@@ -4648,6 +4651,7 @@ async function runCompileStage(input) {
|
|
|
4648
4651
|
videos: compiled.videos,
|
|
4649
4652
|
audios: compiled.audios,
|
|
4650
4653
|
images: compiled.images,
|
|
4654
|
+
gradedCanvas: compiled.gradedCanvas,
|
|
4651
4655
|
masterFxChain: compiled.masterFxChain,
|
|
4652
4656
|
width: compiled.width,
|
|
4653
4657
|
height: compiled.height
|
|
@@ -5426,6 +5430,7 @@ import {
|
|
|
5426
5430
|
detectTransfer,
|
|
5427
5431
|
extractAllVideoFrames,
|
|
5428
5432
|
extractMediaMetadata as extractMediaMetadata3,
|
|
5433
|
+
gradingKeepsSdr as gradingKeepsSdr2,
|
|
5429
5434
|
isVideoPastTimelineEnd,
|
|
5430
5435
|
isHdrColorSpace as isHdrColorSpace2,
|
|
5431
5436
|
rebaseVideoToWindow,
|
|
@@ -5666,10 +5671,11 @@ async function runExtractVideosStage(input) {
|
|
|
5666
5671
|
let failureToEnforce = null;
|
|
5667
5672
|
let videoReadinessSkipIds = [];
|
|
5668
5673
|
let videoMetadataHints = [];
|
|
5674
|
+
const probesHdr = job.config.hdrMode !== "force-sdr" && !gradingKeepsSdr2(job.config.hdrMode, composition);
|
|
5669
5675
|
const nativeHdrVideoIds = /* @__PURE__ */ new Set();
|
|
5670
5676
|
const videoTransfers = /* @__PURE__ */ new Map();
|
|
5671
5677
|
let hdrProbeTransientRetries = 0;
|
|
5672
|
-
if (
|
|
5678
|
+
if (probesHdr && composition.videos.length > 0) {
|
|
5673
5679
|
log?.info("Probing video color spaces...", { videoCount: composition.videos.length });
|
|
5674
5680
|
const probeFailures = await Promise.all(
|
|
5675
5681
|
composition.videos.map(async (v) => {
|
|
@@ -5708,7 +5714,7 @@ async function runExtractVideosStage(input) {
|
|
|
5708
5714
|
const imageTransfers = /* @__PURE__ */ new Map();
|
|
5709
5715
|
const hdrImageSrcPaths = /* @__PURE__ */ new Map();
|
|
5710
5716
|
const imageColorSpaces = [];
|
|
5711
|
-
if (
|
|
5717
|
+
if (probesHdr && composition.images.length > 0) {
|
|
5712
5718
|
const probed = await Promise.all(
|
|
5713
5719
|
composition.images.map(async (img) => {
|
|
5714
5720
|
const imgPath = resolveProjectRelativeSrc3(img.src, projectDir, compiledDir);
|
|
@@ -5745,7 +5751,7 @@ async function runExtractVideosStage(input) {
|
|
|
5745
5751
|
fps: job.config.fps,
|
|
5746
5752
|
outputDir: join9(compiledDir, "__hyperframes_video_frames"),
|
|
5747
5753
|
format: job.config.videoFrameFormat ?? "auto",
|
|
5748
|
-
toneMapHdrToSdr: rendersSdrOnly(job.config),
|
|
5754
|
+
toneMapHdrToSdr: rendersSdrOnly(job.config, composition),
|
|
5749
5755
|
timelineEnd: composition.duration,
|
|
5750
5756
|
maxTransientRetries: extractionPolicy.maxTransientRetries,
|
|
5751
5757
|
collectProbeFailures: extractionPolicy.failureMode === "enforce",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "0.1.0",
|
|
3
3
|
"buildId": "dev",
|
|
4
|
-
"sha256": "
|
|
4
|
+
"sha256": "1503dd37b026878d624c777b74f45676d66598b0f1f927fb419e904de6b54031",
|
|
5
5
|
"artifacts": {
|
|
6
6
|
"iife": "hyperframe.runtime.iife.js",
|
|
7
7
|
"esm": "hyperframe.runtime.mjs"
|