hyperframes 0.9.10 → 0.9.12
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 +9 -0
- package/dist/{add-AFD3HNXB.js → add-NLR4EVAF.js} +6 -6
- package/dist/{agentPromptGenerator-XNGPKVEX.js → agentPromptGenerator-S3GWYMVC.js} +1 -1
- package/dist/{animatedGifPrep-E3PYKFJ3.js → animatedGifPrep-YU7IOD5D.js} +1 -1
- package/dist/api.js +13 -12
- package/dist/{asset-P6SF46UX.js → asset-7NPBAXDA.js} +2 -2
- package/dist/{assetCataloger-SDFP4DWL.js → assetCataloger-VKJIQCYP.js} +1 -1
- package/dist/{audio-DFQXEAEE.js → audio-ZNVUZH44.js} +12 -11
- package/dist/{auth-T62ANGDQ.js → auth-PTVZNLE6.js} +1 -1
- package/dist/{autoUpdate-3IT56KGL.js → autoUpdate-QJPCV7FB.js} +3 -3
- package/dist/{backgroundChecks-UKBVUYML.js → backgroundChecks-UA6LCZAG.js} +4 -4
- package/dist/backgroundChecksWorker.js +4 -4
- package/dist/{batchRender-ZDL65J7N.js → batchRender-W4RXBUNE.js} +6 -3
- package/dist/{beats-7UFMDXBY.js → beats-IG7C72YF.js} +6 -6
- package/dist/{benchmark-LCSHBJJF.js → benchmark-YUD3XIT2.js} +7 -7
- package/dist/{browser-5DZHA4EW.js → browser-TZILXH5J.js} +4 -4
- package/dist/{bundleWithLocalizedFonts-TJL2JWRD.js → bundleWithLocalizedFonts-BOIW3CIU.js} +2 -2
- package/dist/{capture-UKWY3SZQ.js → capture-MICLAF6V.js} +13 -13
- package/dist/{capture-HLC6I4RE.js → capture-R77HOGLQ.js} +3 -3
- package/dist/{captureCompositionFrame-YMB3CKSP.js → captureCompositionFrame-WBMFZHEF.js} +4 -4
- package/dist/{catalog-F2XB4VPP.js → catalog-AMPL57XF.js} +6 -6
- package/dist/{catch-up-HCBA3MIP.js → catch-up-WQ7ZRRFT.js} +5 -5
- package/dist/{check-E2RQCELF.js → check-ZPBF3X5D.js} +23 -23
- package/dist/{checkAudio-R4DRK3VG.js → checkAudio-IG3BOW2G.js} +3 -3
- package/dist/{checkBrowser-NGY225IO.js → checkBrowser-AIUIKFMJ.js} +17 -17
- package/dist/{chunk-BYC4C4YY.js → chunk-2VYAX3ZD.js} +2 -2
- package/dist/{chunk-GIYZMGYT.js → chunk-2VZVMCV6.js} +1 -1
- package/dist/{chunk-YTNHZT47.js → chunk-3IKLV3D4.js} +1 -1
- package/dist/chunk-3S27CPV7.js +17 -0
- package/dist/{chunk-NCP3JQ6S.js → chunk-4J4EGANW.js} +2 -2
- package/dist/{chunk-2CKL2FUJ.js → chunk-4XGASFTP.js} +2 -2
- package/dist/{chunk-XTYNW745.js → chunk-5WHGO5XU.js} +1 -1
- package/dist/{chunk-7VOLQUA2.js → chunk-64ZWPFAX.js} +1 -1
- package/dist/{upgrade-2FS4AMCA.js → chunk-6IFY3ZQC.js} +65 -27
- package/dist/{chunk-ZMXFRRQR.js → chunk-6NKEEHFR.js} +10 -15
- package/dist/{chunk-6HO6QKYG.js → chunk-6R2PED3X.js} +6 -6
- package/dist/{chunk-WWPOGMNX.js → chunk-73EXHUMD.js} +1 -1
- package/dist/{chunk-QPEDM2ZR.js → chunk-7XKWBMBL.js} +5 -3
- package/dist/{chunk-CDSTLOB7.js → chunk-B3IE7CN2.js} +8 -8
- package/dist/{chunk-BLBMPEBX.js → chunk-BONBJJ35.js} +1 -0
- package/dist/{chunk-Q3W7TDQX.js → chunk-BW2RIJKV.js} +238 -195
- package/dist/{chunk-B5GWDPUO.js → chunk-EPCVE3OX.js} +2 -2
- package/dist/{chunk-6UZLHLFP.js → chunk-FC4WF2VQ.js} +1 -1
- package/dist/{chunk-P4WYY52Y.js → chunk-FFUBISTD.js} +1 -1
- package/dist/{chunk-DKROJ3GJ.js → chunk-H7H7XNYY.js} +80 -20
- package/dist/{chunk-JZPUXDQE.js → chunk-HY64QA63.js} +1 -1
- package/dist/{chunk-RZFW7FBA.js → chunk-JKSASCBT.js} +2 -2
- package/dist/{chunk-PPMCILED.js → chunk-JS6ZTPYC.js} +4 -4
- package/dist/{chunk-7VU4RBHC.js → chunk-KDOJX2HU.js} +9 -9
- package/dist/{chunk-NBWYATVA.js → chunk-KT4KPBI7.js} +194 -17
- package/dist/{chunk-CBTBVRXB.js → chunk-LIN633KG.js} +4 -4
- package/dist/{chunk-WP5QHNXN.js → chunk-LO3EX3YP.js} +17 -5
- package/dist/{chunk-EN6MPNZT.js → chunk-NQYW4IYN.js} +2 -2
- package/dist/{chunk-NVYVI4FR.js → chunk-NTHJJ6JT.js} +3 -3
- package/dist/{chunk-QUBVGS27.js → chunk-OQKAP6X4.js} +4 -4
- package/dist/{chunk-QBPZHOEJ.js → chunk-P3KBDUNS.js} +1 -1
- package/dist/{chunk-CUYVIDGF.js → chunk-P7Y2YCOF.js} +1 -1
- package/dist/{chunk-BHL4KN3H.js → chunk-PKLZ5PV2.js} +1 -1
- package/dist/{chunk-6VKYITOR.js → chunk-Q225NLQL.js} +1 -1
- package/dist/{chunk-5CDTGHED.js → chunk-QFZ3ZSXI.js} +2 -2
- package/dist/{chunk-W4Q6VYPZ.js → chunk-RFTLWXEX.js} +2 -2
- package/dist/{chunk-G3ERWPNV.js → chunk-TNTQ7H24.js} +15 -1
- package/dist/{chunk-PO7LSMN5.js → chunk-UH62KSYV.js} +2 -2
- package/dist/{chunk-UDBNPVUR.js → chunk-URJ7T6T6.js} +1 -1
- package/dist/{chunk-MHZ7NSL5.js → chunk-VECINIPA.js} +1 -1
- package/dist/{chunk-2WNIF4YT.js → chunk-VUMGJLRB.js} +1 -1
- package/dist/{chunk-PYUS627M.js → chunk-VWQY3A64.js} +2 -2
- package/dist/{chunk-7VGM5TLZ.js → chunk-WQ4SMZDF.js} +2 -2
- package/dist/{chunk-WCETVN3N.js → chunk-WTGG734B.js} +24 -38
- package/dist/{chunk-YXSM33UC.js → chunk-X6XIY4JY.js} +9 -9
- package/dist/{skills-T5XCP3RC.js → chunk-XJG65BB2.js} +25 -32
- package/dist/{chunk-SRVAYGTN.js → chunk-XZP5OW5V.js} +5 -4
- package/dist/{chunk-GRUI2S2F.js → chunk-YEBIOQRI.js} +1 -1
- package/dist/{chunk-3XHWHH5A.js → chunk-Z2DJSEQC.js} +23 -23
- package/dist/{chunk-NO6F7CLR.js → chunk-Z4GE5BXC.js} +5 -2
- package/dist/{clean-BXHJEVVO.js → clean-343XOJT3.js} +8 -8
- package/dist/cli.js +60 -59
- package/dist/{cloud-ISWLTHGP.js → cloud-2YS272KD.js} +4 -4
- package/dist/{cloud-Z3FNCC4T.js → cloud-B6SGMECY.js} +3 -2
- package/dist/{compare-MLZYDSZD.js → compare-KXCTMXFX.js} +19 -16
- package/dist/{compiler-NAIDMQFU.js → compiler-KKIYPREA.js} +1 -1
- package/dist/{component-MMBTCMY3.js → component-ZUDCIGGD.js} +3 -3
- package/dist/{compositions-WT2577NJ.js → compositions-FNFI2QOA.js} +7 -7
- package/dist/{curve-HHKVZ6LX.js → curve-5BMBBCSZ.js} +5 -5
- package/dist/{cuts-66GBRT5P.js → cuts-OKUA6BWH.js} +5 -5
- package/dist/{delete-P3WYOC7I.js → delete-FYMFNSED.js} +7 -6
- package/dist/{deploy-OJ3M7QJQ.js → deploy-YZU2YITA.js} +8 -8
- package/dist/{describeProject-DN6YQU3X.js → describeProject-E44RWBJL.js} +1 -1
- package/dist/{diff-R74KQXXN.js → diff-5X6I6EG5.js} +20 -19
- package/dist/{dist-CCPYPKOC.js → dist-PUHEYGA5.js} +3 -3
- package/dist/{doctor-DT52W4UE.js → doctor-3DXWW63F.js} +9 -5
- package/dist/{energy-WOMDOOLC.js → energy-4HY7COXH.js} +5 -5
- package/dist/{events-YVQJLQWG.js → events-JAGPGK7R.js} +4 -4
- package/dist/{events-PCK4AIN5.js → events-TFVE7AUR.js} +3 -3
- package/dist/{events-WEVZ2ELP.js → events-ULVZ7V2C.js} +6 -6
- package/dist/{extract-CNXA3DWB.js → extract-5KTFRIH2.js} +11 -8
- package/dist/{face-2WNBW74C.js → face-T6D34LR7.js} +8 -7
- package/dist/{feedback-ADMM2XDS.js → feedback-QQQYENCU.js} +5 -5
- package/dist/{ffmpeg-PERZ6YHQ.js → ffmpeg-A2O4HSRD.js} +1 -1
- package/dist/{figma-5MMN5JUU.js → figma-4RODZMCT.js} +3 -3
- package/dist/fontLocalizeCli.js +3 -3
- package/dist/{frames-7CQGHRWT.js → frames-L43TSSAY.js} +5 -5
- package/dist/{generate-XOR4UJDW.js → generate-7HZKBLPZ.js} +9 -8
- package/dist/{get-5K6ALHBS.js → get-MXKV4NUL.js} +7 -6
- package/dist/{gpuPolicy-DUNSQM6M.js → gpuPolicy-TKHFDEH2.js} +2 -2
- package/dist/{grade-compare-DK63C776.js → grade-compare-KNXFKMFI.js} +18 -16
- package/dist/{heifImagePrep-YNPHFR6W.js → heifImagePrep-L2EY67F2.js} +1 -1
- package/dist/{help-AUF2KA6D.js → help-YN43ORVX.js} +3 -2
- package/dist/{history-G3FXVX4A.js → history-VAMN53LT.js} +7 -7
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-DGU3CIU5.js → info-QKEEGK2R.js} +6 -6
- package/dist/{init-LYZI2WCS.js → init-AAA44PYH.js} +15 -15
- package/dist/{ink-DYZG4BST.js → ink-V6CEFYB6.js} +5 -5
- package/dist/{inspect-BYQSCRKT.js → inspect-5JGTWCYO.js} +15 -15
- package/dist/{keyframes-XX2DIYPI.js → keyframes-FJNUSXAF.js} +7 -7
- package/dist/{lambda-RKI7KKWW.js → lambda-RYCG67CX.js} +3 -3
- package/dist/{layout-RQFOMQRO.js → layout-DXIPVY3W.js} +15 -15
- package/dist/{lint-LFCMCDEG.js → lint-JZADWIMR.js} +7 -7
- package/dist/{list-V4TGMQ3Y.js → list-YRLUJMP6.js} +7 -6
- package/dist/{localPage-6MQ6YFER.js → localPage-KIFKMB2B.js} +1 -1
- package/dist/{login-EXCG7PEH.js → login-H74JDEJ2.js} +4 -4
- package/dist/{look-RBHKHGMF.js → look-WVGBBYFE.js} +5 -5
- package/dist/{manager-ARXEX6OP.js → manager-T633Z2L4.js} +1 -1
- package/dist/{measure-SAV5K4WT.js → measure-DWQHHY3H.js} +11 -11
- package/dist/{media-treatment-2BVHRXJS.js → media-treatment-JHDDWRFU.js} +8 -8
- package/dist/{media-use-YEBYLITF.js → media-use-5SDC3MCE.js} +2 -1
- package/dist/{models-GMJODMZ5.js → models-6SOW23N6.js} +5 -5
- package/dist/{motionShot-Z63I3GO7.js → motionShot-B4K6LEU3.js} +12 -9
- package/dist/{normalize-audio-ILLUZPTO.js → normalize-audio-O6STMACD.js} +5 -5
- package/dist/{open-GTNLU7UF.js → open-VRCTXBD3.js} +5 -5
- package/dist/{parakeetRunner-K4EGDDVH.js → parakeetRunner-MNOIBRZZ.js} +5 -4
- package/dist/{pipeline-EKLTELWF.js → pipeline-N3M6VXBC.js} +4 -4
- package/dist/{play-F2HIXJKH.js → play-5WUZGJ4B.js} +10 -10
- package/dist/{preflight-QMXCKE5P.js → preflight-XZZXHV42.js} +1 -1
- package/dist/{present-GDR6LCKE.js → present-W7OODR7J.js} +10 -10
- package/dist/{preview-4TV5426Q.js → preview-NOQSYZAD.js} +9 -9
- package/dist/{probe-TYM7WKX2.js → probe-WFIYEXM5.js} +7 -6
- package/dist/{producer-NHQXKH7Y.js → producer-HI6M6755.js} +1 -1
- package/dist/{remove-background-LURZDSDJ.js → remove-background-SYHNGASQ.js} +5 -5
- package/dist/{render-GEAO2HAV.js → render-74JIGKTN.js} +13 -12
- package/dist/{render-YLAS7GVD.js → render-GYQZQB2O.js} +24 -21
- package/dist/{reverse-3KAZZXB2.js → reverse-NEC42AID.js} +1 -1
- package/dist/{run-XER4YJY5.js → run-Z6AW753F.js} +3 -3
- package/dist/{sherpa-D6FQ3CHN.js → sherpa-2ROE6TLC.js} +4 -3
- package/dist/skills/hyperframes/SKILL.md +2 -2
- package/dist/skills/hyperframes/references/plugin-installation.md +5 -6
- package/dist/skills/hyperframes/references/skill-lifecycle.md +15 -10
- package/dist/skills/hyperframes/scripts/plugin-cli.mjs +2 -2
- package/dist/skills/hyperframes-cli/SKILL.md +5 -3
- package/dist/skills/hyperframes-cli/references/init-and-scaffold.md +10 -14
- package/dist/skills/media-use/SKILL.md +2 -2
- package/dist/skills/media-use/audio/scripts/lib/sfx.mjs +2 -2
- package/dist/skills/media-use/audio/scripts/lib/tts.mjs +2 -0
- package/dist/skills/media-use/audio/scripts/lib/tts.test.mjs +14 -0
- package/dist/skills/media-use/references/heygen.md +1 -1
- package/dist/skills/media-use/scripts/lib/credit-limit.d.mts +3 -0
- package/dist/skills/media-use/scripts/lib/credit-limit.mjs +41 -0
- package/dist/skills/media-use/scripts/lib/credit-limit.test.mjs +39 -0
- package/dist/skills/media-use/scripts/lib/heygen-video-provider.mjs +2 -0
- package/dist/skills/media-use/scripts/lib/voice-provider.mjs +2 -0
- package/dist/skills-R56MSU2Y.js +49 -0
- package/dist/{skillsUpdateCheck-IG7KLWIA.js → skillsUpdateCheck-I6G3MQWO.js} +6 -4
- package/dist/{snapshot-RULSIRM6.js → snapshot-J2NU7WTJ.js} +18 -18
- package/dist/{src-DHBRQZFZ.js → src-5XQ6A3VE.js} +2 -2
- package/dist/{src-RL6YEPTD.js → src-L7UBHHKB.js} +1 -1
- package/dist/{start-GF3JCTGF.js → start-VUMSNLKC.js} +7 -6
- package/dist/{staticProjectServer-BX4RWEY5.js → staticProjectServer-2JYB7RLI.js} +5 -5
- package/dist/studio/assets/{hyperframes-player-BcELSci_.js → hyperframes-player-Dw-0BWQW.js} +1 -1
- package/dist/studio/assets/{index-DR2eua-L.js → index-BNZeN67E.js} +4 -4
- package/dist/studio/assets/{index-2SLNyxZG.js → index-NwWb1W86.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-PEUXVD7P.js → studio-api-MEZKFJBY.js} +3 -3
- package/dist/{studioServer-DOTRPHS3.js → studioServer-XGR4YPXX.js} +24 -24
- package/dist/{sync-XQPBXGGX.js → sync-ZIMGTQEN.js} +5 -5
- package/dist/{synthesize-YK3WLOEQ.js → synthesize-S3FF5KXC.js} +9 -6
- package/dist/{telemetry-7TIIOBVB.js → telemetry-PT5KSL5T.js} +4 -4
- package/dist/{telemetry-T73TKZOL.js → telemetry-WGNNQUSF.js} +1 -1
- package/dist/{templates-7DIQ52Y4.js → templates-7AT45DZI.js} +4 -1
- package/dist/{timeline-4JIUAUIP.js → timeline-IH422KGC.js} +9 -9
- package/dist/{tokens-4PQU4LVQ.js → tokens-ZVJMHDTM.js} +2 -2
- package/dist/{transcribe-IKUPC2R3.js → transcribe-FRRXA77O.js} +12 -11
- package/dist/{transcribe-N66QUYCS.js → transcribe-QIZGXMR5.js} +1 -1
- package/dist/{tts-HIQMJU6O.js → tts-IMW74GBX.js} +1 -1
- package/dist/update-E2RIAV5T.js +280 -0
- package/dist/{updateCheck-LBPTWEZV.js → updateCheck-EII7XDIR.js} +7 -3
- package/dist/upgrade-BKGP2TM7.js +40 -0
- package/dist/{upload-L5TSWWIU.js → upload-HMRWGZIO.js} +1 -1
- package/dist/{urlDownloader-YNI3Y3IE.js → urlDownloader-FOXK4FYP.js} +1 -1
- package/dist/{validate-MLVDUEK7.js → validate-M4FZVBRP.js} +13 -13
- package/dist/{video-2OEOTSPQ.js → video-AVEGMBDM.js} +1 -1
- package/dist/voices-E5RUGLJK.js +97 -0
- package/dist/warmCheck.js +23 -23
- package/package.json +1 -1
- package/dist/{destroy-C5GQLZVZ.js → destroy-IQLGADZM.js} +4 -4
|
@@ -9,17 +9,17 @@ import {
|
|
|
9
9
|
} from "./chunk-TQBQYO4L.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveProject
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-64ZWPFAX.js";
|
|
13
13
|
import {
|
|
14
14
|
serveStaticProjectHtml
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-2VYAX3ZD.js";
|
|
16
16
|
import {
|
|
17
17
|
AUDIT_SEEK_OPTIONS,
|
|
18
18
|
installPageFunctionGuard,
|
|
19
19
|
seekCompositionTimeline,
|
|
20
20
|
waitForCompositionFonts,
|
|
21
21
|
waitForRuntimeReady
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-6R2PED3X.js";
|
|
23
23
|
import {
|
|
24
24
|
gotoWhenSent
|
|
25
25
|
} from "./chunk-RXFKSZN2.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
import {
|
|
30
30
|
launchManagedBrowser,
|
|
31
31
|
resolveManagedGpuMode
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-PKLZ5PV2.js";
|
|
33
33
|
import {
|
|
34
34
|
readJsonFileText
|
|
35
35
|
} from "./chunk-EHZESMRB.js";
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
import {
|
|
43
43
|
printDeprecationNotice,
|
|
44
44
|
withMeta
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-KT4KPBI7.js";
|
|
46
46
|
import {
|
|
47
47
|
failureMessage,
|
|
48
48
|
jsonFailure
|
|
@@ -709,7 +709,7 @@ async function collectTweenBoundaries(page) {
|
|
|
709
709
|
});
|
|
710
710
|
}
|
|
711
711
|
async function bundleProjectHtml(projectDir) {
|
|
712
|
-
const { bundleToSingleHtml } = await import("./compiler-
|
|
712
|
+
const { bundleToSingleHtml } = await import("./compiler-KKIYPREA.js");
|
|
713
713
|
return bundleToSingleHtml(projectDir);
|
|
714
714
|
}
|
|
715
715
|
async function alignViewportToComposition(page, url) {
|
|
@@ -728,13 +728,13 @@ async function alignViewportToComposition(page, url) {
|
|
|
728
728
|
async function runLayoutAudit(projectDir, opts) {
|
|
729
729
|
const { ensureBrowser } = await import("./manager-SAXHANEY.js");
|
|
730
730
|
const puppeteer = await import("puppeteer-core");
|
|
731
|
-
const { buildChromeArgs } = await import("./src-
|
|
731
|
+
const { buildChromeArgs } = await import("./src-L7UBHHKB.js");
|
|
732
732
|
const {
|
|
733
733
|
assertWebGpuAdapterAvailable,
|
|
734
734
|
compositionRequiresWebGpu,
|
|
735
735
|
resolveLocalBrowserGpuMode,
|
|
736
736
|
resolveLocalWebGpu
|
|
737
|
-
} = await import("./gpuPolicy-
|
|
737
|
+
} = await import("./gpuPolicy-TKHFDEH2.js");
|
|
738
738
|
const html = await bundleProjectHtml(projectDir);
|
|
739
739
|
const server = await serveStaticProjectHtml(
|
|
740
740
|
projectDir,
|
|
@@ -341,6 +341,7 @@ function passthroughFields(parsed) {
|
|
|
341
341
|
pendingUpdate: parsed.pendingUpdate,
|
|
342
342
|
completedUpdate: parsed.completedUpdate,
|
|
343
343
|
lastSkillsCheck: parsed.lastSkillsCheck,
|
|
344
|
+
skillsCheckedVersion: parsed.skillsCheckedVersion,
|
|
344
345
|
skillsUpdateAvailable: parsed.skillsUpdateAvailable,
|
|
345
346
|
skillsOutdatedCount: parsed.skillsOutdatedCount,
|
|
346
347
|
skillsMissingCount: parsed.skillsMissingCount,
|
|
@@ -197,7 +197,7 @@ import {
|
|
|
197
197
|
parsesAsScript,
|
|
198
198
|
prepareFlattenedInnerRoot,
|
|
199
199
|
stripSdrPngColourTags
|
|
200
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-JS6ZTPYC.js";
|
|
201
201
|
import {
|
|
202
202
|
collectScratchLeftovers,
|
|
203
203
|
removeScratch,
|
|
@@ -4995,194 +4995,8 @@ function startRenderEtaGuard(options) {
|
|
|
4995
4995
|
return stop;
|
|
4996
4996
|
}
|
|
4997
4997
|
|
|
4998
|
-
// ../producer/src/services/render/segmentManifest.ts
|
|
4999
|
-
import { createHash as createHash2 } from "crypto";
|
|
5000
|
-
import { existsSync as existsSync7, mkdirSync as mkdirSync4, readFileSync as readFileSync4, statSync as statSync4, writeFileSync as writeFileSync3 } from "fs";
|
|
5001
|
-
import { join as join11 } from "path";
|
|
5002
|
-
var MANIFEST_FILENAME = "segments.json";
|
|
5003
|
-
function computeSegmentPlanHash(input) {
|
|
5004
|
-
const ordered = [
|
|
5005
|
-
input.compositionHash,
|
|
5006
|
-
input.cliVersion,
|
|
5007
|
-
String(input.totalFrames),
|
|
5008
|
-
String(input.segmentFrames),
|
|
5009
|
-
`${input.fps.num}/${input.fps.den}`,
|
|
5010
|
-
`${input.width}x${input.height}`,
|
|
5011
|
-
input.codec,
|
|
5012
|
-
input.preset,
|
|
5013
|
-
input.quality === void 0 ? "" : String(input.quality),
|
|
5014
|
-
input.bitrate ?? "",
|
|
5015
|
-
input.pixelFormat ?? "",
|
|
5016
|
-
input.imageFormat,
|
|
5017
|
-
input.useGpu ? "gpu" : "cpu",
|
|
5018
|
-
`${input.outputWidth}x${input.outputHeight}`,
|
|
5019
|
-
input.motionBlur,
|
|
5020
|
-
input.pageMotionBlur ?? "",
|
|
5021
|
-
input.captureQuality === void 0 ? "" : String(input.captureQuality)
|
|
5022
|
-
];
|
|
5023
|
-
const delivery = [input.maxBitrate, input.bufferSize, input.gopSize].map((v) => v ?? "");
|
|
5024
|
-
if (delivery.some((v) => v !== "")) ordered.push(...delivery.map(String));
|
|
5025
|
-
return createHash2("sha256").update(ordered.join(" ")).digest("hex").slice(0, 16);
|
|
5026
|
-
}
|
|
5027
|
-
function segmentDirFor(projectRendersDir, planHash) {
|
|
5028
|
-
return join11(projectRendersDir, ".hf-segments", planHash);
|
|
5029
|
-
}
|
|
5030
|
-
function hasNumber(value, key) {
|
|
5031
|
-
return key in value && typeof Reflect.get(value, key) === "number";
|
|
5032
|
-
}
|
|
5033
|
-
function hasString(value, key) {
|
|
5034
|
-
return key in value && typeof Reflect.get(value, key) === "string";
|
|
5035
|
-
}
|
|
5036
|
-
function isEntry(value) {
|
|
5037
|
-
if (typeof value !== "object" || value === null) return false;
|
|
5038
|
-
return hasNumber(value, "index") && hasNumber(value, "startFrame") && hasNumber(value, "endFrame") && hasString(value, "path") && hasNumber(value, "bytes") && hasString(value, "completedAt");
|
|
5039
|
-
}
|
|
5040
|
-
function isManifest(value) {
|
|
5041
|
-
if (typeof value !== "object" || value === null) return false;
|
|
5042
|
-
const completed = Reflect.get(value, "completed");
|
|
5043
|
-
return Reflect.get(value, "version") === 1 && hasString(value, "planHash") && hasNumber(value, "totalFrames") && hasNumber(value, "segmentFrames") && Array.isArray(completed) && completed.every(isEntry);
|
|
5044
|
-
}
|
|
5045
|
-
function readSegmentManifest(segmentDir) {
|
|
5046
|
-
const path = join11(segmentDir, MANIFEST_FILENAME);
|
|
5047
|
-
if (!existsSync7(path)) return null;
|
|
5048
|
-
try {
|
|
5049
|
-
const parsed = JSON.parse(readFileSync4(path, "utf-8"));
|
|
5050
|
-
return isManifest(parsed) ? parsed : null;
|
|
5051
|
-
} catch {
|
|
5052
|
-
return null;
|
|
5053
|
-
}
|
|
5054
|
-
}
|
|
5055
|
-
function writeSegmentManifest(segmentDir, manifest) {
|
|
5056
|
-
mkdirSync4(segmentDir, { recursive: true });
|
|
5057
|
-
const tmp = join11(segmentDir, `${MANIFEST_FILENAME}.${process.pid}.tmp`);
|
|
5058
|
-
writeFileSync3(tmp, JSON.stringify(manifest, null, 2), "utf-8");
|
|
5059
|
-
renameWithRetry(tmp, join11(segmentDir, MANIFEST_FILENAME));
|
|
5060
|
-
}
|
|
5061
|
-
async function probeSegmentFrameCount(path, probe) {
|
|
5062
|
-
try {
|
|
5063
|
-
const meta = await probe(path);
|
|
5064
|
-
if (!Number.isFinite(meta.videoStreamDurationSeconds) || !Number.isFinite(meta.fps))
|
|
5065
|
-
return null;
|
|
5066
|
-
if (meta.fps <= 0) return null;
|
|
5067
|
-
return Math.round(meta.videoStreamDurationSeconds * meta.fps);
|
|
5068
|
-
} catch {
|
|
5069
|
-
return null;
|
|
5070
|
-
}
|
|
5071
|
-
}
|
|
5072
|
-
async function validateCompletedSegments(manifest, expectedHash, probeFrames) {
|
|
5073
|
-
const ok = /* @__PURE__ */ new Set();
|
|
5074
|
-
if (manifest.planHash !== expectedHash) return ok;
|
|
5075
|
-
for (const entry of manifest.completed) {
|
|
5076
|
-
if (!existsSync7(entry.path)) continue;
|
|
5077
|
-
const size = statSync4(entry.path).size;
|
|
5078
|
-
if (size <= 0 || size !== entry.bytes) continue;
|
|
5079
|
-
const frames = await probeFrames(entry.path);
|
|
5080
|
-
if (frames !== entry.endFrame - entry.startFrame) continue;
|
|
5081
|
-
ok.add(entry.index);
|
|
5082
|
-
}
|
|
5083
|
-
return ok;
|
|
5084
|
-
}
|
|
5085
|
-
|
|
5086
|
-
// ../producer/src/services/render/hdrMode.ts
|
|
5087
|
-
function formatDowngradeWarning(outputFormat, forcedHdrWithoutSources) {
|
|
5088
|
-
const hdrSourceReason = forcedHdrWithoutSources ? "HDR was forced without detected HDR sources" : "HDR source detected";
|
|
5089
|
-
const formatReason = outputFormat === "hls" ? "HLS output is SDR-only (H.264 in MPEG-TS)" : "HDR + alpha is not supported";
|
|
5090
|
-
return `[Render] ${hdrSourceReason}, but format is "${outputFormat}", so falling back to SDR. ${formatReason}. Use --format mp4 for HDR10 output.`;
|
|
5091
|
-
}
|
|
5092
|
-
function findRenderHdrAutoPromotionTrigger(input) {
|
|
5093
|
-
for (const extracted of input.extractionResult?.extracted ?? []) {
|
|
5094
|
-
if (!isHdrColorSpace(extracted.metadata.colorSpace)) continue;
|
|
5095
|
-
const source = input.videos.find(({ id }) => id === extracted.videoId)?.src;
|
|
5096
|
-
if (source) return source;
|
|
5097
|
-
}
|
|
5098
|
-
return input.images.find(({ id }) => input.nativeHdrImageIds.has(id))?.src;
|
|
5099
|
-
}
|
|
5100
|
-
function logGradingResolution(input, hdrMode, effectiveHdr, hasHdrSource) {
|
|
5101
|
-
const keptSdr = hasHdrSource && gradingKeepsSdr(hdrMode, input.media);
|
|
5102
|
-
if (keptSdr) {
|
|
5103
|
-
input.log.warn(
|
|
5104
|
-
"[Render] HDR source detected, but color grading is SDR-only, so rendering SDR: HDR sources are tone-mapped before the grade. Use --hdr to force HDR output (grades stay SDR)."
|
|
5105
|
-
);
|
|
5106
|
-
} else if (effectiveHdr && [...input.media.videos, ...input.media.images].some((m) => m.graded)) {
|
|
5107
|
-
input.log.warn(
|
|
5108
|
-
"[Render] HDR output with graded media: color grading is SDR-only, so graded elements are graded in SDR and placed in the HDR output."
|
|
5109
|
-
);
|
|
5110
|
-
}
|
|
5111
|
-
return keptSdr;
|
|
5112
|
-
}
|
|
5113
|
-
function logHdrResolution(input, hdrMode, effectiveHdr, forcedHdrWithoutSources, hasHdrSource) {
|
|
5114
|
-
const keptSdrForGrading = logGradingResolution(input, hdrMode, effectiveHdr, hasHdrSource);
|
|
5115
|
-
if (forcedHdrWithoutSources) {
|
|
5116
|
-
input.log.warn(
|
|
5117
|
-
"[Render] HDR forced by --hdr flag, but no HDR sources were detected, defaulting to HLG. SDR-only compositions may look perceptually wrong on HDR displays."
|
|
5118
|
-
);
|
|
5119
|
-
}
|
|
5120
|
-
if (!effectiveHdr) {
|
|
5121
|
-
if (keptSdrForGrading) return;
|
|
5122
|
-
input.log.info(
|
|
5123
|
-
hdrMode === "force-sdr" ? "[Render] SDR forced by --sdr flag" : "[Render] No HDR sources detected, rendering SDR"
|
|
5124
|
-
);
|
|
5125
|
-
return;
|
|
5126
|
-
}
|
|
5127
|
-
if (hdrMode === "auto") {
|
|
5128
|
-
input.log.warn(
|
|
5129
|
-
formatHdrAutoPromotionWarning({
|
|
5130
|
-
triggeringAsset: sanitizeHdrAutoPromotionAsset(
|
|
5131
|
-
input.autoPromotionTrigger ?? "an HDR-tagged asset"
|
|
5132
|
-
),
|
|
5133
|
-
output: HDR_AUTO_PROMOTION_PIPELINE
|
|
5134
|
-
})
|
|
5135
|
-
);
|
|
5136
|
-
return;
|
|
5137
|
-
}
|
|
5138
|
-
const reason = forcedHdrWithoutSources ? "forced by --hdr flag (no HDR sources detected, defaulting to HLG)" : "forced by --hdr flag";
|
|
5139
|
-
input.log.info(
|
|
5140
|
-
`[Render] HDR ${reason}, output: ${effectiveHdr.transfer.toUpperCase()} (BT.2020, 10-bit H.265)`
|
|
5141
|
-
);
|
|
5142
|
-
}
|
|
5143
|
-
function formatCarriesHdr(format) {
|
|
5144
|
-
return format === "mp4";
|
|
5145
|
-
}
|
|
5146
|
-
function rendersSdrOnly(config, media) {
|
|
5147
|
-
return config.hdrMode === "force-sdr" || gradingKeepsSdr(config.hdrMode, media) || !formatCarriesHdr(config.format ?? "mp4");
|
|
5148
|
-
}
|
|
5149
|
-
function resolveEffectiveHdrMode(input) {
|
|
5150
|
-
const hdrMode = input.hdrMode ?? "auto";
|
|
5151
|
-
const videoColorSpaces = (input.extractionResult?.extracted ?? []).map(
|
|
5152
|
-
(ext) => ext.metadata.colorSpace
|
|
5153
|
-
);
|
|
5154
|
-
const allColorSpaces = [...videoColorSpaces, ...input.imageColorSpaces];
|
|
5155
|
-
const info = allColorSpaces.length > 0 ? analyzeCompositionHdr(allColorSpaces) : null;
|
|
5156
|
-
let effectiveHdr;
|
|
5157
|
-
let forcedHdrWithoutSources = false;
|
|
5158
|
-
if (hdrMode === "force-sdr" || gradingKeepsSdr(hdrMode, input.media)) {
|
|
5159
|
-
effectiveHdr = void 0;
|
|
5160
|
-
} else if (hdrMode === "force-hdr") {
|
|
5161
|
-
if (info?.hasHdr && info.dominantTransfer) {
|
|
5162
|
-
effectiveHdr = { transfer: info.dominantTransfer };
|
|
5163
|
-
} else {
|
|
5164
|
-
effectiveHdr = { transfer: "hlg" };
|
|
5165
|
-
forcedHdrWithoutSources = true;
|
|
5166
|
-
}
|
|
5167
|
-
} else if (info?.hasHdr && info.dominantTransfer) {
|
|
5168
|
-
effectiveHdr = { transfer: info.dominantTransfer };
|
|
5169
|
-
}
|
|
5170
|
-
if (effectiveHdr && !formatCarriesHdr(input.outputFormat)) {
|
|
5171
|
-
input.log.warn(formatDowngradeWarning(input.outputFormat, forcedHdrWithoutSources));
|
|
5172
|
-
effectiveHdr = void 0;
|
|
5173
|
-
}
|
|
5174
|
-
logHdrResolution(input, hdrMode, effectiveHdr, forcedHdrWithoutSources, info?.hasHdr === true);
|
|
5175
|
-
return effectiveHdr;
|
|
5176
|
-
}
|
|
5177
|
-
|
|
5178
|
-
// ../producer/src/services/render/captureBeyondViewport.ts
|
|
5179
|
-
function resolveVideoCaptureBeyondViewport(videoCount) {
|
|
5180
|
-
if (videoCount <= 0) return void 0;
|
|
5181
|
-
return true;
|
|
5182
|
-
}
|
|
5183
|
-
|
|
5184
4998
|
// ../producer/src/services/render/captureCost.ts
|
|
5185
|
-
import { join as
|
|
4999
|
+
import { join as join11 } from "path";
|
|
5186
5000
|
var CAPTURE_CALIBRATION_TARGET_MS = 600;
|
|
5187
5001
|
var MAX_MEASURED_CAPTURE_COST_MULTIPLIER = 8;
|
|
5188
5002
|
var CAPTURE_CALIBRATION_PROTOCOL_TIMEOUT_MS = 3e4;
|
|
@@ -5378,6 +5192,7 @@ async function runCaptureCalibration(input) {
|
|
|
5378
5192
|
let probeSession = input.probeSession;
|
|
5379
5193
|
let forceScreenshot = input.forceScreenshot;
|
|
5380
5194
|
let lastBrowserConsole = [];
|
|
5195
|
+
let calibrationEvaluateTimedOut = false;
|
|
5381
5196
|
const fps = fpsToNumber(job.config.fps);
|
|
5382
5197
|
const sessionRef = { current: null };
|
|
5383
5198
|
const runOneCalibration = async (sessionDir, sessionCfg) => {
|
|
@@ -5418,11 +5233,12 @@ async function runCaptureCalibration(input) {
|
|
|
5418
5233
|
});
|
|
5419
5234
|
let calibration;
|
|
5420
5235
|
try {
|
|
5421
|
-
calibration = await runOneCalibration(
|
|
5236
|
+
calibration = await runOneCalibration(join11(workDir, "capture-calibration"), calibrationCfg);
|
|
5422
5237
|
} catch (error) {
|
|
5423
5238
|
const shouldFallback = !forceScreenshot && shouldFallbackToScreenshotAfterCalibrationError(error);
|
|
5424
5239
|
if (!shouldFallback) {
|
|
5425
5240
|
calibration = createFailedCaptureCalibrationEstimate("calibration-failed");
|
|
5241
|
+
calibrationEvaluateTimedOut = isEvaluateTimeout(error);
|
|
5426
5242
|
log.warn("[Render] Auto-worker calibration failed; using conservative worker budget.", {
|
|
5427
5243
|
protocolTimeout: calibrationCfg.protocolTimeout,
|
|
5428
5244
|
error: error instanceof Error ? error.message : String(error)
|
|
@@ -5451,11 +5267,12 @@ async function runCaptureCalibration(input) {
|
|
|
5451
5267
|
const screenshotCfg = createCaptureCalibrationConfig({ ...cfg, forceScreenshot: true });
|
|
5452
5268
|
try {
|
|
5453
5269
|
calibration = await runOneCalibration(
|
|
5454
|
-
|
|
5270
|
+
join11(workDir, "capture-calibration-screenshot"),
|
|
5455
5271
|
screenshotCfg
|
|
5456
5272
|
);
|
|
5457
5273
|
} catch (fallbackError) {
|
|
5458
5274
|
calibration = createFailedCaptureCalibrationEstimate("calibration-screenshot-failed");
|
|
5275
|
+
calibrationEvaluateTimedOut = isEvaluateTimeout(fallbackError);
|
|
5459
5276
|
log.warn(
|
|
5460
5277
|
"[Render] Screenshot auto-worker calibration failed after BeginFrame fallback; using conservative worker budget.",
|
|
5461
5278
|
{
|
|
@@ -5472,7 +5289,16 @@ async function runCaptureCalibration(input) {
|
|
|
5472
5289
|
});
|
|
5473
5290
|
}
|
|
5474
5291
|
}
|
|
5475
|
-
return {
|
|
5292
|
+
return {
|
|
5293
|
+
calibration,
|
|
5294
|
+
forceScreenshot,
|
|
5295
|
+
probeSession,
|
|
5296
|
+
lastBrowserConsole,
|
|
5297
|
+
calibrationEvaluateTimedOut
|
|
5298
|
+
};
|
|
5299
|
+
}
|
|
5300
|
+
function isEvaluateTimeout(error) {
|
|
5301
|
+
return /Runtime\.evaluate timed out/i.test(normalizeErrorMessage(error));
|
|
5476
5302
|
}
|
|
5477
5303
|
function shouldFallbackToScreenshotAfterCalibrationError(error) {
|
|
5478
5304
|
const message = normalizeErrorMessage(error);
|
|
@@ -5481,6 +5307,215 @@ function shouldFallbackToScreenshotAfterCalibrationError(error) {
|
|
|
5481
5307
|
);
|
|
5482
5308
|
}
|
|
5483
5309
|
|
|
5310
|
+
// ../producer/src/services/render/pageNeverReady.ts
|
|
5311
|
+
var PAGE_NEVER_READY = "PAGE_NEVER_READY";
|
|
5312
|
+
var PageNeverReadyError = class extends Error {
|
|
5313
|
+
code = PAGE_NEVER_READY;
|
|
5314
|
+
// The producer server reads these off the error for the wire envelope.
|
|
5315
|
+
owner = "user";
|
|
5316
|
+
retryable = false;
|
|
5317
|
+
constructor(cause) {
|
|
5318
|
+
super(
|
|
5319
|
+
"The composition page never became ready: it did not answer browser commands during calibration or capture, and no frame was captured. Its script may never return.",
|
|
5320
|
+
{ cause }
|
|
5321
|
+
);
|
|
5322
|
+
this.name = "PageNeverReadyError";
|
|
5323
|
+
}
|
|
5324
|
+
};
|
|
5325
|
+
function checkPageNeverReady(input) {
|
|
5326
|
+
const { calibrationEvaluateTimedOut, framesRendered, error } = input;
|
|
5327
|
+
if (!calibrationEvaluateTimedOut || framesRendered > 0 || !isEvaluateTimeout(error)) {
|
|
5328
|
+
return void 0;
|
|
5329
|
+
}
|
|
5330
|
+
return new PageNeverReadyError(error);
|
|
5331
|
+
}
|
|
5332
|
+
|
|
5333
|
+
// ../producer/src/services/render/segmentManifest.ts
|
|
5334
|
+
import { createHash as createHash2 } from "crypto";
|
|
5335
|
+
import { existsSync as existsSync7, mkdirSync as mkdirSync4, readFileSync as readFileSync4, statSync as statSync4, writeFileSync as writeFileSync3 } from "fs";
|
|
5336
|
+
import { join as join12 } from "path";
|
|
5337
|
+
var MANIFEST_FILENAME = "segments.json";
|
|
5338
|
+
function computeSegmentPlanHash(input) {
|
|
5339
|
+
const ordered = [
|
|
5340
|
+
input.compositionHash,
|
|
5341
|
+
input.cliVersion,
|
|
5342
|
+
String(input.totalFrames),
|
|
5343
|
+
String(input.segmentFrames),
|
|
5344
|
+
`${input.fps.num}/${input.fps.den}`,
|
|
5345
|
+
`${input.width}x${input.height}`,
|
|
5346
|
+
input.codec,
|
|
5347
|
+
input.preset,
|
|
5348
|
+
input.quality === void 0 ? "" : String(input.quality),
|
|
5349
|
+
input.bitrate ?? "",
|
|
5350
|
+
input.pixelFormat ?? "",
|
|
5351
|
+
input.imageFormat,
|
|
5352
|
+
input.useGpu ? "gpu" : "cpu",
|
|
5353
|
+
`${input.outputWidth}x${input.outputHeight}`,
|
|
5354
|
+
input.motionBlur,
|
|
5355
|
+
input.pageMotionBlur ?? "",
|
|
5356
|
+
input.captureQuality === void 0 ? "" : String(input.captureQuality)
|
|
5357
|
+
];
|
|
5358
|
+
const delivery = [input.maxBitrate, input.bufferSize, input.gopSize].map((v) => v ?? "");
|
|
5359
|
+
if (delivery.some((v) => v !== "")) ordered.push(...delivery.map(String));
|
|
5360
|
+
return createHash2("sha256").update(ordered.join(" ")).digest("hex").slice(0, 16);
|
|
5361
|
+
}
|
|
5362
|
+
function segmentDirFor(projectRendersDir, planHash) {
|
|
5363
|
+
return join12(projectRendersDir, ".hf-segments", planHash);
|
|
5364
|
+
}
|
|
5365
|
+
function hasNumber(value, key) {
|
|
5366
|
+
return key in value && typeof Reflect.get(value, key) === "number";
|
|
5367
|
+
}
|
|
5368
|
+
function hasString(value, key) {
|
|
5369
|
+
return key in value && typeof Reflect.get(value, key) === "string";
|
|
5370
|
+
}
|
|
5371
|
+
function isEntry(value) {
|
|
5372
|
+
if (typeof value !== "object" || value === null) return false;
|
|
5373
|
+
return hasNumber(value, "index") && hasNumber(value, "startFrame") && hasNumber(value, "endFrame") && hasString(value, "path") && hasNumber(value, "bytes") && hasString(value, "completedAt");
|
|
5374
|
+
}
|
|
5375
|
+
function isManifest(value) {
|
|
5376
|
+
if (typeof value !== "object" || value === null) return false;
|
|
5377
|
+
const completed = Reflect.get(value, "completed");
|
|
5378
|
+
return Reflect.get(value, "version") === 1 && hasString(value, "planHash") && hasNumber(value, "totalFrames") && hasNumber(value, "segmentFrames") && Array.isArray(completed) && completed.every(isEntry);
|
|
5379
|
+
}
|
|
5380
|
+
function readSegmentManifest(segmentDir) {
|
|
5381
|
+
const path = join12(segmentDir, MANIFEST_FILENAME);
|
|
5382
|
+
if (!existsSync7(path)) return null;
|
|
5383
|
+
try {
|
|
5384
|
+
const parsed = JSON.parse(readFileSync4(path, "utf-8"));
|
|
5385
|
+
return isManifest(parsed) ? parsed : null;
|
|
5386
|
+
} catch {
|
|
5387
|
+
return null;
|
|
5388
|
+
}
|
|
5389
|
+
}
|
|
5390
|
+
function writeSegmentManifest(segmentDir, manifest) {
|
|
5391
|
+
mkdirSync4(segmentDir, { recursive: true });
|
|
5392
|
+
const tmp = join12(segmentDir, `${MANIFEST_FILENAME}.${process.pid}.tmp`);
|
|
5393
|
+
writeFileSync3(tmp, JSON.stringify(manifest, null, 2), "utf-8");
|
|
5394
|
+
renameWithRetry(tmp, join12(segmentDir, MANIFEST_FILENAME));
|
|
5395
|
+
}
|
|
5396
|
+
async function probeSegmentFrameCount(path, probe) {
|
|
5397
|
+
try {
|
|
5398
|
+
const meta = await probe(path);
|
|
5399
|
+
if (!Number.isFinite(meta.videoStreamDurationSeconds) || !Number.isFinite(meta.fps))
|
|
5400
|
+
return null;
|
|
5401
|
+
if (meta.fps <= 0) return null;
|
|
5402
|
+
return Math.round(meta.videoStreamDurationSeconds * meta.fps);
|
|
5403
|
+
} catch {
|
|
5404
|
+
return null;
|
|
5405
|
+
}
|
|
5406
|
+
}
|
|
5407
|
+
async function validateCompletedSegments(manifest, expectedHash, probeFrames) {
|
|
5408
|
+
const ok = /* @__PURE__ */ new Set();
|
|
5409
|
+
if (manifest.planHash !== expectedHash) return ok;
|
|
5410
|
+
for (const entry of manifest.completed) {
|
|
5411
|
+
if (!existsSync7(entry.path)) continue;
|
|
5412
|
+
const size = statSync4(entry.path).size;
|
|
5413
|
+
if (size <= 0 || size !== entry.bytes) continue;
|
|
5414
|
+
const frames = await probeFrames(entry.path);
|
|
5415
|
+
if (frames !== entry.endFrame - entry.startFrame) continue;
|
|
5416
|
+
ok.add(entry.index);
|
|
5417
|
+
}
|
|
5418
|
+
return ok;
|
|
5419
|
+
}
|
|
5420
|
+
|
|
5421
|
+
// ../producer/src/services/render/hdrMode.ts
|
|
5422
|
+
function formatDowngradeWarning(outputFormat, forcedHdrWithoutSources) {
|
|
5423
|
+
const hdrSourceReason = forcedHdrWithoutSources ? "HDR was forced without detected HDR sources" : "HDR source detected";
|
|
5424
|
+
const formatReason = outputFormat === "hls" ? "HLS output is SDR-only (H.264 in MPEG-TS)" : "HDR + alpha is not supported";
|
|
5425
|
+
return `[Render] ${hdrSourceReason}, but format is "${outputFormat}", so falling back to SDR. ${formatReason}. Use --format mp4 for HDR10 output.`;
|
|
5426
|
+
}
|
|
5427
|
+
function findRenderHdrAutoPromotionTrigger(input) {
|
|
5428
|
+
for (const extracted of input.extractionResult?.extracted ?? []) {
|
|
5429
|
+
if (!isHdrColorSpace(extracted.metadata.colorSpace)) continue;
|
|
5430
|
+
const source = input.videos.find(({ id }) => id === extracted.videoId)?.src;
|
|
5431
|
+
if (source) return source;
|
|
5432
|
+
}
|
|
5433
|
+
return input.images.find(({ id }) => input.nativeHdrImageIds.has(id))?.src;
|
|
5434
|
+
}
|
|
5435
|
+
function logGradingResolution(input, hdrMode, effectiveHdr, hasHdrSource) {
|
|
5436
|
+
const keptSdr = hasHdrSource && gradingKeepsSdr(hdrMode, input.media);
|
|
5437
|
+
if (keptSdr) {
|
|
5438
|
+
input.log.warn(
|
|
5439
|
+
"[Render] HDR source detected, but color grading is SDR-only, so rendering SDR: HDR sources are tone-mapped before the grade. Use --hdr to force HDR output (grades stay SDR)."
|
|
5440
|
+
);
|
|
5441
|
+
} else if (effectiveHdr && [...input.media.videos, ...input.media.images].some((m) => m.graded)) {
|
|
5442
|
+
input.log.warn(
|
|
5443
|
+
"[Render] HDR output with graded media: color grading is SDR-only, so graded elements are graded in SDR and placed in the HDR output."
|
|
5444
|
+
);
|
|
5445
|
+
}
|
|
5446
|
+
return keptSdr;
|
|
5447
|
+
}
|
|
5448
|
+
function logHdrResolution(input, hdrMode, effectiveHdr, forcedHdrWithoutSources, hasHdrSource) {
|
|
5449
|
+
const keptSdrForGrading = logGradingResolution(input, hdrMode, effectiveHdr, hasHdrSource);
|
|
5450
|
+
if (forcedHdrWithoutSources) {
|
|
5451
|
+
input.log.warn(
|
|
5452
|
+
"[Render] HDR forced by --hdr flag, but no HDR sources were detected, defaulting to HLG. SDR-only compositions may look perceptually wrong on HDR displays."
|
|
5453
|
+
);
|
|
5454
|
+
}
|
|
5455
|
+
if (!effectiveHdr) {
|
|
5456
|
+
if (keptSdrForGrading) return;
|
|
5457
|
+
input.log.info(
|
|
5458
|
+
hdrMode === "force-sdr" ? "[Render] SDR forced by --sdr flag" : "[Render] No HDR sources detected, rendering SDR"
|
|
5459
|
+
);
|
|
5460
|
+
return;
|
|
5461
|
+
}
|
|
5462
|
+
if (hdrMode === "auto") {
|
|
5463
|
+
input.log.warn(
|
|
5464
|
+
formatHdrAutoPromotionWarning({
|
|
5465
|
+
triggeringAsset: sanitizeHdrAutoPromotionAsset(
|
|
5466
|
+
input.autoPromotionTrigger ?? "an HDR-tagged asset"
|
|
5467
|
+
),
|
|
5468
|
+
output: HDR_AUTO_PROMOTION_PIPELINE
|
|
5469
|
+
})
|
|
5470
|
+
);
|
|
5471
|
+
return;
|
|
5472
|
+
}
|
|
5473
|
+
const reason = forcedHdrWithoutSources ? "forced by --hdr flag (no HDR sources detected, defaulting to HLG)" : "forced by --hdr flag";
|
|
5474
|
+
input.log.info(
|
|
5475
|
+
`[Render] HDR ${reason}, output: ${effectiveHdr.transfer.toUpperCase()} (BT.2020, 10-bit H.265)`
|
|
5476
|
+
);
|
|
5477
|
+
}
|
|
5478
|
+
function formatCarriesHdr(format) {
|
|
5479
|
+
return format === "mp4";
|
|
5480
|
+
}
|
|
5481
|
+
function rendersSdrOnly(config, media) {
|
|
5482
|
+
return config.hdrMode === "force-sdr" || gradingKeepsSdr(config.hdrMode, media) || !formatCarriesHdr(config.format ?? "mp4");
|
|
5483
|
+
}
|
|
5484
|
+
function resolveEffectiveHdrMode(input) {
|
|
5485
|
+
const hdrMode = input.hdrMode ?? "auto";
|
|
5486
|
+
const videoColorSpaces = (input.extractionResult?.extracted ?? []).map(
|
|
5487
|
+
(ext) => ext.metadata.colorSpace
|
|
5488
|
+
);
|
|
5489
|
+
const allColorSpaces = [...videoColorSpaces, ...input.imageColorSpaces];
|
|
5490
|
+
const info = allColorSpaces.length > 0 ? analyzeCompositionHdr(allColorSpaces) : null;
|
|
5491
|
+
let effectiveHdr;
|
|
5492
|
+
let forcedHdrWithoutSources = false;
|
|
5493
|
+
if (hdrMode === "force-sdr" || gradingKeepsSdr(hdrMode, input.media)) {
|
|
5494
|
+
effectiveHdr = void 0;
|
|
5495
|
+
} else if (hdrMode === "force-hdr") {
|
|
5496
|
+
if (info?.hasHdr && info.dominantTransfer) {
|
|
5497
|
+
effectiveHdr = { transfer: info.dominantTransfer };
|
|
5498
|
+
} else {
|
|
5499
|
+
effectiveHdr = { transfer: "hlg" };
|
|
5500
|
+
forcedHdrWithoutSources = true;
|
|
5501
|
+
}
|
|
5502
|
+
} else if (info?.hasHdr && info.dominantTransfer) {
|
|
5503
|
+
effectiveHdr = { transfer: info.dominantTransfer };
|
|
5504
|
+
}
|
|
5505
|
+
if (effectiveHdr && !formatCarriesHdr(input.outputFormat)) {
|
|
5506
|
+
input.log.warn(formatDowngradeWarning(input.outputFormat, forcedHdrWithoutSources));
|
|
5507
|
+
effectiveHdr = void 0;
|
|
5508
|
+
}
|
|
5509
|
+
logHdrResolution(input, hdrMode, effectiveHdr, forcedHdrWithoutSources, info?.hasHdr === true);
|
|
5510
|
+
return effectiveHdr;
|
|
5511
|
+
}
|
|
5512
|
+
|
|
5513
|
+
// ../producer/src/services/render/captureBeyondViewport.ts
|
|
5514
|
+
function resolveVideoCaptureBeyondViewport(videoCount) {
|
|
5515
|
+
if (videoCount <= 0) return void 0;
|
|
5516
|
+
return true;
|
|
5517
|
+
}
|
|
5518
|
+
|
|
5484
5519
|
// ../producer/src/services/render/observability.ts
|
|
5485
5520
|
import { createHash as createHash3 } from "crypto";
|
|
5486
5521
|
var MAX_EVENTS = 160;
|
|
@@ -12670,6 +12705,7 @@ async function executeRenderPipeline(input) {
|
|
|
12670
12705
|
const onProgress = execution.onProgress;
|
|
12671
12706
|
const tooSlow = new AbortController();
|
|
12672
12707
|
let tooSlowError;
|
|
12708
|
+
let calibrationEvaluateTimedOut = false;
|
|
12673
12709
|
const executionSignal = job.config.maxRenderMs ? AbortSignal.any([tooSlow.signal, ...execution.signal ? [execution.signal] : []]) : execution.signal;
|
|
12674
12710
|
let fileServer = null;
|
|
12675
12711
|
let probeSession = null;
|
|
@@ -13412,6 +13448,7 @@ async function executeRenderPipeline(input) {
|
|
|
13412
13448
|
{ heartbeatMessage: "browser calibrating (frames not started)" }
|
|
13413
13449
|
);
|
|
13414
13450
|
captureCalibration = outcome.calibration;
|
|
13451
|
+
calibrationEvaluateTimedOut = outcome.calibrationEvaluateTimedOut;
|
|
13415
13452
|
captureForceScreenshot = outcome.forceScreenshot;
|
|
13416
13453
|
updateCaptureObservability({ forceScreenshot: captureForceScreenshot });
|
|
13417
13454
|
probeSession = outcome.probeSession;
|
|
@@ -14562,7 +14599,12 @@ async function executeRenderPipeline(input) {
|
|
|
14562
14599
|
await eventPublisher.flush();
|
|
14563
14600
|
} catch (caught) {
|
|
14564
14601
|
await pendingAudio;
|
|
14565
|
-
const
|
|
14602
|
+
const pageNeverReady = checkPageNeverReady({
|
|
14603
|
+
calibrationEvaluateTimedOut,
|
|
14604
|
+
framesRendered: job.framesRendered ?? 0,
|
|
14605
|
+
error: caught
|
|
14606
|
+
});
|
|
14607
|
+
const error = surfaceScriptFailure(tooSlowError ?? pageNeverReady ?? caught, job);
|
|
14566
14608
|
if (!tooSlowError && (error instanceof RenderCancelledError || executionSignal?.aborted)) {
|
|
14567
14609
|
job.error = error instanceof Error ? error.message : "render_cancelled";
|
|
14568
14610
|
updateJobStatus(job, "cancelled", "Render cancelled", job.progress, onProgress);
|
|
@@ -16938,7 +16980,7 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
|
|
|
16938
16980
|
if (probeResult.fileServer) closeFileServerSafely(probeResult.fileServer, "plan", log);
|
|
16939
16981
|
if (probeResult.probeSession) {
|
|
16940
16982
|
try {
|
|
16941
|
-
const { closeCaptureSession: closeCaptureSession2 } = await import("./src-
|
|
16983
|
+
const { closeCaptureSession: closeCaptureSession2 } = await import("./src-L7UBHHKB.js");
|
|
16942
16984
|
await closeCaptureSession2(probeResult.probeSession);
|
|
16943
16985
|
} catch (err) {
|
|
16944
16986
|
log.warn("[plan] probe session close failed", {
|
|
@@ -18949,7 +18991,8 @@ var SAFE_RENDER_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
|
18949
18991
|
"VIDEO_EXTRACTION_FAILED",
|
|
18950
18992
|
"ENCODER_INTERRUPTED",
|
|
18951
18993
|
"RENDER_TOO_SLOW",
|
|
18952
|
-
"RENDER_STAGE_STALLED"
|
|
18994
|
+
"RENDER_STAGE_STALLED",
|
|
18995
|
+
"PAGE_NEVER_READY"
|
|
18953
18996
|
]);
|
|
18954
18997
|
function extractSafeRenderErrorCode(error) {
|
|
18955
18998
|
if (typeof error !== "object" || error === null || !("code" in error)) return void 0;
|
|
@@ -20324,7 +20367,7 @@ function startServer(options = {}) {
|
|
|
20324
20367
|
});
|
|
20325
20368
|
async function shutdown(signal) {
|
|
20326
20369
|
log.info(`Received ${signal}, shutting down`);
|
|
20327
|
-
const { drainBrowserPool } = await import("./src-
|
|
20370
|
+
const { drainBrowserPool } = await import("./src-L7UBHHKB.js");
|
|
20328
20371
|
await drainBrowserPool().catch(() => {
|
|
20329
20372
|
});
|
|
20330
20373
|
const handle = await Promise.race([
|
|
@@ -6,13 +6,13 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
getMimeType
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4J4EGANW.js";
|
|
10
10
|
import {
|
|
11
11
|
openRangeEnd
|
|
12
12
|
} from "./chunk-VEIGTKYZ.js";
|
|
13
13
|
import {
|
|
14
14
|
stripSdrPngColourTags
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-JS6ZTPYC.js";
|
|
16
16
|
import {
|
|
17
17
|
injectTagsAtHeadStart
|
|
18
18
|
} from "./chunk-Y3ICFPFK.js";
|
|
@@ -17,7 +17,7 @@ function resolveLocalBrowserGpuMode(browserGpuArg, envMode = process.env.PRODUCE
|
|
|
17
17
|
return "auto";
|
|
18
18
|
}
|
|
19
19
|
async function resolveCaptureBrowserGpuMode(requestedMode, chromePath, probeLifecycle) {
|
|
20
|
-
const { resolveBrowserGpuMode } = await import("./src-
|
|
20
|
+
const { resolveBrowserGpuMode } = await import("./src-L7UBHHKB.js");
|
|
21
21
|
return resolveBrowserGpuMode(requestedMode, { chromePath, probeLifecycle });
|
|
22
22
|
}
|
|
23
23
|
function resolveLocalWebGpu(browserGpuMode, requiresWebGpu) {
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
shouldTrack
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UH62KSYV.js";
|
|
10
10
|
|
|
11
11
|
// src/telemetry/renderObservability.ts
|
|
12
12
|
function renderObservabilityTelemetryPayload(observability) {
|