hyperframes 0.9.31 → 0.9.33
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/{add-53MR45WI.js → add-GDXM36YQ.js} +18 -18
- package/dist/{agentPromptGenerator-NXF7237H.js → agentPromptGenerator-KPNDH2EI.js} +36 -19
- package/dist/{animatedGifPrep-XF6VJW22.js → animatedGifPrep-SAKETEZ2.js} +11 -11
- package/dist/api.js +51 -46
- package/dist/{appHistory-DLDRURHW.js → appHistory-WZIHFCPK.js} +3 -3
- package/dist/{asset-Y3YAVXJ3.js → asset-KOJC72AQ.js} +2 -2
- package/dist/{assetCataloger-DRLH2VFH.js → assetCataloger-Q4ZFUI6G.js} +13 -13
- package/dist/{audio-TRDZQ2NW.js → audio-XZBBXKQC.js} +32 -30
- package/dist/{auth-MN66MWGN.js → auth-X45YSZGE.js} +4 -4
- package/dist/{autoUpdate-KAIIQJBV.js → autoUpdate-77XWQ564.js} +3 -3
- package/dist/{avatars-F2COSI7P.js → avatars-D3D22TI2.js} +20 -19
- package/dist/{backgroundChecks-36UG4V5N.js → backgroundChecks-2L2RWFJ3.js} +4 -4
- package/dist/backgroundChecksWorker.js +5 -5
- package/dist/{batchRender-CI6OFGS5.js → batchRender-O7J47H2Z.js} +5 -5
- package/dist/{beats-GBCNB763.js → beats-6RVVU56H.js} +15 -15
- package/dist/{benchmark-AHHMJBDN.js → benchmark-D5JRNAVQ.js} +12 -12
- package/dist/{billing-HME22C5A.js → billing-WT4DGZII.js} +20 -19
- package/dist/{browser-VZTIOZI3.js → browser-2OR737P4.js} +9 -9
- package/dist/{bundleWithLocalizedFonts-XLFSHMET.js → bundleWithLocalizedFonts-VBET4RVR.js} +1 -1
- package/dist/{capture-ZILHWIOF.js → capture-23X2CK56.js} +82 -39
- package/dist/{capture-NU2ZIXJB.js → capture-B34FTO6G.js} +4 -4
- package/dist/{captureCompositionFrame-ZWVKRKLL.js → captureCompositionFrame-TPZKEVKN.js} +19 -19
- package/dist/{captureFile-O7JMINHC.js → captureFile-Y2ZMB7HK.js} +3 -3
- package/dist/{catalog-NVEGPXGE.js → catalog-ACHSYU5Z.js} +18 -18
- package/dist/{catch-up-W7ST5JSZ.js → catch-up-FGANS2BB.js} +12 -12
- package/dist/{check-BZ652RYH.js → check-DXK4L5WP.js} +54 -54
- package/dist/{checkAudio-5NVSRMGL.js → checkAudio-4ISYJED3.js} +20 -20
- package/dist/{checkBrowser-YN454IBU.js → checkBrowser-5ECMULMP.js} +47 -47
- package/dist/{chunk-Q7EIUAYK.js → chunk-23354HMA.js} +3 -3
- package/dist/{chunk-W4OMDRZF.js → chunk-2I4DQZLQ.js} +28 -8
- package/dist/{chunk-O4Z4D4KA.js → chunk-2KYLVWLO.js} +1 -1
- package/dist/{chunk-BJSUKOWW.js → chunk-2LMCARA5.js} +2 -2
- package/dist/{chunk-XB77LMOP.js → chunk-2QTGQGYA.js} +1 -1
- package/dist/{chunk-JULHFF3J.js → chunk-2RBQLV6B.js} +1 -1
- package/dist/{chunk-R5U5PFDJ.js → chunk-2TBW7UOF.js} +5177 -4970
- package/dist/{chunk-RCWPVC4M.js → chunk-3J32XVJ6.js} +2 -2
- package/dist/{chunk-CP4FVXKZ.js → chunk-45ZQI734.js} +2 -2
- package/dist/{chunk-LHBQW4GJ.js → chunk-4CHGNFCS.js} +23 -15
- package/dist/{chunk-RLYYA6IR.js → chunk-4DLYTSWQ.js} +15 -8
- package/dist/{chunk-JLUOG6S2.js → chunk-4FTJE22M.js} +2 -2
- package/dist/{chunk-WAXPM7TK.js → chunk-4RPIEGL3.js} +2 -2
- package/dist/{chunk-ZSELEQI2.js → chunk-4US5QCXR.js} +408 -219
- package/dist/{chunk-CWOUPW5E.js → chunk-4WZU4FYS.js} +4 -4
- package/dist/{chunk-B7H5RCKP.js → chunk-5GYTBKZA.js} +2 -2
- package/dist/{chunk-4HSE3FWO.js → chunk-5RVPI6QL.js} +4 -4
- package/dist/{chunk-VEIGTKYZ.js → chunk-64F653HO.js} +36 -9
- package/dist/{chunk-KAICKZZK.js → chunk-6QEEF5RR.js} +1 -1
- package/dist/{chunk-5Q3TTLGB.js → chunk-6RV2QY4K.js} +31 -31
- package/dist/{chunk-3SZ43GZG.js → chunk-6ZVUTYNB.js} +6 -6
- package/dist/{chunk-C4U6FRZH.js → chunk-76KUCQXD.js} +14 -11
- package/dist/{chunk-SWOAB4GM.js → chunk-77UB5EHM.js} +1 -1
- package/dist/{chunk-GRHBVTBK.js → chunk-7LTXT7ME.js} +11 -9
- package/dist/{chunk-RBECDLMQ.js → chunk-7UUUV4PN.js} +1 -1
- package/dist/{chunk-X3HQA3YE.js → chunk-A4VXOJZO.js} +10 -8
- package/dist/{chunk-OJSOH2LS.js → chunk-ADYMQM7T.js} +2 -2
- package/dist/{chunk-GSXHYLW4.js → chunk-AIC7T7CC.js} +2 -2
- package/dist/{chunk-MQOO5Z4U.js → chunk-B66UZ2YK.js} +9 -9
- package/dist/{chunk-7NDF2MO3.js → chunk-BAWGEGKD.js} +216 -344
- package/dist/{chunk-T7PFJH2B.js → chunk-BBL6STGK.js} +2 -2
- package/dist/{chunk-5AMGFTMU.js → chunk-C2VZ7UPE.js} +18 -18
- package/dist/{chunk-CUORARXJ.js → chunk-CDI3CCAU.js} +7 -7
- package/dist/{chunk-C5JKRCSG.js → chunk-CHCMXYER.js} +1 -1
- package/dist/{chunk-J3OVTOVC.js → chunk-CHJGVW5W.js} +15 -2
- package/dist/{chunk-OOEZ3FT3.js → chunk-CHM3QYLF.js} +3 -3
- package/dist/{chunk-TCQKCUDA.js → chunk-CKJDY6EK.js} +1 -1
- package/dist/{chunk-DJVSNDF3.js → chunk-CNJLBAKM.js} +133 -22
- package/dist/chunk-DDDSTRHU.js +3890 -0
- package/dist/{chunk-AWL5M7BX.js → chunk-DGC2RIQE.js} +4 -4
- package/dist/{chunk-LP7B3JLC.js → chunk-DMW5SSUN.js} +2 -1
- package/dist/{chunk-WSPGX2SM.js → chunk-DMZER7D5.js} +1 -1
- package/dist/{chunk-3DIYMOES.js → chunk-ERJBWDPM.js} +7 -7
- package/dist/{chunk-56MGA4FM.js → chunk-ETWXZQN5.js} +2 -2
- package/dist/{chunk-MMAPQWUP.js → chunk-EX533ULK.js} +2 -2
- package/dist/{chunk-HM3PIREE.js → chunk-EX7WPDFA.js} +2 -2
- package/dist/{chunk-MX3UCKZR.js → chunk-FRH3CPW5.js} +1 -1
- package/dist/{chunk-F2GWIWHN.js → chunk-G2XAFJ2B.js} +2 -2
- package/dist/{chunk-FKW5FP4C.js → chunk-G55YEL2L.js} +129 -89
- package/dist/{chunk-FRBQ3FIM.js → chunk-GBIASKIH.js} +1 -1
- package/dist/{chunk-44VR2CWT.js → chunk-GHLLC6LJ.js} +2 -2
- package/dist/{chunk-BIQJKM2O.js → chunk-GOMTMQRT.js} +1 -1
- package/dist/{chunk-BCMR6DE4.js → chunk-HEXTAQYG.js} +2 -2
- package/dist/{chunk-URXVZMSI.js → chunk-HMB3IAVP.js} +2 -2
- package/dist/{chunk-22PWPQVX.js → chunk-HPKW6UVW.js} +6 -6
- package/dist/{chunk-OFQWTKPW.js → chunk-HZTRKUKE.js} +8 -2
- package/dist/{chunk-YJVJCNK4.js → chunk-I35B5RWZ.js} +3 -3
- package/dist/{chunk-SCWMPY3F.js → chunk-I3PA54IU.js} +1 -1
- package/dist/{chunk-IEXRKKHC.js → chunk-IEEIPTDW.js} +1 -1
- package/dist/{chunk-CWN75OWQ.js → chunk-IYLGUQFR.js} +19 -7
- package/dist/chunk-JCJJCYCP.js +392 -0
- package/dist/{chunk-P7LZ2WSQ.js → chunk-JSVCF4A6.js} +4 -4
- package/dist/{chunk-WVRAFHJU.js → chunk-K2Z6OXEI.js} +33 -5
- package/dist/{chunk-OBRKDUCE.js → chunk-KIAY63AB.js} +38 -4
- package/dist/{chunk-HYRPH6LL.js → chunk-KRWPTZBY.js} +2 -5
- package/dist/{chunk-6VNDEMSP.js → chunk-L6BFXQ6S.js} +8 -4
- package/dist/chunk-M3BJEZ7E.js +152 -0
- package/dist/{chunk-ZOOY4LEZ.js → chunk-MA35E5OY.js} +3 -3
- package/dist/{chunk-IHWNDG5C.js → chunk-MDBEAWP2.js} +3 -3
- package/dist/{chunk-TEOIEMTR.js → chunk-MDGNQWFN.js} +1 -1
- package/dist/{chunk-3YNJAXA5.js → chunk-MOR3H5FK.js} +1 -1
- package/dist/{chunk-O7ZX5DHD.js → chunk-MP36L7OJ.js} +2 -2
- package/dist/{chunk-5LLDGJGZ.js → chunk-MVIUSNPZ.js} +1 -1
- package/dist/{chunk-IIMW46LC.js → chunk-N2C7WJDG.js} +1 -1
- package/dist/{chunk-XEPGN46Q.js → chunk-N6Y645MX.js} +1 -1
- package/dist/{chunk-IOPIOX5K.js → chunk-N7C7U3ZR.js} +7 -4
- package/dist/{chunk-AQJA7TAQ.js → chunk-NQFIMBXS.js} +2 -2
- package/dist/{chunk-G5DZZEQF.js → chunk-O2T6ZTLN.js} +1 -1
- package/dist/{chunk-RHUYVGFO.js → chunk-O5CNNVRY.js} +7 -7
- package/dist/{chunk-6WHOI52Z.js → chunk-OD7PLYYX.js} +8 -8
- package/dist/{chunk-K7JA32EI.js → chunk-PNP2BO3U.js} +2 -2
- package/dist/{chunk-5SDUQLZ3.js → chunk-PXDRW3QN.js} +1 -1
- package/dist/{chunk-ZLDYDO64.js → chunk-QUUZ2BGC.js} +6 -4
- package/dist/{chunk-SEVZKBMA.js → chunk-QWM3NY2E.js} +4 -4
- package/dist/{chunk-ZQYRP22G.js → chunk-R45WFVRA.js} +1 -1
- package/dist/{chunk-PGGMJW7B.js → chunk-RCB4SGTB.js} +35 -7
- package/dist/{chunk-GGDJLN5I.js → chunk-REJ4NIBY.js} +1 -1
- package/dist/{chunk-5HVQV4H4.js → chunk-RGYOCAHC.js} +2 -2
- package/dist/{chunk-GFDXA5QO.js → chunk-ROXILOZ6.js} +2 -2
- package/dist/{chunk-G5S72X6Q.js → chunk-SIGASWB7.js} +4 -4
- package/dist/{chunk-J5LQW6VB.js → chunk-SOAQ3XXB.js} +2 -2
- package/dist/{chunk-RLQOYHXT.js → chunk-SUXEL7G4.js} +15 -15
- package/dist/{chunk-SHOE3UR6.js → chunk-SVI2CJ6R.js} +1 -1
- package/dist/{chunk-Q77TZ76B.js → chunk-SWPI27QV.js} +8 -8
- package/dist/{chunk-T54RTTFW.js → chunk-T3GSTIBS.js} +3 -3
- package/dist/chunk-TFBPCJPG.js +26 -0
- package/dist/{chunk-XDIHAX2C.js → chunk-U77L3ZQZ.js} +1 -1
- package/dist/{chunk-3F2DTPBD.js → chunk-UC4X6I35.js} +6 -0
- package/dist/{chunk-7XZS4PNM.js → chunk-UE2WSWNA.js} +1 -1
- package/dist/{chunk-JHOPRAJN.js → chunk-VK3MQSA2.js} +11 -5
- package/dist/{chunk-KAHWO4XC.js → chunk-VKZSAAXZ.js} +3 -3
- package/dist/chunk-VQJLTYEK.js +453 -0
- package/dist/{chunk-5YYGPTBP.js → chunk-VZQXHYEI.js} +3 -3
- package/dist/{chunk-OZNJ2QD5.js → chunk-W2FSQBUR.js} +17 -17
- package/dist/{chunk-RVI665CP.js → chunk-W5PW26KE.js} +1 -1
- package/dist/{chunk-KKUBMYCY.js → chunk-WIMVXPYG.js} +12 -12
- package/dist/{chunk-ALVXFXUG.js → chunk-WXOOAAT4.js} +27 -4
- package/dist/{chunk-OB6DVKHE.js → chunk-WYPRTHXQ.js} +2 -2
- package/dist/{chunk-ELWX6CAA.js → chunk-XDDBSGBD.js} +2 -2
- package/dist/{chunk-VPPJIWVG.js → chunk-XDRSEU2I.js} +14 -14
- package/dist/{chunk-3OA75WJW.js → chunk-XFXCI4IP.js} +16 -9
- package/dist/{chunk-RJA64ACI.js → chunk-XQWWFIBR.js} +2 -2
- package/dist/{chunk-FK3KV32T.js → chunk-XSHJ37U3.js} +27 -24
- package/dist/{chunk-Y6RU3H6C.js → chunk-XUDJ5XSQ.js} +6 -6
- package/dist/{chunk-DFSAC4F4.js → chunk-XVVPEWNX.js} +1 -1
- package/dist/chunk-Y5DOT5NQ.js +57 -0
- package/dist/{chunk-SWC3QIEH.js → chunk-YAS347ZS.js} +1 -1
- package/dist/{chunk-L6ZLOJBI.js → chunk-YDG3OXH3.js} +3 -2
- package/dist/{chunk-SQ63BIR2.js → chunk-YNFHZ4RI.js} +3 -3
- package/dist/{chunk-5BIMSULZ.js → chunk-YSHUIQ3I.js} +2 -2
- package/dist/chunk-YTUPQTXA.js +560 -0
- package/dist/{chunk-54FVSPRH.js → chunk-ZIYXPDKY.js} +2 -2
- package/dist/chunk-ZOAANTVI.js +193 -0
- package/dist/{clean-WYXHI2DO.js → clean-3IN64RHM.js} +31 -31
- package/dist/cli.js +71 -69
- package/dist/{cloud-X52P5AIE.js → cloud-LBUZBUP6.js} +4 -4
- package/dist/{cloud-TDXVUIUM.js → cloud-SVYXHFEG.js} +9 -8
- package/dist/{cloudrun-36IR6ZKU.js → cloudrun-PZOF2QGL.js} +8 -8
- package/dist/{compare-R2KXOV2I.js → compare-UOJ3LXQQ.js} +46 -46
- package/dist/{compiler-FRWUFIQC.js → compiler-5ZDHBKBQ.js} +9 -7
- package/dist/{component-TIBQY7KQ.js → component-EVIPLTTJ.js} +3 -3
- package/dist/{compositions-NQPORXIX.js → compositions-R4GG5FBO.js} +17 -17
- package/dist/{contactSheet-PZXG3REG.js → contactSheet-HZMP42FZ.js} +4 -4
- package/dist/contract/LICENSE-Unicode.txt +39 -0
- package/dist/contract/path-policy.json +311 -0
- package/dist/contract/unicode-15.1.0.json +6179 -0
- package/dist/{curve-DTLRPBSB.js → curve-LR3PSRW3.js} +16 -16
- package/dist/{cuts-73HKU767.js → cuts-DHCOBAFT.js} +17 -17
- package/dist/{delete-HIHA436T.js → delete-MMGGU3QP.js} +12 -11
- package/dist/deploy-SKIGUTM2.js +213 -0
- package/dist/{describeProject-4A5UXQ25.js → describeProject-L7HNTBPV.js} +12 -12
- package/dist/{destroy-4DOMPOYB.js → destroy-5HSMMDH7.js} +22 -18
- package/dist/{deterministicFonts-SKRN3TCP.js → deterministicFonts-2ZPRAI3C.js} +4 -4
- package/dist/{diff-JPADFUMV.js → diff-KR7VKPYL.js} +48 -47
- package/dist/{dist-EFXKPJJT.js → dist-3MFNUZSN.js} +4 -4
- package/dist/{dist-KWXQYTRT.js → dist-HK3AZNNL.js} +22 -22
- package/dist/{dist-FKEKIXVL.js → dist-ZGYPFYOH.js} +4 -4
- package/dist/docs/rendering.md +2 -0
- package/dist/{doctor-3OO3CONL.js → doctor-G7VGNSA5.js} +18 -18
- package/dist/{energy-XFPN5YIL.js → energy-H7EEH6WO.js} +17 -17
- package/dist/{events-6ONCYFB5.js → events-5ATZCZTK.js} +4 -4
- package/dist/{events-QWPZT3EQ.js → events-ASG27IXP.js} +19 -19
- package/dist/{events-G2MME5LQ.js → events-YD6N7OPQ.js} +9 -9
- package/dist/execute-OAS454OB.js +109 -0
- package/dist/{extract-3EV72SMY.js → extract-645SENLA.js} +20 -20
- package/dist/{face-JZS6P3AT.js → face-WRT5XH4I.js} +19 -19
- package/dist/{feedback-JVWBHRQG.js → feedback-3LKLR5MV.js} +22 -17
- package/dist/{ffmpeg-XDAITYSU.js → ffmpeg-PXKIZL2X.js} +11 -11
- package/dist/{figma-KPHTDMCQ.js → figma-RIEVJJBW.js} +3 -3
- package/dist/fontLocalizeCli.js +20 -20
- package/dist/{frames-KRVRJTKC.js → frames-OTB3J5W3.js} +19 -19
- package/dist/{generate-X2MYGFZX.js → generate-IUKCZW2D.js} +33 -32
- package/dist/{get-QM24BI7N.js → get-6WVQ7TBV.js} +12 -11
- package/dist/{gpuPolicy-EFJJLHVV.js → gpuPolicy-HXSVAEU4.js} +11 -11
- package/dist/{grade-compare-W5N5LH4X.js → grade-compare-TCAYHDEF.js} +47 -47
- package/dist/{gsapParser-3H7ON3DO.js → gsapParser-L7TM3RGH.js} +49 -26
- package/dist/hangReport.js +1 -1
- package/dist/{heifImagePrep-X5QRRVTV.js → heifImagePrep-GXIMK4HK.js} +12 -12
- package/dist/{help-LWS4YWMO.js → help-RGOL5EJD.js} +2 -1
- package/dist/{history-SG34LBJY.js → history-XKPRGJGS.js} +15 -15
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +42 -42
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-2FC43IYB.js → info-EYBBC42V.js} +19 -19
- package/dist/{init-GKY5OKDV.js → init-F2FWPSMA.js} +36 -36
- package/dist/{ink-7UK6YCUY.js → ink-BWFERAAT.js} +17 -17
- package/dist/{inspect-ZB2NTNQA.js → inspect-74N7L3BW.js} +44 -44
- package/dist/{installer-GALVXWPC.js → installer-LOUR7G4R.js} +8 -8
- package/dist/{keyframes-LSP4FLHT.js → keyframes-WB5PTKFE.js} +15 -13
- package/dist/{lambda-3F32DRYF.js → lambda-JYCNXUKB.js} +20 -20
- package/dist/{layout-XPGS3QTX.js → layout-P52EVR24.js} +44 -44
- package/dist/{lint-Q5SO57RK.js → lint-SL55KAS2.js} +15 -15
- package/dist/{lintProject-5CBL7VFV.js → lintProject-46WU53VC.js} +4 -4
- package/dist/{list-FL5RYSFT.js → list-LN6CQH52.js} +14 -13
- package/dist/{localPage-IOHQETQT.js → localPage-L6OJU3UH.js} +12 -12
- package/dist/{login-D4TCWDDW.js → login-WTOAMDID.js} +8 -7
- package/dist/{logout-7SMEH7JL.js → logout-QGNBUJKS.js} +14 -5
- package/dist/{look-G2BT4E4A.js → look-O6ESLJRP.js} +17 -17
- package/dist/{manager-F6WI43DQ.js → manager-CMEZWENF.js} +12 -12
- package/dist/{measure-VXQQHYMZ.js → measure-NEIXU53P.js} +11 -11
- package/dist/{media-treatment-ZXA3JZSL.js → media-treatment-6CAQG7MU.js} +19 -19
- package/dist/{media-use-63LZFAID.js → media-use-IXJFMKU7.js} +16 -9
- package/dist/{models-MWUVU4CY.js → models-TZALWUEY.js} +15 -15
- package/dist/{motionShot-U4YDT7UV.js → motionShot-OQYK6G6M.js} +24 -24
- package/dist/{normalize-audio-T5QJWU4P.js → normalize-audio-43PJLOBY.js} +15 -15
- package/dist/oauth-SAVP2YM4.js +40 -0
- package/dist/{open-DRLXHOW2.js → open-EOX6QY4M.js} +20 -20
- package/dist/{parakeetRunner-5OHEB3XZ.js → parakeetRunner-STHAXQAF.js} +19 -19
- package/dist/{pipeline-MAIRRYD6.js → pipeline-RRWZHFBQ.js} +14 -14
- package/dist/plan-JWUSMF4W.js +88 -0
- package/dist/{play-33A3EXX3.js → play-TUKTST32.js} +40 -34
- package/dist/{preflight-HSWMKB2Q.js → preflight-L42JKT6F.js} +12 -12
- package/dist/{present-HJIFEIDH.js → present-Z7HRDXPV.js} +34 -28
- package/dist/{preview-J6Z6RKMN.js → preview-HGTIRAV3.js} +31 -31
- package/dist/{probe-RA4VOGYY.js → probe-RXK44FY7.js} +17 -17
- package/dist/{producer-KWP2B4A5.js → producer-KJ2RZDJ3.js} +1 -1
- package/dist/{progress-TGYZ2TKQ.js → progress-IY6U35WH.js} +1 -1
- package/dist/{projectConfig-3YIGHLNE.js → projectConfig-K36NTJXP.js} +11 -11
- package/dist/{publication-QRUY2WJK.js → publication-OZWLT6K6.js} +6 -6
- package/dist/{publish-GV3I3GUL.js → publish-CRUTXNYM.js} +92 -30
- package/dist/{refresh-47T6Z2PK.js → refresh-6ONVQ3WV.js} +4 -3
- package/dist/{remove-background-UUITKXEQ.js → remove-background-R37HZPCG.js} +15 -15
- package/dist/{render-ZITQXHJP.js → render-EZMKBT7V.js} +57 -52
- package/dist/{render-NHVDJRFD.js → render-SU2XTMJL.js} +8 -8
- package/dist/{render-EC67XXR2.js → render-ZHCPCISN.js} +101 -937
- package/dist/{render-batch-RII4F3PD.js → render-batch-YIUOEAAL.js} +8 -8
- package/dist/renderSetupWorker.js +5 -5
- package/dist/{resolver-R3FXDZKS.js → resolver-DLCKRKQR.js} +8 -8
- package/dist/{reverse-2GJ5Y3WM.js → reverse-4FAVXIER.js} +1 -1
- package/dist/{run-24USN7TA.js → run-H4GVEJVS.js} +8 -6
- package/dist/{screenshotCapture-TEQVEBWB.js → screenshotCapture-CQF5FYVI.js} +14 -14
- package/dist/service-XDQOULGD.js +68 -0
- package/dist/share-CUCQALE7.js +274 -0
- package/dist/{sherpa-YIJR47GX.js → sherpa-WZNRQUVC.js} +18 -18
- package/dist/sherpaWorker.js +1 -1
- package/dist/{sites-LILUBMRM.js → sites-QK3F4AUS.js} +1 -1
- package/dist/skills/hyperframes-cli/SKILL.md +3 -3
- package/dist/skills/hyperframes-cli/references/preview-render.md +21 -0
- package/dist/skills/media-use/audio/scripts/lib/heygen.mjs +15 -4
- package/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +42 -6
- package/dist/skills/media-use/audio/scripts/lib/python.mjs +17 -2
- package/dist/skills/media-use/audio/scripts/lib/python.test.mjs +50 -4
- package/dist/skills/media-use/audio/scripts/lib/tts.mjs +11 -1
- package/dist/skills/media-use/scripts/lib/svg-sanitize.mjs +2 -1
- package/dist/skills/media-use/scripts/lib/tts-local-provider.test.mjs +31 -0
- package/dist/{skills-DM3XC7RQ.js → skills-J52DBZAK.js} +12 -12
- package/dist/{skillsUpdateCheck-ZHVFEOEN.js → skillsUpdateCheck-26DJHBTC.js} +4 -4
- package/dist/{snapshot-72RQQXHW.js → snapshot-ZIRQFDA7.js} +94 -69
- package/dist/{src-SPFGPZZQ.js → src-7BGBN6SS.js} +18 -18
- package/dist/{src-C43KUEBY.js → src-C3XYMTF4.js} +12 -10
- package/dist/{start-FSYSYLI7.js → start-QG2XNMYN.js} +31 -30
- package/dist/{state-W3AS6O2J.js → state-7OIPR4BG.js} +1 -1
- package/dist/{staticProjectServer-RHBRRGPK.js → staticProjectServer-TWMEFK3T.js} +28 -28
- package/dist/{status-TE74GP4Q.js → status-3UPA5WPI.js} +26 -24
- package/dist/studio/assets/{codec-DXM4vA6G.js → codec-qz1-OXLj.js} +1 -1
- package/dist/studio/assets/{hyperframes-player-D_016Ubp.js → hyperframes-player-2eG1zFX5.js} +1 -1
- package/dist/studio/assets/{index-dsfjBidg.css → index-BJTCbv8z.css} +1 -1
- package/dist/studio/assets/{index-Ob53qo6K.js → index-DDmhnfrS.js} +189 -189
- package/dist/studio/assets/{index-Bw4stQMm.js → index-DUveJ_YP.js} +1 -1
- package/dist/studio/assets/{pausedVideoDecoder-vbdgaMqL.js → pausedVideoDecoder-CoHTKUjM.js} +1 -1
- package/dist/studio/index.html +2 -2
- package/dist/{studio-api-JAOHMYPG.js → studio-api-Z42OO4JJ.js} +22 -22
- package/dist/{studioServer-RHCPM4CN.js → studioServer-SMN3RMVL.js} +455 -71
- package/dist/{sync-UZJ7DOUA.js → sync-ONTI2WSI.js} +17 -17
- package/dist/{synthesize-MDW4ZWTN.js → synthesize-FR5KPBRP.js} +4 -4
- package/dist/{telemetry-TFOEA2PM.js → telemetry-RRXALB5D.js} +9 -9
- package/dist/{templates-2AHM5TZ3.js → templates-BHFOSD6F.js} +23 -22
- package/dist/{timeline-ZGV323MP.js → timeline-Z5IHY5TN.js} +28 -28
- package/dist/{tokens-ERUFEWUA.js → tokens-MZVEPARM.js} +2 -2
- package/dist/{transcribe-6HLYS7NV.js → transcribe-5IZS4BGW.js} +37 -36
- package/dist/{transcribe-M5UZ2XFG.js → transcribe-M5N3YZZU.js} +15 -15
- package/dist/{tts-IXX2HHHJ.js → tts-ZE776B4I.js} +1 -1
- package/dist/{update-JDVI2XTM.js → update-EVPWBIKY.js} +14 -13
- package/dist/{updateCheck-GDTYPXKO.js → updateCheck-2UUEF6TC.js} +5 -3
- package/dist/{upgrade-SJKYBA4X.js → upgrade-DK45FD4K.js} +6 -4
- package/dist/{urlDownloader-2QCNXXUG.js → urlDownloader-3MPHIDSA.js} +10 -10
- package/dist/{validate-IUTHTA2N.js → validate-W27TQ367.js} +36 -36
- package/dist/{video-4BJ7WHI2.js → video-TI372QGV.js} +13 -13
- package/dist/{voices-UDSFBPZX.js → voices-FZV4PGT6.js} +30 -29
- package/dist/warmCheck.js +55 -55
- package/dist/warmCheckClient.js +1 -1
- package/package.json +2 -1
- package/dist/chunk-2X4PQEYM.js +0 -34
- package/dist/deploy-EB3FS2BT.js +0 -361
|
@@ -11,21 +11,21 @@ import {
|
|
|
11
11
|
iterateFontFamilyDeclarations,
|
|
12
12
|
normalizeSystemFontPrimaryFamilies,
|
|
13
13
|
resolveFontFamilyDeclarationFamilies
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4FTJE22M.js";
|
|
15
15
|
import {
|
|
16
16
|
Semaphore,
|
|
17
17
|
prepareHeifImageInputs,
|
|
18
18
|
withMediaProbeSlot
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-T3GSTIBS.js";
|
|
20
20
|
import {
|
|
21
21
|
EncoderInterruptedError,
|
|
22
22
|
encoderFailureError,
|
|
23
23
|
prepareAnimatedGifInputs
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-L6BFXQ6S.js";
|
|
25
25
|
import {
|
|
26
26
|
openRangeEnd,
|
|
27
27
|
parseEncoderOptions
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-64F653HO.js";
|
|
29
29
|
import {
|
|
30
30
|
RENDER_TEMP_DIR,
|
|
31
31
|
createStudioPositionSeekReapplyScript
|
|
@@ -139,6 +139,7 @@ import {
|
|
|
139
139
|
isVideoPastTimelineEnd,
|
|
140
140
|
keyframeIntervalToGopSize,
|
|
141
141
|
measureVideoShownBoxes,
|
|
142
|
+
mediaIdPathSegment,
|
|
142
143
|
mergeWorkerFrames,
|
|
143
144
|
muxVideoWithAudio,
|
|
144
145
|
normalizeObjectFit,
|
|
@@ -186,9 +187,10 @@ import {
|
|
|
186
187
|
videoAudioId,
|
|
187
188
|
videoStartOnMediaTimeline,
|
|
188
189
|
writeCapturedFrame
|
|
189
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-2TBW7UOF.js";
|
|
190
191
|
import {
|
|
191
192
|
assignBundledRuntimeCompositionIds,
|
|
193
|
+
boundMediaSrc,
|
|
192
194
|
emitMountedModuleScripts,
|
|
193
195
|
emitRootCompositionVariableStyles,
|
|
194
196
|
ensureExternalLinkTag,
|
|
@@ -198,13 +200,13 @@ import {
|
|
|
198
200
|
parsesAsScript,
|
|
199
201
|
prepareFlattenedInnerRoot,
|
|
200
202
|
stripSdrPngColourTags
|
|
201
|
-
} from "./chunk-
|
|
203
|
+
} from "./chunk-KIAY63AB.js";
|
|
202
204
|
import {
|
|
203
205
|
collectScratchLeftovers,
|
|
204
206
|
createStagingDir,
|
|
205
207
|
removeScratch,
|
|
206
208
|
renameWithRetry
|
|
207
|
-
} from "./chunk-
|
|
209
|
+
} from "./chunk-IEEIPTDW.js";
|
|
208
210
|
import {
|
|
209
211
|
TRANSITIONS,
|
|
210
212
|
convertTransfer,
|
|
@@ -227,7 +229,7 @@ import {
|
|
|
227
229
|
redactTelemetryString,
|
|
228
230
|
resolveAuthoredTimingWindow,
|
|
229
231
|
toFps
|
|
230
|
-
} from "./chunk-
|
|
232
|
+
} from "./chunk-EX7WPDFA.js";
|
|
231
233
|
import {
|
|
232
234
|
COMPOSITION_SOURCE_URL,
|
|
233
235
|
HF_COLOR_GRADING_ATTR,
|
|
@@ -262,20 +264,22 @@ import {
|
|
|
262
264
|
sourceTimeAt,
|
|
263
265
|
styleElementsFor,
|
|
264
266
|
timeAtSourceTime
|
|
265
|
-
} from "./chunk-
|
|
267
|
+
} from "./chunk-XDDBSGBD.js";
|
|
266
268
|
import {
|
|
267
269
|
chromeMajorCeiling
|
|
268
270
|
} from "./chunk-WE42NVH7.js";
|
|
269
271
|
import {
|
|
270
272
|
lintHyperframeHtml,
|
|
271
273
|
resolveReferencedStart
|
|
272
|
-
} from "./chunk-
|
|
274
|
+
} from "./chunk-CNJLBAKM.js";
|
|
273
275
|
import {
|
|
274
276
|
isUnresolvedAssetPlaceholder,
|
|
277
|
+
namesAnotherNetworkRoot,
|
|
275
278
|
readProjectFile,
|
|
276
279
|
readTextFile,
|
|
280
|
+
resolveCompositionSrc,
|
|
277
281
|
resolveProjectRelativeSrc
|
|
278
|
-
} from "./chunk-
|
|
282
|
+
} from "./chunk-K2Z6OXEI.js";
|
|
279
283
|
import {
|
|
280
284
|
LOW_MEMORY_TOTAL_MB_THRESHOLD,
|
|
281
285
|
getCgroupMemoryLimitMb,
|
|
@@ -308,14 +312,14 @@ import {
|
|
|
308
312
|
isAspectAgnosticResolutionAlias,
|
|
309
313
|
normalizeResolutionFlag,
|
|
310
314
|
suggestMatchingPreset
|
|
311
|
-
} from "./chunk-
|
|
315
|
+
} from "./chunk-N7C7U3ZR.js";
|
|
312
316
|
import {
|
|
313
317
|
parseHTML
|
|
314
318
|
} from "./chunk-GWTIFRF5.js";
|
|
315
319
|
|
|
316
320
|
// ../producer/src/services/renderOrchestrator.ts
|
|
317
321
|
import {
|
|
318
|
-
existsSync as
|
|
322
|
+
existsSync as existsSync20,
|
|
319
323
|
mkdirSync as mkdirSync10,
|
|
320
324
|
readdirSync as readdirSync6,
|
|
321
325
|
rmSync as rmSync10,
|
|
@@ -459,7 +463,9 @@ function createConsoleLogger(level = "info") {
|
|
|
459
463
|
}
|
|
460
464
|
};
|
|
461
465
|
}
|
|
462
|
-
var defaultLogger = createConsoleLogger(
|
|
466
|
+
var defaultLogger = createConsoleLogger(
|
|
467
|
+
process.env.HF_DEBUG_RENDER === "1" ? "debug" : "info"
|
|
468
|
+
);
|
|
463
469
|
|
|
464
470
|
// ../producer/src/services/fileServer.ts
|
|
465
471
|
var readFileAsync = promisify(readFile);
|
|
@@ -1226,11 +1232,38 @@ function resolveDeliveryEncoderOptions(config) {
|
|
|
1226
1232
|
return { maxBitrate, bufferSize, ...gop };
|
|
1227
1233
|
}
|
|
1228
1234
|
|
|
1235
|
+
// ../producer/src/services/render/chromaSubsampling.ts
|
|
1236
|
+
function validateChromaSubsamplingConfig(config) {
|
|
1237
|
+
if (config.chromaSubsampling !== "444") return;
|
|
1238
|
+
const format = config.format ?? "mp4";
|
|
1239
|
+
if (format !== "mp4") {
|
|
1240
|
+
throw new Error(
|
|
1241
|
+
`[Render] chromaSubsampling "444" supports format "mp4" only (got "${format}"). WebM, MOV and GIF use their own pixel formats, and HLS targets broad playback. Use --format mp4, or drop --chroma-subsampling 444.`
|
|
1242
|
+
);
|
|
1243
|
+
}
|
|
1244
|
+
if (config.hdrMode === "force-hdr") {
|
|
1245
|
+
throw new Error(
|
|
1246
|
+
`[Render] chromaSubsampling "444" is SDR only; HDR output stays 10-bit 4:2:0 H.265. Drop --hdr, or drop --chroma-subsampling 444.`
|
|
1247
|
+
);
|
|
1248
|
+
}
|
|
1249
|
+
if (config.useGpu === true) {
|
|
1250
|
+
throw new Error(
|
|
1251
|
+
`[Render] chromaSubsampling "444" requires the software encoder (libx264); GPU encoders do not reliably support 4:4:4. Re-run without --gpu.`
|
|
1252
|
+
);
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
function assertChromaSubsamplingSdr(config, hasHdrContent) {
|
|
1256
|
+
if (config.chromaSubsampling !== "444" || !hasHdrContent) return;
|
|
1257
|
+
throw new Error(
|
|
1258
|
+
`[Render] chromaSubsampling "444" is SDR only, but this composition has HDR sources. Re-run with --sdr (hdrMode "force-sdr"), or drop --chroma-subsampling 444.`
|
|
1259
|
+
);
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1229
1262
|
// ../producer/src/services/render/shared.ts
|
|
1230
1263
|
import {
|
|
1231
1264
|
copyFileSync,
|
|
1232
1265
|
cpSync,
|
|
1233
|
-
existsSync as
|
|
1266
|
+
existsSync as existsSync3,
|
|
1234
1267
|
mkdirSync,
|
|
1235
1268
|
rmSync,
|
|
1236
1269
|
symlinkSync,
|
|
@@ -1246,7 +1279,6 @@ import {
|
|
|
1246
1279
|
relative as nodeRelative,
|
|
1247
1280
|
isAbsolute as nodeIsAbsolute
|
|
1248
1281
|
} from "path";
|
|
1249
|
-
import { existsSync as existsSync3 } from "fs";
|
|
1250
1282
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
1251
1283
|
var DEFAULT_RENDERS_DIR = process.env.PRODUCER_RENDERS_DIR ?? // fileURLToPath (not URL.pathname): on Windows .pathname is "/D:/..." which
|
|
1252
1284
|
// resolves to a bogus renders dir.
|
|
@@ -1285,13 +1317,6 @@ function resolveRenderPaths(projectDir, outputPath, rendersDir = DEFAULT_RENDERS
|
|
|
1285
1317
|
const absoluteOutputPath = nodeResolve(resolvedOutputPath);
|
|
1286
1318
|
return { absoluteProjectDir, absoluteOutputPath };
|
|
1287
1319
|
}
|
|
1288
|
-
function resolveCompositionSrc(projectDir, src) {
|
|
1289
|
-
const rooted = (value) => nodeResolve(projectDir, value.replace(/^(?:\.?[\\/])+/, ""));
|
|
1290
|
-
const decoded = rooted(decodedUrlPath(src));
|
|
1291
|
-
if (!isPathInside2(decoded, projectDir)) return null;
|
|
1292
|
-
const raw = rooted(src);
|
|
1293
|
-
return !existsSync3(decoded) && isPathInside2(raw, projectDir) && existsSync3(raw) ? raw : decoded;
|
|
1294
|
-
}
|
|
1295
1320
|
|
|
1296
1321
|
// ../producer/src/services/render/shared.ts
|
|
1297
1322
|
var BROWSER_MEDIA_EPSILON = 1e-4;
|
|
@@ -1330,6 +1355,10 @@ function writeCompiledArtifacts(compiled, workDir, includeSummary) {
|
|
|
1330
1355
|
writeFileSync(join3(compileDir, "index.html"), compiled.html, "utf-8");
|
|
1331
1356
|
for (const [srcPath, html] of compiled.subCompositions) {
|
|
1332
1357
|
const outPath = join3(compileDir, srcPath);
|
|
1358
|
+
if (!isPathInside2(outPath, compileDir)) {
|
|
1359
|
+
console.warn(`[Render] Skipping sub-composition with unsafe path: ${srcPath}`);
|
|
1360
|
+
continue;
|
|
1361
|
+
}
|
|
1333
1362
|
mkdirSync(dirname2(outPath), { recursive: true });
|
|
1334
1363
|
writeFileSync(outPath, html, "utf-8");
|
|
1335
1364
|
}
|
|
@@ -1462,6 +1491,13 @@ var workerPhasesByJob = /* @__PURE__ */ new WeakMap();
|
|
|
1462
1491
|
function forgetWorkerPhases(job) {
|
|
1463
1492
|
workerPhasesByJob.delete(job);
|
|
1464
1493
|
}
|
|
1494
|
+
var staticDedupActivityByJob = /* @__PURE__ */ new WeakMap();
|
|
1495
|
+
function noteStaticDedupActivity(job) {
|
|
1496
|
+
staticDedupActivityByJob.set(job, (staticDedupActivityByJob.get(job) ?? 0) + 1);
|
|
1497
|
+
}
|
|
1498
|
+
function staticDedupActivity(job) {
|
|
1499
|
+
return staticDedupActivityByJob.get(job) ?? 0;
|
|
1500
|
+
}
|
|
1465
1501
|
function describeWorkerPhases(job) {
|
|
1466
1502
|
const phases = workerPhasesByJob.get(job);
|
|
1467
1503
|
if (!phases?.size) return void 0;
|
|
@@ -1495,7 +1531,7 @@ var materializePathModule = {
|
|
|
1495
1531
|
isAbsolute
|
|
1496
1532
|
};
|
|
1497
1533
|
var materializeFileSystem = {
|
|
1498
|
-
existsSync:
|
|
1534
|
+
existsSync: existsSync3,
|
|
1499
1535
|
mkdirSync,
|
|
1500
1536
|
symlinkSync,
|
|
1501
1537
|
cpSync,
|
|
@@ -1591,7 +1627,7 @@ function materializeExtractedFramesForCompiledDir(extracted, compiledDir, option
|
|
|
1591
1627
|
for (const ext of extracted) {
|
|
1592
1628
|
const resolvedOut = pathModule.resolve(ext.outputDir);
|
|
1593
1629
|
if (isPathInside2(resolvedOut, resolvedCompiledDir, { pathModule })) continue;
|
|
1594
|
-
const linkPath = pathModule.join(compiledFrameRoot, ext.videoId);
|
|
1630
|
+
const linkPath = pathModule.join(compiledFrameRoot, mediaIdPathSegment(ext.videoId));
|
|
1595
1631
|
if (!fileSystem.existsSync(linkPath)) {
|
|
1596
1632
|
fileSystem.mkdirSync(pathModule.dirname(linkPath), { recursive: true });
|
|
1597
1633
|
stageExtractedFrameDir(
|
|
@@ -1775,12 +1811,12 @@ var RenderExecutionContext = class {
|
|
|
1775
1811
|
};
|
|
1776
1812
|
|
|
1777
1813
|
// ../producer/src/services/render/artifactTransaction.ts
|
|
1778
|
-
import { closeSync as closeSync2, existsSync as
|
|
1814
|
+
import { closeSync as closeSync2, existsSync as existsSync5, fstatSync as fstatSync2, openSync as openSync2, readSync, readdirSync as readdirSync2, rmSync as rmSync3 } from "fs";
|
|
1779
1815
|
import { basename as basename4, dirname as dirname4, extname as extname2, join as join5, resolve as resolve4 } from "path";
|
|
1780
1816
|
|
|
1781
1817
|
// ../producer/src/services/render/renderDirOwner.ts
|
|
1782
1818
|
import {
|
|
1783
|
-
existsSync as
|
|
1819
|
+
existsSync as existsSync4,
|
|
1784
1820
|
lstatSync,
|
|
1785
1821
|
readFileSync as readFileSync2,
|
|
1786
1822
|
readdirSync,
|
|
@@ -1854,7 +1890,7 @@ function newestWriteMs(path) {
|
|
|
1854
1890
|
}
|
|
1855
1891
|
function isAbandoned(dir, ownerlessIdleMs, now) {
|
|
1856
1892
|
try {
|
|
1857
|
-
if (!lstatSync(dir).isDirectory() ||
|
|
1893
|
+
if (!lstatSync(dir).isDirectory() || existsSync4(join4(dir, TRANSACTION_BACKUP))) return false;
|
|
1858
1894
|
const owner = ownerState(dir);
|
|
1859
1895
|
if (owner === "gone") return true;
|
|
1860
1896
|
return owner === "none" && ownerlessIdleMs !== void 0 && now - newestWriteMs(dir) >= ownerlessIdleMs;
|
|
@@ -1886,7 +1922,7 @@ function createRenderWorkDir(prefix, outputDir) {
|
|
|
1886
1922
|
|
|
1887
1923
|
// ../producer/src/services/render/artifactTransaction.ts
|
|
1888
1924
|
var defaultFileSystem = {
|
|
1889
|
-
existsSync:
|
|
1925
|
+
existsSync: existsSync5,
|
|
1890
1926
|
renameSync: (source, destination) => renameWithRetry(source, destination),
|
|
1891
1927
|
rmSync: rmSync3
|
|
1892
1928
|
};
|
|
@@ -2040,7 +2076,7 @@ var ArtifactTransaction = class {
|
|
|
2040
2076
|
async assertDirectoryExpectation(expected, files) {
|
|
2041
2077
|
for (const required of expected.requiredFiles ?? []) {
|
|
2042
2078
|
const path = join5(this.stagingPath, required);
|
|
2043
|
-
if (!
|
|
2079
|
+
if (!existsSync5(path)) {
|
|
2044
2080
|
throw new Error(`Render artifact directory is missing ${required}: ${this.stagingPath}`);
|
|
2045
2081
|
}
|
|
2046
2082
|
assertReadableNonEmptyFile(path);
|
|
@@ -2289,7 +2325,7 @@ function replanAfterFailure(plan2, failure) {
|
|
|
2289
2325
|
}
|
|
2290
2326
|
|
|
2291
2327
|
// ../producer/src/services/render/stages/captureSegmentedStage.ts
|
|
2292
|
-
import { existsSync as
|
|
2328
|
+
import { existsSync as existsSync6, mkdirSync as mkdirSync3, rmSync as rmSync6, statSync as statSync3 } from "fs";
|
|
2293
2329
|
import { join as join9 } from "path";
|
|
2294
2330
|
|
|
2295
2331
|
// ../producer/src/services/render/perfSummary.ts
|
|
@@ -4559,7 +4595,7 @@ async function runCaptureStreamingStage(input) {
|
|
|
4559
4595
|
const session = probeSession ?? await openSession();
|
|
4560
4596
|
captureBeyondViewport = session.options.captureBeyondViewport;
|
|
4561
4597
|
if (probeSession) {
|
|
4562
|
-
prepareCaptureSessionForReuse(session, framesDir, videoInjector);
|
|
4598
|
+
await prepareCaptureSessionForReuse(session, framesDir, videoInjector);
|
|
4563
4599
|
probeSession = null;
|
|
4564
4600
|
}
|
|
4565
4601
|
let riskSession = null;
|
|
@@ -4817,7 +4853,7 @@ async function captureSegmentToEncoder(ctx, segment) {
|
|
|
4817
4853
|
path: segmentPath,
|
|
4818
4854
|
// Recorded so resume can prove the file on disk is the one that
|
|
4819
4855
|
// finished; absent only in unit tests, whose fake encoder writes none.
|
|
4820
|
-
bytes:
|
|
4856
|
+
bytes: existsSync6(segmentPath) ? statSync3(segmentPath).size : 0
|
|
4821
4857
|
});
|
|
4822
4858
|
return encodeResult;
|
|
4823
4859
|
} finally {
|
|
@@ -4864,8 +4900,13 @@ function defaultSessionFactory(input) {
|
|
|
4864
4900
|
};
|
|
4865
4901
|
const session = probeSession ?? await openSession();
|
|
4866
4902
|
if (probeSession) {
|
|
4867
|
-
|
|
4903
|
+
const reused = probeSession;
|
|
4868
4904
|
probeSession = null;
|
|
4905
|
+
await openSegmentedSessionReuse(input, reused, injector).catch(async (error) => {
|
|
4906
|
+
await closeCaptureSession(reused).catch(() => {
|
|
4907
|
+
});
|
|
4908
|
+
throw error;
|
|
4909
|
+
});
|
|
4869
4910
|
}
|
|
4870
4911
|
try {
|
|
4871
4912
|
if (!session.isInitialized) await withinInitBudget(initializeSession(session), session);
|
|
@@ -4879,8 +4920,8 @@ function defaultSessionFactory(input) {
|
|
|
4879
4920
|
}
|
|
4880
4921
|
};
|
|
4881
4922
|
}
|
|
4882
|
-
function openSegmentedSessionReuse(input, session, injector) {
|
|
4883
|
-
prepareCaptureSessionForReuse(session, input.framesDir, injector());
|
|
4923
|
+
async function openSegmentedSessionReuse(input, session, injector) {
|
|
4924
|
+
await prepareCaptureSessionForReuse(session, input.framesDir, injector());
|
|
4884
4925
|
}
|
|
4885
4926
|
async function openSegmentedSession(input, injector) {
|
|
4886
4927
|
const captureCfg = input.cfg.forceScreenshot === input.plan.forceScreenshot ? input.cfg : { ...input.cfg, forceScreenshot: input.plan.forceScreenshot };
|
|
@@ -5584,7 +5625,7 @@ async function extractDeferredFrames(input) {
|
|
|
5584
5625
|
const shown = shownDeferredFrameIndexes(input, input.frames, input.fps);
|
|
5585
5626
|
return Promise.all(
|
|
5586
5627
|
deferred.map(async (video) => {
|
|
5587
|
-
const outputDir = join11(input.outputRoot, video.videoId);
|
|
5628
|
+
const outputDir = join11(input.outputRoot, mediaIdPathSegment(video.videoId));
|
|
5588
5629
|
const indexes = [...shown.get(video.videoId) ?? []].sort((a, b) => a - b);
|
|
5589
5630
|
if (indexes.length === 0) {
|
|
5590
5631
|
return { ...video, outputDir, framePaths: /* @__PURE__ */ new Map(), ownedByLookup: false };
|
|
@@ -5799,7 +5840,7 @@ function trackSegmentFramePeak(frames, rootDir, onPeak) {
|
|
|
5799
5840
|
|
|
5800
5841
|
// ../producer/src/services/render/segmentManifest.ts
|
|
5801
5842
|
import { createHash as createHash2 } from "crypto";
|
|
5802
|
-
import { existsSync as
|
|
5843
|
+
import { existsSync as existsSync7, mkdirSync as mkdirSync6, readFileSync as readFileSync4, statSync as statSync5, writeFileSync as writeFileSync3 } from "fs";
|
|
5803
5844
|
import { join as join14 } from "path";
|
|
5804
5845
|
var MANIFEST_FILENAME = "segments.json";
|
|
5805
5846
|
function computeSegmentPlanHash(input) {
|
|
@@ -5846,7 +5887,7 @@ function isManifest(value) {
|
|
|
5846
5887
|
}
|
|
5847
5888
|
function readSegmentManifest(segmentDir) {
|
|
5848
5889
|
const path = join14(segmentDir, MANIFEST_FILENAME);
|
|
5849
|
-
if (!
|
|
5890
|
+
if (!existsSync7(path)) return null;
|
|
5850
5891
|
try {
|
|
5851
5892
|
const parsed = JSON.parse(readFileSync4(path, "utf-8"));
|
|
5852
5893
|
return isManifest(parsed) ? parsed : null;
|
|
@@ -5875,7 +5916,7 @@ async function validateCompletedSegments(manifest, expectedHash, probeFrames) {
|
|
|
5875
5916
|
const ok = /* @__PURE__ */ new Set();
|
|
5876
5917
|
if (manifest.planHash !== expectedHash) return ok;
|
|
5877
5918
|
for (const entry of manifest.completed) {
|
|
5878
|
-
if (!
|
|
5919
|
+
if (!existsSync7(entry.path)) continue;
|
|
5879
5920
|
const size = statSync5(entry.path).size;
|
|
5880
5921
|
if (size <= 0 || size !== entry.bytes) continue;
|
|
5881
5922
|
const frames = await probeFrames(entry.path);
|
|
@@ -6233,26 +6274,26 @@ var STALL_POLL_MS = 5e3;
|
|
|
6233
6274
|
function watchStall(phase, rule) {
|
|
6234
6275
|
const detail = rule.detail ?? (() => void 0);
|
|
6235
6276
|
let last = rule.progress();
|
|
6277
|
+
let lastActivity = rule.activity?.();
|
|
6236
6278
|
let budgetMs = rule.firstProgressMs;
|
|
6237
6279
|
const silence = createStallClock();
|
|
6238
6280
|
const pollMs = Math.min(STALL_POLL_MS, rule.noProgressMs, rule.firstProgressMs);
|
|
6239
6281
|
let attempt;
|
|
6240
6282
|
let timer;
|
|
6241
6283
|
let inTail = false;
|
|
6284
|
+
const activityMoved = () => {
|
|
6285
|
+
const activity = rule.activity?.();
|
|
6286
|
+
if (activity === lastActivity) return false;
|
|
6287
|
+
lastActivity = activity;
|
|
6288
|
+
return true;
|
|
6289
|
+
};
|
|
6242
6290
|
const restartWindow = (ms) => {
|
|
6243
6291
|
last = rule.progress();
|
|
6244
6292
|
budgetMs = ms;
|
|
6245
6293
|
silence.reset();
|
|
6246
6294
|
};
|
|
6247
6295
|
const tripped = new Promise((_, reject) => {
|
|
6248
|
-
|
|
6249
|
-
const current = rule.progress();
|
|
6250
|
-
if (rule.complete?.() && !inTail) {
|
|
6251
|
-
inTail = true;
|
|
6252
|
-
return restartWindow(rule.tailMs ?? rule.noProgressMs);
|
|
6253
|
-
}
|
|
6254
|
-
if (current !== last) return restartWindow(rule.noProgressMs);
|
|
6255
|
-
if (silence.idle(pollMs) < budgetMs) return;
|
|
6296
|
+
const trip = (current) => {
|
|
6256
6297
|
const error = new RenderStageStalledError(phase, budgetMs, current, detail());
|
|
6257
6298
|
if (attempt && !attempt.signal.aborted) {
|
|
6258
6299
|
attempt.abort(error);
|
|
@@ -6260,6 +6301,16 @@ function watchStall(phase, rule) {
|
|
|
6260
6301
|
}
|
|
6261
6302
|
clearInterval(timer);
|
|
6262
6303
|
reject(error);
|
|
6304
|
+
};
|
|
6305
|
+
timer = setInterval(() => {
|
|
6306
|
+
const current = rule.progress();
|
|
6307
|
+
if (rule.complete?.() && !inTail) {
|
|
6308
|
+
inTail = true;
|
|
6309
|
+
return restartWindow(rule.tailMs ?? rule.noProgressMs);
|
|
6310
|
+
}
|
|
6311
|
+
if (current !== last) return restartWindow(rule.noProgressMs);
|
|
6312
|
+
if (activityMoved()) return silence.reset();
|
|
6313
|
+
if (silence.idle(pollMs) >= budgetMs) trip(current);
|
|
6263
6314
|
}, pollMs);
|
|
6264
6315
|
});
|
|
6265
6316
|
const openAttempt = (parent) => {
|
|
@@ -6433,23 +6484,23 @@ function countAuthoredTimedClips(html) {
|
|
|
6433
6484
|
}
|
|
6434
6485
|
|
|
6435
6486
|
// ../producer/src/services/render/stages/compileStage.ts
|
|
6436
|
-
import { existsSync as
|
|
6487
|
+
import { existsSync as existsSync11, writeFileSync as writeFileSync4 } from "fs";
|
|
6437
6488
|
import { join as join17 } from "path";
|
|
6438
6489
|
|
|
6439
6490
|
// ../producer/src/services/htmlCompiler.ts
|
|
6440
6491
|
import { createHash as createHash4 } from "crypto";
|
|
6441
|
-
import { createReadStream as createReadStream2, existsSync as
|
|
6492
|
+
import { createReadStream as createReadStream2, existsSync as existsSync10, mkdirSync as mkdirSync7, readFileSync as readFileSync6 } from "fs";
|
|
6442
6493
|
import { join as join16, dirname as dirname6, resolve as resolve5, basename as basename5, relative as relative2, sep as sep2 } from "path";
|
|
6443
6494
|
|
|
6444
6495
|
// ../producer/src/services/bundledScripts.ts
|
|
6445
|
-
import { existsSync as
|
|
6496
|
+
import { existsSync as existsSync8, readFileSync as readFileSync5 } from "fs";
|
|
6446
6497
|
import { join as join15 } from "path";
|
|
6447
6498
|
var GSAP_VENDOR_DIR_ENV = "HYPERFRAMES_GSAP_VENDOR_DIR";
|
|
6448
6499
|
function bundledScript(url) {
|
|
6449
6500
|
const dir = process.env[GSAP_VENDOR_DIR_ENV];
|
|
6450
6501
|
if (!dir || url !== `${gsapCdnDist()}gsap.min.js`) return null;
|
|
6451
6502
|
const file = join15(dir, "gsap.min.js");
|
|
6452
|
-
return
|
|
6503
|
+
return existsSync8(file) ? readFileSync5(file) : null;
|
|
6453
6504
|
}
|
|
6454
6505
|
|
|
6455
6506
|
// ../producer/src/services/renderMediaCollector.ts
|
|
@@ -6599,7 +6650,7 @@ function getPositionEditsRenderScript() {
|
|
|
6599
6650
|
}
|
|
6600
6651
|
|
|
6601
6652
|
// ../producer/src/services/assetMediaType.ts
|
|
6602
|
-
import { existsSync as
|
|
6653
|
+
import { existsSync as existsSync9 } from "fs";
|
|
6603
6654
|
var ASSET_MEDIA_TYPE_MISMATCH = "ASSET_MEDIA_TYPE_MISMATCH";
|
|
6604
6655
|
var AssetMediaTypeMismatchError = class extends Error {
|
|
6605
6656
|
code = ASSET_MEDIA_TYPE_MISMATCH;
|
|
@@ -6665,7 +6716,7 @@ async function preflightCompositionAssetMediaTypes(input) {
|
|
|
6665
6716
|
input.projectDir,
|
|
6666
6717
|
input.compiledDir
|
|
6667
6718
|
);
|
|
6668
|
-
if (!
|
|
6719
|
+
if (!existsSync9(resolvedPath)) continue;
|
|
6669
6720
|
byPath.set(resolvedPath, [...byPath.get(resolvedPath) ?? [], reference]);
|
|
6670
6721
|
}
|
|
6671
6722
|
const mismatches = [];
|
|
@@ -6705,7 +6756,7 @@ async function preflightCompositionAssetMediaTypes(input) {
|
|
|
6705
6756
|
|
|
6706
6757
|
// ../producer/src/services/htmlCompiler.ts
|
|
6707
6758
|
function logRemoteDownloadTelemetry(event) {
|
|
6708
|
-
defaultLogger.
|
|
6759
|
+
defaultLogger.debug("[Compiler] Remote asset download integrity", { ...event });
|
|
6709
6760
|
}
|
|
6710
6761
|
var INFERRED_MEDIA_DURATION_ATTR = "data-hf-inferred-duration";
|
|
6711
6762
|
function parseSubCompHtmlForValidity(html) {
|
|
@@ -6919,7 +6970,7 @@ async function resolveMediaDuration(src, mediaStart, playbackRate, baseDir, down
|
|
|
6919
6970
|
let filePath = src;
|
|
6920
6971
|
if (isHttpUrl(src)) {
|
|
6921
6972
|
const remoteDir = join16(downloadDir, REMOTE_MEDIA_SUBDIR);
|
|
6922
|
-
if (!
|
|
6973
|
+
if (!existsSync10(remoteDir)) mkdirSync7(remoteDir, { recursive: true });
|
|
6923
6974
|
try {
|
|
6924
6975
|
filePath = await downloadToTemp(src, remoteDir, void 0, void 0, void 0, {
|
|
6925
6976
|
onTelemetry: logRemoteDownloadTelemetry
|
|
@@ -6931,8 +6982,11 @@ async function resolveMediaDuration(src, mediaStart, playbackRate, baseDir, down
|
|
|
6931
6982
|
filePath = decodedUrlPath(src);
|
|
6932
6983
|
if (!filePath.startsWith("/")) filePath = join16(baseDir, filePath);
|
|
6933
6984
|
filePath = urlByAbsentLocalPath?.get(filePath) ?? filePath;
|
|
6985
|
+
if (!isHttpUrl(filePath) && namesAnotherNetworkRoot(baseDir, filePath)) {
|
|
6986
|
+
return { duration: null, resolvedPath: filePath };
|
|
6987
|
+
}
|
|
6934
6988
|
}
|
|
6935
|
-
if (!isHttpUrl(filePath) && !
|
|
6989
|
+
if (!isHttpUrl(filePath) && !existsSync10(filePath)) {
|
|
6936
6990
|
return { duration: null, resolvedPath: filePath };
|
|
6937
6991
|
}
|
|
6938
6992
|
const withSrcContext = (error) => {
|
|
@@ -7281,7 +7335,7 @@ function inlineSubCompositions2(html, subCompositions, projectDir, variableOverr
|
|
|
7281
7335
|
parseHtml: (htmlStr) => parseHTML(htmlStr).document,
|
|
7282
7336
|
// Mirrors the preview bundler: a sub-composition's SIBLING assets resolve
|
|
7283
7337
|
// against its own directory, project-root refs stay as authored.
|
|
7284
|
-
assetExists: (path) =>
|
|
7338
|
+
assetExists: (path) => existsSync10(resolve5(projectDir, path)),
|
|
7285
7339
|
// Preserve the authored root wrapper as a child of the host, matching
|
|
7286
7340
|
// the preview bundler's shape (htmlBundler.ts's prepareFlattenedInnerRoot,
|
|
7287
7341
|
// which the runtime compositionLoader mirrors with its own copy for the
|
|
@@ -7457,7 +7511,7 @@ ${safeText}
|
|
|
7457
7511
|
//# sourceURL=${new URL(src).href}
|
|
7458
7512
|
`;
|
|
7459
7513
|
el.replaceWith(inlineScript);
|
|
7460
|
-
defaultLogger.
|
|
7514
|
+
defaultLogger.debug(`[Compiler] Inlined CDN script: ${src}`);
|
|
7461
7515
|
} else {
|
|
7462
7516
|
if (download.reason instanceof ScriptIntegrityError) throw download.reason;
|
|
7463
7517
|
defaultLogger.warn(
|
|
@@ -7477,7 +7531,7 @@ function collectExternalAssets(html, projectDir) {
|
|
|
7477
7531
|
if (isPathInside2(absPath, absProjectDir)) {
|
|
7478
7532
|
return null;
|
|
7479
7533
|
}
|
|
7480
|
-
if (!
|
|
7534
|
+
if (!existsSync10(absPath)) return null;
|
|
7481
7535
|
const safeKey = toExternalAssetKey(absPath);
|
|
7482
7536
|
externalAssets.set(safeKey, absPath);
|
|
7483
7537
|
return safeKey;
|
|
@@ -7512,7 +7566,7 @@ function collectExternalAssets(html, projectDir) {
|
|
|
7512
7566
|
if (rewritten !== style) el.setAttribute("style", rewritten);
|
|
7513
7567
|
}
|
|
7514
7568
|
if (externalAssets.size > 0) {
|
|
7515
|
-
defaultLogger.
|
|
7569
|
+
defaultLogger.debug(
|
|
7516
7570
|
`[Compiler] Found ${externalAssets.size} asset(s) outside project directory, will copy to render output`
|
|
7517
7571
|
);
|
|
7518
7572
|
}
|
|
@@ -7527,7 +7581,7 @@ var REMOTE_SOURCE_TAG_RE = /<source\b[^>]*?\bsrc\s*=\s*["'](https?:\/\/[^"']+)["
|
|
|
7527
7581
|
var REMOTE_IMG_TAG_RE = /<img\b[^>]*?(?<![\w-])src\s*=\s*["'](https?:\/\/[^"']+)["'][^>]*>/gi;
|
|
7528
7582
|
async function downloadAndRewriteUrls(urlSet, html, remoteDir, warnLabel, logLabel, extraRewrite) {
|
|
7529
7583
|
if (urlSet.size === 0) return { html, remoteMediaAssets: /* @__PURE__ */ new Map() };
|
|
7530
|
-
if (!
|
|
7584
|
+
if (!existsSync10(remoteDir)) mkdirSync7(remoteDir, { recursive: true });
|
|
7531
7585
|
const urlToLocal = /* @__PURE__ */ new Map();
|
|
7532
7586
|
await Promise.all(
|
|
7533
7587
|
[...urlSet].map(async (url) => {
|
|
@@ -7559,7 +7613,7 @@ async function downloadAndRewriteUrls(urlSet, html, remoteDir, warnLabel, logLab
|
|
|
7559
7613
|
result = result.replaceAll(`"${url}"`, `"${relPath}"`).replaceAll(`'${url}'`, `'${relPath}'`);
|
|
7560
7614
|
if (extraRewrite) result = extraRewrite(result, url, relPath);
|
|
7561
7615
|
}
|
|
7562
|
-
defaultLogger.
|
|
7616
|
+
defaultLogger.debug(`[Compiler] ${logLabel} ${urlToLocal.size} to ${REMOTE_MEDIA_SUBDIR}/`);
|
|
7563
7617
|
return { html: result, remoteMediaAssets };
|
|
7564
7618
|
}
|
|
7565
7619
|
async function localizeRemoteMediaSources(html, downloadDir) {
|
|
@@ -7696,7 +7750,7 @@ async function inlineExternalFontStylesheets(html) {
|
|
|
7696
7750
|
${fontFaceBlocks.join("\n")}
|
|
7697
7751
|
</style>`;
|
|
7698
7752
|
result = result.replace(fullMatch, inlineStyle);
|
|
7699
|
-
defaultLogger.
|
|
7753
|
+
defaultLogger.debug("[Compiler] Inlined external @font-face rule(s)", {
|
|
7700
7754
|
count: fontFaceBlocks.length,
|
|
7701
7755
|
urlFingerprint: identity.urlFingerprint,
|
|
7702
7756
|
host: identity.host
|
|
@@ -7710,13 +7764,13 @@ function projectStylesheetFontFamilies(html, projectDir) {
|
|
|
7710
7764
|
const href = /\bhref=["']([^"']+)["']/i.exec(tag)?.[1];
|
|
7711
7765
|
if (!href || /^(?:[a-z][a-z\d+.-]*:|\/\/)/i.test(href)) continue;
|
|
7712
7766
|
const sheet = resolve5(projectDir, decodedUrlPath(href).replace(/^(?:\.?\/)+/, ""));
|
|
7713
|
-
if (!isPathInside2(sheet, projectDir) || !
|
|
7767
|
+
if (!isPathInside2(sheet, projectDir) || !existsSync10(sheet)) continue;
|
|
7714
7768
|
for (const face of extractFontFaceBlocks(readFileSync6(sheet, "utf8"))) {
|
|
7715
7769
|
const family = /font-family\s*:\s*([^;}]+)/i.exec(face)?.[1]?.trim().replace(/^['"]|['"]$/g, "");
|
|
7716
7770
|
const shipsFile = [...face.matchAll(LOCAL_FONTFACE_URL_RE)].some(([, url = ""]) => {
|
|
7717
7771
|
const path = decodedUrlPath(url);
|
|
7718
7772
|
const file = path.startsWith("/") ? resolve5(projectDir, `.${path}`) : resolve5(dirname6(sheet), path);
|
|
7719
|
-
return isPathInside2(file, projectDir) &&
|
|
7773
|
+
return isPathInside2(file, projectDir) && existsSync10(file);
|
|
7720
7774
|
});
|
|
7721
7775
|
if (family && shipsFile) families.push(family);
|
|
7722
7776
|
}
|
|
@@ -7786,7 +7840,7 @@ async function readLocalFont(absPath) {
|
|
|
7786
7840
|
return { kind: "inline", buffer: Buffer.concat(chunks, totalBytes) };
|
|
7787
7841
|
}
|
|
7788
7842
|
async function embedLocalFontFaces(html, projectDir) {
|
|
7789
|
-
const { fontToDataUri: toDataUri } = await import("./deterministicFonts-
|
|
7843
|
+
const { fontToDataUri: toDataUri } = await import("./deterministicFonts-2ZPRAI3C.js");
|
|
7790
7844
|
const styleBlockRe = /<style\b[^>]*>([\s\S]*?)<\/style>/gi;
|
|
7791
7845
|
const fontFaceRe = /@font-face\s*\{([^}]*)\}/gi;
|
|
7792
7846
|
let result = html;
|
|
@@ -7818,7 +7872,7 @@ async function embedLocalFontFaces(html, projectDir) {
|
|
|
7818
7872
|
const font = await readLocalFont(absPath);
|
|
7819
7873
|
if (font.kind === "file-backed") {
|
|
7820
7874
|
fileBackedAbsolutePaths.add(absPath);
|
|
7821
|
-
defaultLogger.
|
|
7875
|
+
defaultLogger.debug(
|
|
7822
7876
|
`[Compiler] Kept large local font file-backed: ${localPath} (> ${(MAX_LOCAL_FONT_DATA_URI_BYTES / 1024 / 1024).toFixed(1)} MB)`
|
|
7823
7877
|
);
|
|
7824
7878
|
embeddedPaths.add(localPath);
|
|
@@ -7826,7 +7880,7 @@ async function embedLocalFontFaces(html, projectDir) {
|
|
|
7826
7880
|
}
|
|
7827
7881
|
dataUri = await toDataUri(font.buffer, ext, { compressToWoff2: false });
|
|
7828
7882
|
dataUriByAbsolutePath.set(absPath, dataUri);
|
|
7829
|
-
defaultLogger.
|
|
7883
|
+
defaultLogger.debug(
|
|
7830
7884
|
`[Compiler] Embedded local font file: ${localPath} (${(font.buffer.length / 1024).toFixed(0)} KB \u2192 data URI)`
|
|
7831
7885
|
);
|
|
7832
7886
|
}
|
|
@@ -7854,14 +7908,17 @@ function renderGsapDist() {
|
|
|
7854
7908
|
}
|
|
7855
7909
|
function rewriteUnresolvableGsapToCdn(html, projectDir, compSrcPath) {
|
|
7856
7910
|
let gsapDist;
|
|
7857
|
-
const exists = (path) =>
|
|
7911
|
+
const exists = (path) => {
|
|
7912
|
+
const file = resolve5(projectDir, path);
|
|
7913
|
+
return !namesAnotherNetworkRoot(projectDir, file) && existsSync10(file);
|
|
7914
|
+
};
|
|
7858
7915
|
return html.replace(
|
|
7859
7916
|
/(<script\b[^>]*\bsrc=["'])([^"']*gsap[^"']*\/dist\/([^"']+))(["'][^>]*>)/gi,
|
|
7860
7917
|
(full, prefix, src, file, suffix) => {
|
|
7861
7918
|
if (/^https?:\/\//i.test(src)) return full;
|
|
7862
7919
|
if (exists(compSrcPath ? rewriteAssetPath(compSrcPath, src, exists) : src)) return full;
|
|
7863
7920
|
gsapDist ??= renderGsapDist();
|
|
7864
|
-
defaultLogger.
|
|
7921
|
+
defaultLogger.debug(`[Compiler] Rewriting missing gsap script: ${src} \u2192 ${gsapDist}${file}`);
|
|
7865
7922
|
return `${prefix}${gsapDist}${file}${suffix}`;
|
|
7866
7923
|
}
|
|
7867
7924
|
);
|
|
@@ -7871,7 +7928,7 @@ function rebaseDirectEntryAssetPaths(html, projectDir, htmlPath) {
|
|
|
7871
7928
|
const entryPath = relative2(projectDir, htmlPath).replace(/\\/g, "/");
|
|
7872
7929
|
if (!entryPath.includes("/")) return html;
|
|
7873
7930
|
const { document: document2 } = parseHTML(html);
|
|
7874
|
-
const assetExists = (path) =>
|
|
7931
|
+
const assetExists = (path) => existsSync10(resolve5(projectDir, path));
|
|
7875
7932
|
rewriteAssetPaths(
|
|
7876
7933
|
document2.querySelectorAll("[src], [href], [srcset]"),
|
|
7877
7934
|
entryPath,
|
|
@@ -7891,11 +7948,29 @@ function rebaseDirectEntryAssetPaths(html, projectDir, htmlPath) {
|
|
|
7891
7948
|
}
|
|
7892
7949
|
return document2.toString();
|
|
7893
7950
|
}
|
|
7951
|
+
function bindVariableMediaSources(html, variables) {
|
|
7952
|
+
if (!html.includes("data-var-src")) return html;
|
|
7953
|
+
const { document: document2 } = parseHTML(html);
|
|
7954
|
+
const declared = {};
|
|
7955
|
+
for (const el of document2.querySelectorAll("[data-composition-variables]")) {
|
|
7956
|
+
Object.assign(declared, readDeclaredDefaults(el));
|
|
7957
|
+
}
|
|
7958
|
+
const values = { ...declared, ...variables };
|
|
7959
|
+
let changed = false;
|
|
7960
|
+
for (const el of document2.querySelectorAll("video[data-var-src], audio[data-var-src]")) {
|
|
7961
|
+
if (el.closest("[data-variable-values]")) continue;
|
|
7962
|
+
const src = boundMediaSrc(el, values);
|
|
7963
|
+
if (src === null || el.getAttribute("src") === src) continue;
|
|
7964
|
+
el.setAttribute("src", src);
|
|
7965
|
+
changed = true;
|
|
7966
|
+
}
|
|
7967
|
+
return changed ? document2.toString() : html;
|
|
7968
|
+
}
|
|
7894
7969
|
async function compileForRender(projectDir, htmlPath, downloadDir, options = {}) {
|
|
7895
7970
|
const entryHtml = rebaseDirectEntryAssetPaths(readTextFile(htmlPath), projectDir, htmlPath);
|
|
7896
|
-
const rawHtml =
|
|
7897
|
-
rewriteUnresolvableGsapToCdn(entryHtml, projectDir),
|
|
7898
|
-
|
|
7971
|
+
const rawHtml = bindVariableMediaSources(
|
|
7972
|
+
normalizeCompositionSrcs(rewriteUnresolvableGsapToCdn(entryHtml, projectDir), projectDir),
|
|
7973
|
+
options.variables ?? {}
|
|
7899
7974
|
);
|
|
7900
7975
|
assertSubCompositionsUsable(rawHtml, projectDir);
|
|
7901
7976
|
const probes = /* @__PURE__ */ new Map();
|
|
@@ -7979,7 +8054,7 @@ async function compileForRender(projectDir, htmlPath, downloadDir, options = {})
|
|
|
7979
8054
|
timeoutMs: options.ffmpegProcessTimeout
|
|
7980
8055
|
});
|
|
7981
8056
|
if (preparedHeifImages.length > 0) {
|
|
7982
|
-
defaultLogger.
|
|
8057
|
+
defaultLogger.debug(`[Compiler] Converted ${preparedHeifImages.length} HEIC image(s) to JPEG`);
|
|
7983
8058
|
}
|
|
7984
8059
|
const gifSourceAssets = new Map(remoteImageAssets);
|
|
7985
8060
|
const {
|
|
@@ -7994,7 +8069,7 @@ async function compileForRender(projectDir, htmlPath, downloadDir, options = {})
|
|
|
7994
8069
|
timeoutMs: options.ffmpegProcessTimeout
|
|
7995
8070
|
});
|
|
7996
8071
|
if (preparedGifs.length > 0) {
|
|
7997
|
-
defaultLogger.
|
|
8072
|
+
defaultLogger.debug(`[Compiler] Prepared ${preparedGifs.length} animated GIF input(s) as WebM`);
|
|
7998
8073
|
}
|
|
7999
8074
|
const embeddedHtml = await embedLocalFontFaces(htmlWithPreparedGifs, projectDir);
|
|
8000
8075
|
const { html, externalAssets } = collectExternalAssets(embeddedHtml, projectDir);
|
|
@@ -8022,7 +8097,7 @@ async function compileForRender(projectDir, htmlPath, downloadDir, options = {})
|
|
|
8022
8097
|
for (const video of videos) {
|
|
8023
8098
|
if (isHttpUrl(video.src)) continue;
|
|
8024
8099
|
const videoPath = resolve5(projectDir, video.src);
|
|
8025
|
-
if (advised.has(videoPath)) continue;
|
|
8100
|
+
if (advised.has(videoPath) || namesAnotherNetworkRoot(projectDir, videoPath)) continue;
|
|
8026
8101
|
advised.add(videoPath);
|
|
8027
8102
|
const reencode = `ffmpeg -i "${video.src}" -c:v libx264 -r 30 -g 30 -keyint_min 30 -movflags +faststart -c:a copy output.mp4`;
|
|
8028
8103
|
(async () => {
|
|
@@ -8441,7 +8516,7 @@ function resolveEntryHtmlPath(input) {
|
|
|
8441
8516
|
const rawEntry = readTextFile(htmlPath);
|
|
8442
8517
|
if (entryFile === "index.html" || !isTemplateEntry(rawEntry)) return htmlPath;
|
|
8443
8518
|
const projectIndexPath = join17(projectDir, "index.html");
|
|
8444
|
-
if (!
|
|
8519
|
+
if (!existsSync11(projectIndexPath)) {
|
|
8445
8520
|
throw new Error(
|
|
8446
8521
|
`Template entry file "${entryFile}" requires a project index.html to extract its render shell.`
|
|
8447
8522
|
);
|
|
@@ -8461,6 +8536,14 @@ function resolveEntryHtmlPath(input) {
|
|
|
8461
8536
|
log.info("Extracted standalone entry from index.html host context", { entryFile });
|
|
8462
8537
|
return wrapperPath;
|
|
8463
8538
|
}
|
|
8539
|
+
function applyChroma444Gate(cfg, chromaSubsampling, gate, log) {
|
|
8540
|
+
if (!cfg.useDrawElement || chromaSubsampling !== "444") return gate;
|
|
8541
|
+
cfg.useDrawElement = false;
|
|
8542
|
+
log.info(
|
|
8543
|
+
"[Render] Fast capture: chromaSubsampling 444 captures lossless PNG frames, so disabling drawElementImage for this render. Capture uses the platform's baseline route."
|
|
8544
|
+
);
|
|
8545
|
+
return "chroma_444";
|
|
8546
|
+
}
|
|
8464
8547
|
async function runCompileStage(input) {
|
|
8465
8548
|
const {
|
|
8466
8549
|
projectDir,
|
|
@@ -8512,6 +8595,7 @@ async function runCompileStage(input) {
|
|
|
8512
8595
|
"[Render] Fast capture: composition uses shader transitions, so disabling drawElementImage so page-side compositing stays available."
|
|
8513
8596
|
);
|
|
8514
8597
|
}
|
|
8598
|
+
deCompileGate = applyChroma444Gate(cfg, job.config.chromaSubsampling, deCompileGate, log);
|
|
8515
8599
|
if (!cfg.useDrawElement && cfg.pageSideCompositingAutoDisabled) {
|
|
8516
8600
|
cfg.enablePageSideCompositing = true;
|
|
8517
8601
|
cfg.pageSideCompositingAutoDisabled = false;
|
|
@@ -8599,11 +8683,19 @@ function isActionableProbeFailure(line) {
|
|
|
8599
8683
|
|
|
8600
8684
|
// ../producer/src/services/render/captureImageFormat.ts
|
|
8601
8685
|
function resolveCaptureImageFormat(input) {
|
|
8602
|
-
return input.needsAlpha || input.motionBlur ? "png" : "jpeg";
|
|
8686
|
+
return input.needsAlpha || input.motionBlur || input.chromaSubsampling === "444" ? "png" : "jpeg";
|
|
8603
8687
|
}
|
|
8604
8688
|
function resolveCaptureJpegQuality(quality) {
|
|
8605
8689
|
return quality === "draft" ? 80 : 100;
|
|
8606
8690
|
}
|
|
8691
|
+
function resolveCaptureSurface(input, quality) {
|
|
8692
|
+
const format = resolveCaptureImageFormat(input);
|
|
8693
|
+
return {
|
|
8694
|
+
format,
|
|
8695
|
+
quality: format === "png" ? void 0 : resolveCaptureJpegQuality(quality),
|
|
8696
|
+
transparent: input.needsAlpha
|
|
8697
|
+
};
|
|
8698
|
+
}
|
|
8607
8699
|
|
|
8608
8700
|
// ../producer/src/services/render/stages/probeStage.ts
|
|
8609
8701
|
var FRAME_BOUNDARY_EPSILON = 1e-3;
|
|
@@ -8733,7 +8825,8 @@ async function runProbeStage(input) {
|
|
|
8733
8825
|
height,
|
|
8734
8826
|
needsAlpha,
|
|
8735
8827
|
deviceScaleFactor,
|
|
8736
|
-
subTimelineWaitMemo
|
|
8828
|
+
subTimelineWaitMemo,
|
|
8829
|
+
staticDedupMemo
|
|
8737
8830
|
} = input;
|
|
8738
8831
|
let { compiled } = input;
|
|
8739
8832
|
const probeCfg = cfg.forceScreenshot === forceScreenshot ? cfg : { ...cfg, forceScreenshot };
|
|
@@ -8780,21 +8873,25 @@ async function runProbeStage(input) {
|
|
|
8780
8873
|
});
|
|
8781
8874
|
assertNotAborted();
|
|
8782
8875
|
const motionBlur = job.config.motionBlur;
|
|
8783
|
-
const captureFormat = resolveCaptureImageFormat({ needsAlpha, motionBlur });
|
|
8784
8876
|
const captureOpts = {
|
|
8785
8877
|
recordReferenceBackground: input.recordReferenceBackground,
|
|
8786
8878
|
width,
|
|
8787
8879
|
height,
|
|
8788
8880
|
fps: job.config.fps,
|
|
8789
|
-
|
|
8790
|
-
|
|
8791
|
-
|
|
8881
|
+
...resolveCaptureSurface(
|
|
8882
|
+
{ needsAlpha, motionBlur, chromaSubsampling: job.config.chromaSubsampling },
|
|
8883
|
+
job.config.quality
|
|
8884
|
+
),
|
|
8792
8885
|
variables: job.config.variables,
|
|
8793
8886
|
deviceScaleFactor,
|
|
8794
8887
|
motionBlur,
|
|
8795
8888
|
pageMotionBlur: job.config.pageMotionBlur,
|
|
8796
8889
|
requiresWebGpu: compositionRequiresWebGpu(compiled.html),
|
|
8797
|
-
subTimelineWaitMemo
|
|
8890
|
+
subTimelineWaitMemo,
|
|
8891
|
+
staticDedupMemo,
|
|
8892
|
+
compositionHash: computeCompositionObservabilityHash(compiled.html),
|
|
8893
|
+
deferStaticDedup: true,
|
|
8894
|
+
onStaticDedupActivity: () => noteStaticDedupActivity(job)
|
|
8798
8895
|
};
|
|
8799
8896
|
const PROBE_MAX_ATTEMPTS = 2;
|
|
8800
8897
|
for (let attempt = 1; attempt <= PROBE_MAX_ATTEMPTS; attempt++) {
|
|
@@ -9274,7 +9371,7 @@ function validateDistributedDuration(input) {
|
|
|
9274
9371
|
}
|
|
9275
9372
|
|
|
9276
9373
|
// ../producer/src/services/render/stages/extractVideosStage.ts
|
|
9277
|
-
import { existsSync as
|
|
9374
|
+
import { existsSync as existsSync12 } from "fs";
|
|
9278
9375
|
import { join as join19 } from "path";
|
|
9279
9376
|
|
|
9280
9377
|
// ../producer/src/services/render/extractionFailureMetadata.ts
|
|
@@ -9531,7 +9628,7 @@ async function runExtractVideosStage(input) {
|
|
|
9531
9628
|
const probeFailures = await Promise.all(
|
|
9532
9629
|
composition.videos.map(async (v) => {
|
|
9533
9630
|
const videoPath = resolveProjectRelativeSrc(v.src, projectDir, compiledDir);
|
|
9534
|
-
if (!
|
|
9631
|
+
if (!existsSync12(videoPath)) return null;
|
|
9535
9632
|
try {
|
|
9536
9633
|
const attempted = extractionPolicy.maxTransientRetries === 0 ? { result: await extractMediaMetadata(videoPath), retries: 0 } : await runVideoExtractionWithRetry(() => extractMediaMetadata(videoPath), {
|
|
9537
9634
|
signal: abortSignal,
|
|
@@ -9569,7 +9666,7 @@ async function runExtractVideosStage(input) {
|
|
|
9569
9666
|
const probed = await Promise.all(
|
|
9570
9667
|
composition.images.map(async (img) => {
|
|
9571
9668
|
const imgPath = resolveProjectRelativeSrc(img.src, projectDir, compiledDir);
|
|
9572
|
-
if (!
|
|
9669
|
+
if (!existsSync12(imgPath)) return null;
|
|
9573
9670
|
const colorSpace = await probeColorSpaceSafely(imgPath, log);
|
|
9574
9671
|
if (isHdrColorSpace(colorSpace)) {
|
|
9575
9672
|
nativeHdrImageIds.add(img.id);
|
|
@@ -9689,7 +9786,7 @@ async function appendVideoAudioFromProbe(input) {
|
|
|
9689
9786
|
videos.map(async (video) => {
|
|
9690
9787
|
const path = isHttpUrl(video.src) ? video.src : resolveProjectRelativeSrc(video.src, projectDir, compiledDir);
|
|
9691
9788
|
const readFrom = urlByAbsentLocalPath?.get(path) ?? path;
|
|
9692
|
-
if (!isHttpUrl(readFrom) && !
|
|
9789
|
+
if (!isHttpUrl(readFrom) && !existsSync12(readFrom)) return null;
|
|
9693
9790
|
const metadata = await extractMediaMetadata(readFrom);
|
|
9694
9791
|
const window2 = await resolveFinalFrameExtractionWindow(
|
|
9695
9792
|
readFrom,
|
|
@@ -9709,7 +9806,7 @@ async function appendVideoAudioFromProbe(input) {
|
|
|
9709
9806
|
}
|
|
9710
9807
|
|
|
9711
9808
|
// ../producer/src/services/render/videoLayerPassthroughPlan.ts
|
|
9712
|
-
import { existsSync as
|
|
9809
|
+
import { existsSync as existsSync13 } from "fs";
|
|
9713
9810
|
var SAMPLES = 9;
|
|
9714
9811
|
function inspectVideoLayout(id, w, h, time) {
|
|
9715
9812
|
window.__hf?.seek?.(time);
|
|
@@ -9771,7 +9868,7 @@ async function planVideoLayerPassthrough(input) {
|
|
|
9771
9868
|
const { video } = q;
|
|
9772
9869
|
if (isHttpUrl(video.src)) return { reason: "remote_source" };
|
|
9773
9870
|
const path = resolveProjectRelativeSrc(video.src, input.projectDir, input.compiledDir);
|
|
9774
|
-
if (!
|
|
9871
|
+
if (!existsSync13(path)) return { reason: "source_missing" };
|
|
9775
9872
|
const layout = await probeVideoLayout(input.page, video.id, input.canvas, input.duration);
|
|
9776
9873
|
if ("reason" in layout) return layout;
|
|
9777
9874
|
const layer = await buildVideoLayerInput(
|
|
@@ -9786,11 +9883,11 @@ async function planVideoLayerPassthrough(input) {
|
|
|
9786
9883
|
}
|
|
9787
9884
|
|
|
9788
9885
|
// ../producer/src/services/render/stages/audioStage.ts
|
|
9789
|
-
import { existsSync as
|
|
9886
|
+
import { existsSync as existsSync15 } from "fs";
|
|
9790
9887
|
import { join as join22 } from "path";
|
|
9791
9888
|
|
|
9792
9889
|
// ../producer/src/services/render/audioDeliveryLimit.ts
|
|
9793
|
-
import { existsSync as
|
|
9890
|
+
import { existsSync as existsSync14 } from "fs";
|
|
9794
9891
|
import { dirname as dirname8, join as join21 } from "path";
|
|
9795
9892
|
|
|
9796
9893
|
// ../producer/src/services/render/audioPadTrim.ts
|
|
@@ -10273,7 +10370,7 @@ async function limitDeliveryPeaks(input, deps = {
|
|
|
10273
10370
|
applyChain: applyAudioFxChain,
|
|
10274
10371
|
encode: encodeAac,
|
|
10275
10372
|
rename: renameWithRetry,
|
|
10276
|
-
sourceExists:
|
|
10373
|
+
sourceExists: existsSync14
|
|
10277
10374
|
}) {
|
|
10278
10375
|
const { audioPath, sourcePath, signal, timeoutMs } = input;
|
|
10279
10376
|
if (!deps.sourceExists(sourcePath)) return { success: true };
|
|
@@ -10368,7 +10465,7 @@ async function runAudioStageScoped(input) {
|
|
|
10368
10465
|
);
|
|
10369
10466
|
audioLoweredDb = guard.loweredDb;
|
|
10370
10467
|
input.log?.info("[audio] phases", { ...result.audioPhaseMs, guard: Date.now() - guardStart });
|
|
10371
|
-
if (input.keepDeliverySource && !guard.sourceStale &&
|
|
10468
|
+
if (input.keepDeliverySource && !guard.sourceStale && existsSync15(pcmSourcePath)) {
|
|
10372
10469
|
deliverySourcePath = pcmSourcePath;
|
|
10373
10470
|
}
|
|
10374
10471
|
}
|
|
@@ -10496,7 +10593,7 @@ async function mixAudioForDelivery(input, duration, pcmSourcePath) {
|
|
|
10496
10593
|
}
|
|
10497
10594
|
|
|
10498
10595
|
// ../producer/src/services/render/stages/captureStage.ts
|
|
10499
|
-
import { existsSync as
|
|
10596
|
+
import { existsSync as existsSync16, readdirSync as readdirSync4, statfsSync as statfsSync2 } from "fs";
|
|
10500
10597
|
import { join as join23 } from "path";
|
|
10501
10598
|
function shouldAllowAdaptiveCaptureRetry(workerCount, _explicitlyConfigured) {
|
|
10502
10599
|
return workerCount > 1;
|
|
@@ -10553,7 +10650,7 @@ function diskCaptureShortfallError(needBytes, freeBytes, framesDir, basis, remed
|
|
|
10553
10650
|
}
|
|
10554
10651
|
function measureCaptureFrameBytes(workDir, framesDir) {
|
|
10555
10652
|
let total = sampleDirectoryBytes(framesDir);
|
|
10556
|
-
if (!
|
|
10653
|
+
if (!existsSync16(workDir)) return total;
|
|
10557
10654
|
for (const attempt of readdirSync4(workDir)) {
|
|
10558
10655
|
if (/^retry-\d+-batch-\d+-worker-\d+$/.test(attempt)) {
|
|
10559
10656
|
total += sampleDirectoryBytes(join23(workDir, attempt));
|
|
@@ -10735,7 +10832,7 @@ async function runSequentialDiskCapture(input, captureOptions, captureCfg, check
|
|
|
10735
10832
|
captureBeyondViewport = session.options.captureBeyondViewport;
|
|
10736
10833
|
try {
|
|
10737
10834
|
if (probeSession) {
|
|
10738
|
-
prepareCaptureSessionForReuse(session, framesDir, videoInjector);
|
|
10835
|
+
await prepareCaptureSessionForReuse(session, framesDir, videoInjector);
|
|
10739
10836
|
probeSession = null;
|
|
10740
10837
|
}
|
|
10741
10838
|
await ensureSessionReady(session, {
|
|
@@ -10860,7 +10957,7 @@ async function captureSessionFrames(session, { input, rangeStart, rangeEnd, resu
|
|
|
10860
10957
|
}
|
|
10861
10958
|
|
|
10862
10959
|
// ../producer/src/services/render/stages/captureHdrStage.ts
|
|
10863
|
-
import { existsSync as
|
|
10960
|
+
import { existsSync as existsSync18, mkdirSync as mkdirSync8 } from "fs";
|
|
10864
10961
|
import { join as join27 } from "path";
|
|
10865
10962
|
|
|
10866
10963
|
// ../producer/src/services/hdrImageTransferCache.ts
|
|
@@ -11083,7 +11180,7 @@ import { Worker } from "worker_threads";
|
|
|
11083
11180
|
import { fileURLToPath as fileURLToPath3, pathToFileURL } from "url";
|
|
11084
11181
|
import { dirname as dirname9, join as join25 } from "path";
|
|
11085
11182
|
import { createRequire } from "module";
|
|
11086
|
-
import { existsSync as
|
|
11183
|
+
import { existsSync as existsSync17 } from "fs";
|
|
11087
11184
|
import { cpus as cpus2 } from "os";
|
|
11088
11185
|
function resolveWorkerEntry(explicit) {
|
|
11089
11186
|
if (explicit && explicit.length > 0) {
|
|
@@ -11096,7 +11193,7 @@ function resolveWorkerEntry(explicit) {
|
|
|
11096
11193
|
}
|
|
11097
11194
|
const moduleDir = dirname9(fileURLToPath3(import.meta.url));
|
|
11098
11195
|
const jsPath = join25(moduleDir, "shaderTransitionWorker.js");
|
|
11099
|
-
if (
|
|
11196
|
+
if (existsSync17(jsPath)) return { path: jsPath, isTs: false };
|
|
11100
11197
|
const tsPath = join25(moduleDir, "shaderTransitionWorker.ts");
|
|
11101
11198
|
return { path: tsPath, isTs: true };
|
|
11102
11199
|
}
|
|
@@ -11657,7 +11754,7 @@ async function runCaptureHdrStage(input) {
|
|
|
11657
11754
|
}
|
|
11658
11755
|
const debugDumpEnabled = process.env.KEEP_TEMP === "1";
|
|
11659
11756
|
const debugDumpDir = debugDumpEnabled ? join27(framesDir, "debug-composite") : null;
|
|
11660
|
-
if (debugDumpDir && !
|
|
11757
|
+
if (debugDumpDir && !existsSync18(debugDumpDir)) {
|
|
11661
11758
|
mkdirSync8(debugDumpDir, { recursive: true });
|
|
11662
11759
|
}
|
|
11663
11760
|
const compositeTransfer = resolveCompositeTransfer(hasHdrContent, effectiveHdr);
|
|
@@ -11814,7 +11911,7 @@ async function runCaptureHdrStage(input) {
|
|
|
11814
11911
|
// ../producer/src/services/render/stages/encodeStage.ts
|
|
11815
11912
|
import {
|
|
11816
11913
|
copyFileSync as copyFileSync2,
|
|
11817
|
-
existsSync as
|
|
11914
|
+
existsSync as existsSync19,
|
|
11818
11915
|
mkdirSync as mkdirSync9,
|
|
11819
11916
|
readdirSync as readdirSync5,
|
|
11820
11917
|
readFileSync as readFileSync7,
|
|
@@ -11933,7 +12030,7 @@ async function encodeGifFromDir(framesDir, framePattern, outputPath, input) {
|
|
|
11933
12030
|
const failure = await reencodeWithClearedWholeFrames(argsInput, run, startTime);
|
|
11934
12031
|
if (failure) return failure;
|
|
11935
12032
|
}
|
|
11936
|
-
const fileSize =
|
|
12033
|
+
const fileSize = existsSync19(outputPath) ? statSync6(outputPath).size : 0;
|
|
11937
12034
|
return {
|
|
11938
12035
|
success: true,
|
|
11939
12036
|
outputPath,
|
|
@@ -12094,7 +12191,7 @@ async function runEncodeStage(input) {
|
|
|
12094
12191
|
const stage5Start = Date.now();
|
|
12095
12192
|
if (isPngSequence) {
|
|
12096
12193
|
const encoded = startEncodeProgress(job, "Writing PNG sequence", onProgress);
|
|
12097
|
-
if (!
|
|
12194
|
+
if (!existsSync19(outputPath)) mkdirSync9(outputPath, { recursive: true });
|
|
12098
12195
|
const captured = readdirSync5(framesDir).filter((name) => name.endsWith(".png")).sort();
|
|
12099
12196
|
if (captured.length === 0) {
|
|
12100
12197
|
throw new Error(
|
|
@@ -12105,7 +12202,7 @@ async function runEncodeStage(input) {
|
|
|
12105
12202
|
const dst = join28(outputPath, formatExportFrameName(i, "png"));
|
|
12106
12203
|
copyFileSync2(join28(framesDir, name), dst);
|
|
12107
12204
|
});
|
|
12108
|
-
if (hasAudio && audioOutputPath &&
|
|
12205
|
+
if (hasAudio && audioOutputPath && existsSync19(audioOutputPath)) {
|
|
12109
12206
|
copyFileSync2(audioOutputPath, join28(outputPath, MIXED_AUDIO_FILENAME));
|
|
12110
12207
|
log.info(
|
|
12111
12208
|
`[Render] png-sequence: ${MIXED_AUDIO_FILENAME} sidecar written to ${outputPath}/${MIXED_AUDIO_FILENAME}`
|
|
@@ -12493,7 +12590,7 @@ function findMissingFrameRanges(totalFrames, framesDir, frameExt) {
|
|
|
12493
12590
|
let rangeStart = null;
|
|
12494
12591
|
for (let frameIndex = 0; frameIndex < totalFrames; frameIndex++) {
|
|
12495
12592
|
const framePath = join29(framesDir, formatCaptureFrameName(frameIndex, frameExt));
|
|
12496
|
-
const missing = !
|
|
12593
|
+
const missing = !existsSync20(framePath) || statSync7(framePath).size <= 8;
|
|
12497
12594
|
if (missing && rangeStart === null) {
|
|
12498
12595
|
rangeStart = frameIndex;
|
|
12499
12596
|
} else if (!missing && rangeStart !== null) {
|
|
@@ -12583,17 +12680,25 @@ function resetCaptureAttemptProgress(job) {
|
|
|
12583
12680
|
job.framesRendered = 0;
|
|
12584
12681
|
}
|
|
12585
12682
|
var FIRST_FRAME_STALL_MS = 3e5;
|
|
12683
|
+
var FIRST_FRAME_STARTUP_FACTOR = 2;
|
|
12684
|
+
var FIRST_FRAME_STALL_CEILING_MS = 9e5;
|
|
12586
12685
|
var TAIL_STALL_MS = FIRST_FRAME_STALL_MS;
|
|
12587
|
-
function
|
|
12686
|
+
function firstFrameWindowMs(probeStartupMs) {
|
|
12687
|
+
const fromStartup = (probeStartupMs ?? 0) * FIRST_FRAME_STARTUP_FACTOR;
|
|
12688
|
+
if (!Number.isFinite(fromStartup)) return FIRST_FRAME_STALL_MS;
|
|
12689
|
+
return Math.max(FIRST_FRAME_STALL_MS, Math.min(FIRST_FRAME_STALL_CEILING_MS, fromStartup));
|
|
12690
|
+
}
|
|
12691
|
+
function frameStallRule(job, totalFrames, probeStartupMs) {
|
|
12588
12692
|
const noProgressMs = resolveCaptureStallTimeoutMs();
|
|
12589
12693
|
return {
|
|
12590
12694
|
progress: () => job.framesRendered ?? 0,
|
|
12591
12695
|
noProgressMs,
|
|
12592
|
-
firstProgressMs: Math.max(
|
|
12696
|
+
firstProgressMs: Math.max(firstFrameWindowMs(probeStartupMs), noProgressMs),
|
|
12593
12697
|
complete: () => (job.framesRendered ?? 0) >= totalFrames,
|
|
12594
12698
|
tailMs: Math.max(TAIL_STALL_MS, noProgressMs),
|
|
12595
12699
|
detail: () => describeWorkerPhases(job),
|
|
12596
|
-
attemptOpened: () => forgetWorkerPhases(job)
|
|
12700
|
+
attemptOpened: () => forgetWorkerPhases(job),
|
|
12701
|
+
activity: () => staticDedupActivity(job)
|
|
12597
12702
|
};
|
|
12598
12703
|
}
|
|
12599
12704
|
function isRecoverableParallelCaptureError(error) {
|
|
@@ -12618,7 +12723,7 @@ function countCapturedFrames(totalFrames, framesDir, frameExt) {
|
|
|
12618
12723
|
let captured = 0;
|
|
12619
12724
|
for (let frameIndex = 0; frameIndex < totalFrames; frameIndex++) {
|
|
12620
12725
|
const framePath = join29(framesDir, formatCaptureFrameName(frameIndex, frameExt));
|
|
12621
|
-
if (
|
|
12726
|
+
if (existsSync20(framePath)) captured++;
|
|
12622
12727
|
}
|
|
12623
12728
|
return captured;
|
|
12624
12729
|
}
|
|
@@ -13281,9 +13386,10 @@ function resolveRenderDebugDir() {
|
|
|
13281
13386
|
async function executeRenderJob(job, projectDir, outputPath, progressSink, abortSignal, assertRenderActive) {
|
|
13282
13387
|
validateHlsRenderConfig(job.config);
|
|
13283
13388
|
validateDeliveryEncoderConfig(job.config);
|
|
13389
|
+
validateChromaSubsamplingConfig(job.config);
|
|
13284
13390
|
const debugDir = resolveRenderDebugDir();
|
|
13285
13391
|
const outputDir = dirname11(outputPath);
|
|
13286
|
-
if (!
|
|
13392
|
+
if (!existsSync20(outputDir)) mkdirSync10(outputDir, { recursive: true });
|
|
13287
13393
|
const workDir = job.config.debug ? join29(debugDir, job.id) : createRenderWorkDir(resolveRenderWorkDirPrefix(outputPath, job.id), outputDir);
|
|
13288
13394
|
const pipelineStart = Date.now();
|
|
13289
13395
|
const baseLog = job.config.logger ?? defaultLogger;
|
|
@@ -13425,7 +13531,7 @@ async function executeRenderPipeline(input) {
|
|
|
13425
13531
|
job.startedAt = /* @__PURE__ */ new Date();
|
|
13426
13532
|
assertNotAborted();
|
|
13427
13533
|
assertConfiguredFfmpegBinariesExist();
|
|
13428
|
-
if (!
|
|
13534
|
+
if (!existsSync20(workDir)) mkdirSync10(workDir, { recursive: true });
|
|
13429
13535
|
if (job.config.debug) {
|
|
13430
13536
|
log.info("[Render] Debug artifacts enabled", { workDir, logPath });
|
|
13431
13537
|
}
|
|
@@ -13455,7 +13561,7 @@ async function executeRenderPipeline(input) {
|
|
|
13455
13561
|
});
|
|
13456
13562
|
const entryFile = job.config.entryFile || "index.html";
|
|
13457
13563
|
const htmlPath = join29(projectDir, entryFile);
|
|
13458
|
-
if (!
|
|
13564
|
+
if (!existsSync20(htmlPath)) {
|
|
13459
13565
|
throw new Error(`Entry file not found: ${htmlPath}`);
|
|
13460
13566
|
}
|
|
13461
13567
|
assertNotAborted();
|
|
@@ -13547,6 +13653,7 @@ async function executeRenderPipeline(input) {
|
|
|
13547
13653
|
(result) => Object.assign(job, result)
|
|
13548
13654
|
);
|
|
13549
13655
|
const subTimelineWaitMemo = {};
|
|
13656
|
+
const staticDedupMemo = {};
|
|
13550
13657
|
const probeResult = await observeRenderStage(
|
|
13551
13658
|
observability,
|
|
13552
13659
|
"browser_probe",
|
|
@@ -13567,6 +13674,7 @@ async function executeRenderPipeline(input) {
|
|
|
13567
13674
|
needsAlpha,
|
|
13568
13675
|
deviceScaleFactor,
|
|
13569
13676
|
subTimelineWaitMemo,
|
|
13677
|
+
staticDedupMemo,
|
|
13570
13678
|
recordReferenceBackground
|
|
13571
13679
|
}),
|
|
13572
13680
|
// Browser probe is pre-capture; report `browser calibrating` so a
|
|
@@ -13799,7 +13907,7 @@ async function executeRenderPipeline(input) {
|
|
|
13799
13907
|
throw new Error("File server failed to initialize before frame capture");
|
|
13800
13908
|
}
|
|
13801
13909
|
const framesDir = join29(workDir, "captured-frames");
|
|
13802
|
-
if (!
|
|
13910
|
+
if (!existsSync20(framesDir)) mkdirSync10(framesDir, { recursive: true });
|
|
13803
13911
|
updateJobStatus(job, "rendering", "Checking browser GPU", 25, onProgress, {
|
|
13804
13912
|
code: "start_browsers"
|
|
13805
13913
|
});
|
|
@@ -13818,18 +13926,28 @@ async function executeRenderPipeline(input) {
|
|
|
13818
13926
|
forceScreenshot: captureForceScreenshot
|
|
13819
13927
|
});
|
|
13820
13928
|
const videoCaptureBeyondViewport = resolveVideoCaptureBeyondViewport(composition.videos.length);
|
|
13821
|
-
const
|
|
13822
|
-
|
|
13823
|
-
|
|
13824
|
-
|
|
13929
|
+
const captureSurface = resolveCaptureSurface(
|
|
13930
|
+
{
|
|
13931
|
+
needsAlpha,
|
|
13932
|
+
motionBlur: job.config.motionBlur,
|
|
13933
|
+
chromaSubsampling: job.config.chromaSubsampling
|
|
13934
|
+
},
|
|
13935
|
+
job.config.quality
|
|
13936
|
+
);
|
|
13937
|
+
if (job.config.chromaSubsampling === "444") {
|
|
13938
|
+
log.info("[Render] Capture: png (chromaSubsampling 444, lossless)");
|
|
13939
|
+
}
|
|
13825
13940
|
const captureOptions = {
|
|
13826
13941
|
width,
|
|
13827
13942
|
height,
|
|
13828
13943
|
fps: job.config.fps,
|
|
13829
|
-
|
|
13830
|
-
|
|
13831
|
-
|
|
13832
|
-
|
|
13944
|
+
...captureSurface,
|
|
13945
|
+
...videoLayer ? {
|
|
13946
|
+
format: "png",
|
|
13947
|
+
quality: void 0,
|
|
13948
|
+
transparent: true,
|
|
13949
|
+
hiddenElementIds: [videoLayer.videoId]
|
|
13950
|
+
} : {},
|
|
13833
13951
|
variables: job.config.variables,
|
|
13834
13952
|
deviceScaleFactor,
|
|
13835
13953
|
motionBlur: job.config.motionBlur,
|
|
@@ -13848,6 +13966,9 @@ async function executeRenderPipeline(input) {
|
|
|
13848
13966
|
videoMetadataHints,
|
|
13849
13967
|
skipReadinessVideoIds: videoReadinessSkipIds,
|
|
13850
13968
|
subTimelineWaitMemo,
|
|
13969
|
+
staticDedupMemo,
|
|
13970
|
+
compositionHash,
|
|
13971
|
+
onStaticDedupActivity: () => noteStaticDedupActivity(job),
|
|
13851
13972
|
// Probe-resolved duration: drawElement self-verification derives its
|
|
13852
13973
|
// sample frame indices from this so they land inside the drained range.
|
|
13853
13974
|
compositionDurationSeconds: job.duration,
|
|
@@ -13936,6 +14057,7 @@ async function executeRenderPipeline(input) {
|
|
|
13936
14057
|
);
|
|
13937
14058
|
const nativeHdrIds = /* @__PURE__ */ new Set([...nativeHdrVideoIds, ...nativeHdrImageIds]);
|
|
13938
14059
|
const hasHdrContent = Boolean(effectiveHdr && nativeHdrIds.size > 0);
|
|
14060
|
+
assertChromaSubsamplingSdr(job.config, hasHdrContent);
|
|
13939
14061
|
if (hasHdrContent) assertOutputScaleSupported(deviceScaleFactor, "hdr_layered");
|
|
13940
14062
|
routePageMotionBlur = pageMotionBlurForRoute({ hasHdrContent, useLayeredComposite: false });
|
|
13941
14063
|
const deSingleMinFrames = resolveDeSingleMinFrames(process.env);
|
|
@@ -14518,7 +14640,9 @@ async function executeRenderPipeline(input) {
|
|
|
14518
14640
|
usePageSideCompositing: capturePlan.usePageSideCompositing,
|
|
14519
14641
|
hasHdrContent: capturePlan.hasHdrContent,
|
|
14520
14642
|
hasShaderTransitions: compiled.hasShaderTransitions,
|
|
14521
|
-
isPngSequence
|
|
14643
|
+
isPngSequence,
|
|
14644
|
+
captureImageFormat: captureOptions.format ?? "jpeg",
|
|
14645
|
+
chromaSubsampling: job.config.chromaSubsampling ?? "420"
|
|
14522
14646
|
});
|
|
14523
14647
|
const encoderHdr = hasHdrContent ? effectiveHdr : void 0;
|
|
14524
14648
|
const presetFormat = outputFormat === "webm" || outputFormat === "mov" ? outputFormat : "mp4";
|
|
@@ -14526,7 +14650,8 @@ async function executeRenderPipeline(input) {
|
|
|
14526
14650
|
job.config.quality,
|
|
14527
14651
|
presetFormat,
|
|
14528
14652
|
encoderHdr,
|
|
14529
|
-
job.config.proresProfile
|
|
14653
|
+
job.config.proresProfile,
|
|
14654
|
+
job.config.chromaSubsampling
|
|
14530
14655
|
);
|
|
14531
14656
|
if (job.config.crf != null && job.config.videoBitrate) {
|
|
14532
14657
|
log.warn(
|
|
@@ -14608,7 +14733,7 @@ async function executeRenderPipeline(input) {
|
|
|
14608
14733
|
onProgress
|
|
14609
14734
|
});
|
|
14610
14735
|
},
|
|
14611
|
-
{ stall: frameStallRule(job, totalFrames) }
|
|
14736
|
+
{ stall: frameStallRule(job, totalFrames, perfStages.browserProbeMs) }
|
|
14612
14737
|
);
|
|
14613
14738
|
lastBrowserConsole = hdrRes.lastBrowserConsole;
|
|
14614
14739
|
layeredCaptureWarnings.push(...hdrRes.warnings);
|
|
@@ -15060,7 +15185,7 @@ async function executeRenderPipeline(input) {
|
|
|
15060
15185
|
interleaveFrames: overlap !== null,
|
|
15061
15186
|
openAttempt
|
|
15062
15187
|
}),
|
|
15063
|
-
{ stall: frameStallRule(job, totalFrames) }
|
|
15188
|
+
{ stall: frameStallRule(job, totalFrames, perfStages.browserProbeMs) }
|
|
15064
15189
|
);
|
|
15065
15190
|
let captureRes;
|
|
15066
15191
|
try {
|
|
@@ -15190,7 +15315,7 @@ async function executeRenderPipeline(input) {
|
|
|
15190
15315
|
})
|
|
15191
15316
|
);
|
|
15192
15317
|
const totalElapsed = Date.now() - pipelineStart;
|
|
15193
|
-
const tmpPeakBytes =
|
|
15318
|
+
const tmpPeakBytes = existsSync20(workDir) ? sampleDirectoryBytes(workDir) : 0;
|
|
15194
15319
|
recordTransientRetryObservability();
|
|
15195
15320
|
observability.checkpoint("pipeline", "artifact validated", { totalElapsedMs: totalElapsed });
|
|
15196
15321
|
const observabilitySummary = observability.summary({
|
|
@@ -15271,7 +15396,7 @@ async function executeRenderPipeline(input) {
|
|
|
15271
15396
|
}
|
|
15272
15397
|
}
|
|
15273
15398
|
if (job.config.debug) {
|
|
15274
|
-
if (!isPngSequence && !isHls &&
|
|
15399
|
+
if (!isPngSequence && !isHls && existsSync20(stagedOutputPath)) {
|
|
15275
15400
|
const debugOutput = join29(workDir, `output${videoExt}`);
|
|
15276
15401
|
copyFileSync3(stagedOutputPath, debugOutput);
|
|
15277
15402
|
}
|
|
@@ -15772,7 +15897,7 @@ async function writeStitchedMp4(chunkPaths, outputPath, audioPath) {
|
|
|
15772
15897
|
import {
|
|
15773
15898
|
copyFileSync as copyFileSync4,
|
|
15774
15899
|
cpSync as cpSync2,
|
|
15775
|
-
existsSync as
|
|
15900
|
+
existsSync as existsSync25,
|
|
15776
15901
|
linkSync,
|
|
15777
15902
|
mkdirSync as mkdirSync14,
|
|
15778
15903
|
rmSync as rmSync12,
|
|
@@ -15784,13 +15909,13 @@ import { extname as extname6, isAbsolute as isAbsolute2, join as join38, relativ
|
|
|
15784
15909
|
import { join as join33 } from "path";
|
|
15785
15910
|
|
|
15786
15911
|
// ../producer/src/services/distributed/chunkFrames.ts
|
|
15787
|
-
import { existsSync as
|
|
15912
|
+
import { existsSync as existsSync22, readdirSync as readdirSync7 } from "fs";
|
|
15788
15913
|
import { extname as extname4, join as join32 } from "path";
|
|
15789
15914
|
|
|
15790
15915
|
// ../producer/src/services/distributed/shared.ts
|
|
15791
15916
|
import { execFile as execFileCallback } from "child_process";
|
|
15792
15917
|
import { dirname as dirname13, join as join31 } from "path";
|
|
15793
|
-
import { existsSync as
|
|
15918
|
+
import { existsSync as existsSync21, readFileSync as readFileSync8 } from "fs";
|
|
15794
15919
|
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
15795
15920
|
import { promisify as promisify2 } from "util";
|
|
15796
15921
|
var PLAN_VIDEOS_META_RELATIVE_PATH = "meta/videos.json";
|
|
@@ -15802,7 +15927,7 @@ function isPlanAudioArtifactPath(path) {
|
|
|
15802
15927
|
function resolvePlanAudioPath(planDir) {
|
|
15803
15928
|
for (const name of [PLAN_AUDIO_RELATIVE_PATH, PLAN_AUDIO_LEGACY_RELATIVE_PATH]) {
|
|
15804
15929
|
const candidate = join31(planDir, name);
|
|
15805
|
-
if (
|
|
15930
|
+
if (existsSync21(candidate)) return candidate;
|
|
15806
15931
|
}
|
|
15807
15932
|
return null;
|
|
15808
15933
|
}
|
|
@@ -16063,7 +16188,7 @@ function readProducerVersion() {
|
|
|
16063
16188
|
let current = startDir;
|
|
16064
16189
|
for (let i = 0; i < 10; i++) {
|
|
16065
16190
|
const candidate = join31(current, "package.json");
|
|
16066
|
-
if (
|
|
16191
|
+
if (existsSync21(candidate)) {
|
|
16067
16192
|
try {
|
|
16068
16193
|
const pkg = JSON.parse(readFileSync8(candidate, "utf-8"));
|
|
16069
16194
|
if (pkg.name === "@hyperframes/producer" && typeof pkg.version === "string") {
|
|
@@ -16117,8 +16242,8 @@ function frameNumberFromFileName(name) {
|
|
|
16117
16242
|
function rebuildExtractedFramesFromPlanDir(planDir, videos, indexMode = "dense-v1") {
|
|
16118
16243
|
const result = [];
|
|
16119
16244
|
for (const v of videos) {
|
|
16120
|
-
const outputDir = join32(planDir, "video-frames", v.videoId);
|
|
16121
|
-
if (!
|
|
16245
|
+
const outputDir = join32(planDir, "video-frames", mediaIdPathSegment(v.videoId));
|
|
16246
|
+
if (!existsSync22(outputDir)) {
|
|
16122
16247
|
throw new Error(
|
|
16123
16248
|
`[renderChunk] planDir missing extracted video frames for ${JSON.stringify(v.videoId)}: ${outputDir} not present. plan() should have written frames here; the planDir is malformed.`
|
|
16124
16249
|
);
|
|
@@ -16217,7 +16342,7 @@ async function extractDeferredVideoFramesForChunk(input) {
|
|
|
16217
16342
|
const range = planned.get(video.videoId).deferredRange;
|
|
16218
16343
|
const remoteUrl = remoteSources[range.sourcePath];
|
|
16219
16344
|
const sourcePath = remoteUrl ?? join32(input.planDir, ...range.sourcePath.split("/"));
|
|
16220
|
-
if (remoteUrl === void 0 && !
|
|
16345
|
+
if (remoteUrl === void 0 && !existsSync22(sourcePath)) {
|
|
16221
16346
|
throw new RenderChunkValidationError(
|
|
16222
16347
|
MISSING_PLAN_ARTIFACT,
|
|
16223
16348
|
`[renderChunk] planDir is missing the source for video ${JSON.stringify(video.videoId)}: ${range.sourcePath}`
|
|
@@ -16410,7 +16535,7 @@ async function readPlanReferenceBackground(input) {
|
|
|
16410
16535
|
}
|
|
16411
16536
|
|
|
16412
16537
|
// ../producer/src/services/render/stages/freezePlan.ts
|
|
16413
|
-
import { existsSync as
|
|
16538
|
+
import { existsSync as existsSync23, mkdirSync as mkdirSync12, readFileSync as readFileSync9, readdirSync as readdirSync8, writeFileSync as writeFileSync7 } from "fs";
|
|
16414
16539
|
import { join as join35, relative as relative3, resolve as resolve7 } from "path";
|
|
16415
16540
|
|
|
16416
16541
|
// ../producer/src/services/distributed/planProtocol.ts
|
|
@@ -16600,7 +16725,7 @@ function planFileSha256(absolutePath, digests) {
|
|
|
16600
16725
|
return sha256;
|
|
16601
16726
|
}
|
|
16602
16727
|
async function prehashPlanFiles(dir, digests) {
|
|
16603
|
-
if (!
|
|
16728
|
+
if (!existsSync23(dir)) return;
|
|
16604
16729
|
for (const { absolutePath } of listPlanFiles(dir)) {
|
|
16605
16730
|
if (!digests.has(absolutePath)) digests.set(absolutePath, await sha256FileAsync(absolutePath));
|
|
16606
16731
|
}
|
|
@@ -16670,15 +16795,15 @@ function writePlanRemoteFiles(planDir, files) {
|
|
|
16670
16795
|
}
|
|
16671
16796
|
function readPlanRemoteFiles(planDir) {
|
|
16672
16797
|
const path = join35(planDir, PLAN_REMOTE_FILES_RELATIVE_PATH);
|
|
16673
|
-
return
|
|
16798
|
+
return existsSync23(path) ? JSON.parse(readFileSync9(path, "utf-8")) : [];
|
|
16674
16799
|
}
|
|
16675
16800
|
function recomputePlanHashFromPlanDir(planDir, digests) {
|
|
16676
16801
|
const planJsonPath = join35(planDir, "plan.json");
|
|
16677
16802
|
const encoderJsonPath = join35(planDir, "meta", "encoder.json");
|
|
16678
|
-
if (!
|
|
16803
|
+
if (!existsSync23(planJsonPath)) {
|
|
16679
16804
|
throw new Error(`[freezePlan] plan.json missing: ${planJsonPath}`);
|
|
16680
16805
|
}
|
|
16681
|
-
if (!
|
|
16806
|
+
if (!existsSync23(encoderJsonPath)) {
|
|
16682
16807
|
throw new Error(`[freezePlan] meta/encoder.json missing: ${encoderJsonPath}`);
|
|
16683
16808
|
}
|
|
16684
16809
|
const planJson = JSON.parse(readFileSync9(planJsonPath, "utf-8"));
|
|
@@ -16708,11 +16833,11 @@ async function freezePlan(input) {
|
|
|
16708
16833
|
hasAudio,
|
|
16709
16834
|
digests
|
|
16710
16835
|
} = input;
|
|
16711
|
-
if (!
|
|
16836
|
+
if (!existsSync23(planDir)) {
|
|
16712
16837
|
throw new Error(`[freezePlan] planDir does not exist: ${planDir}`);
|
|
16713
16838
|
}
|
|
16714
16839
|
const metaDir = join35(planDir, "meta");
|
|
16715
|
-
if (!
|
|
16840
|
+
if (!existsSync23(metaDir)) mkdirSync12(metaDir, { recursive: true });
|
|
16716
16841
|
writeFileSync7(
|
|
16717
16842
|
join35(metaDir, "composition.json"),
|
|
16718
16843
|
`${JSON.stringify(composition, null, 2)}
|
|
@@ -16789,7 +16914,7 @@ function applyRuntimeEnvSnapshot(snapshot, env = process.env) {
|
|
|
16789
16914
|
}
|
|
16790
16915
|
|
|
16791
16916
|
// ../producer/src/services/distributed/chunkAudio.ts
|
|
16792
|
-
import { closeSync as closeSync5, existsSync as
|
|
16917
|
+
import { closeSync as closeSync5, existsSync as existsSync24, ftruncateSync, mkdirSync as mkdirSync13, openSync as openSync5, readFileSync as readFileSync10 } from "fs";
|
|
16793
16918
|
import { writeFileSync as writeFileSync8, writeSync } from "fs";
|
|
16794
16919
|
import { join as join36 } from "path";
|
|
16795
16920
|
function audioCutForChunk(grid, chunks, index, fps) {
|
|
@@ -16894,7 +17019,7 @@ async function writeChunkAudioSlices(input) {
|
|
|
16894
17019
|
}
|
|
16895
17020
|
function chunkAudioSource(planDir, chunkIndex, scratchPath) {
|
|
16896
17021
|
const layoutPath = join36(planDir, SLICE_LAYOUT);
|
|
16897
|
-
if (!
|
|
17022
|
+
if (!existsSync24(layoutPath)) return resolvePlanAudioPath(planDir);
|
|
16898
17023
|
const layout = JSON.parse(readFileSync10(layoutPath, "utf-8"));
|
|
16899
17024
|
const frame = readFileSync10(join36(planDir, SLICE_FRAME));
|
|
16900
17025
|
const fd = openSync5(scratchPath, "w");
|
|
@@ -17458,7 +17583,7 @@ function createVideoSourceShipper(input) {
|
|
|
17458
17583
|
let result = null;
|
|
17459
17584
|
for (const root of stagedRel === null ? [input.workCompiledDir, input.projectDir] : []) {
|
|
17460
17585
|
const rel = pathInside(root, srcPath);
|
|
17461
|
-
if (rel !== null && (
|
|
17586
|
+
if (rel !== null && (existsSync25(join38(input.planDir, "compiled", rel)) || input.isRemote(srcPath))) {
|
|
17462
17587
|
result = ["compiled", ...rel.split(sep3)].join("/");
|
|
17463
17588
|
break;
|
|
17464
17589
|
}
|
|
@@ -17486,7 +17611,7 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
|
|
|
17486
17611
|
useGpu: false,
|
|
17487
17612
|
browserGpuMode: "software"
|
|
17488
17613
|
});
|
|
17489
|
-
if (!
|
|
17614
|
+
if (!existsSync25(planDir)) mkdirSync14(planDir, { recursive: true });
|
|
17490
17615
|
const log = config.logger ?? defaultLogger;
|
|
17491
17616
|
const sizeLimitBytes = options.executionPlanSizeLimitBytes ?? config.planDirSizeLimitBytes ?? PLAN_DIR_SIZE_LIMIT_BYTES;
|
|
17492
17617
|
const abortSignal = config.abortSignal;
|
|
@@ -17517,7 +17642,7 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
|
|
|
17517
17642
|
});
|
|
17518
17643
|
const entryFile = config.entryFile ?? "index.html";
|
|
17519
17644
|
const htmlPath = join38(projectDir, entryFile);
|
|
17520
|
-
if (!
|
|
17645
|
+
if (!existsSync25(htmlPath)) {
|
|
17521
17646
|
throw new Error(`[plan] entry file not found: ${htmlPath}`);
|
|
17522
17647
|
}
|
|
17523
17648
|
const workDir = join38(planDir, ".plan-work");
|
|
@@ -17636,7 +17761,7 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
|
|
|
17636
17761
|
if (probeResult.fileServer) closeFileServerSafely(probeResult.fileServer, "plan", log);
|
|
17637
17762
|
if (probeResult.probeSession) {
|
|
17638
17763
|
try {
|
|
17639
|
-
const { closeCaptureSession: closeCaptureSession2 } = await import("./src-
|
|
17764
|
+
const { closeCaptureSession: closeCaptureSession2 } = await import("./src-C3XYMTF4.js");
|
|
17640
17765
|
await closeCaptureSession2(probeResult.probeSession);
|
|
17641
17766
|
} catch (err) {
|
|
17642
17767
|
log.warn("[plan] probe session close failed", {
|
|
@@ -17745,15 +17870,15 @@ async function buildLocalExecutionPlan(projectDir, config, executionPlanDir, opt
|
|
|
17745
17870
|
logPlanStage(log, "extract", stageStarted);
|
|
17746
17871
|
const stagedVideoFrames = join38(compiledDir, "__hyperframes_video_frames");
|
|
17747
17872
|
const videoFramesDst = join38(planDir, "video-frames");
|
|
17748
|
-
if (
|
|
17873
|
+
if (existsSync25(videoFramesDst)) rmSync12(videoFramesDst, { recursive: true, force: true });
|
|
17749
17874
|
const videoSourcesDir = join38(planDir, "video-sources");
|
|
17750
17875
|
rmSync12(videoSourcesDir, { recursive: true, force: true });
|
|
17751
|
-
if (
|
|
17876
|
+
if (existsSync25(stagedVideoFrames)) {
|
|
17752
17877
|
renameWithRetry(stagedVideoFrames, videoFramesDst);
|
|
17753
17878
|
} else {
|
|
17754
17879
|
mkdirSync14(videoFramesDst, { recursive: true });
|
|
17755
17880
|
}
|
|
17756
|
-
if (
|
|
17881
|
+
if (existsSync25(finalCompiledDir)) rmSync12(finalCompiledDir, { recursive: true, force: true });
|
|
17757
17882
|
renameWithRetry(compiledDir, finalCompiledDir);
|
|
17758
17883
|
const shipVideoSource = createVideoSourceShipper({
|
|
17759
17884
|
planDir,
|
|
@@ -17874,10 +17999,10 @@ async function buildLocalExecutionPlan(projectDir, config, executionPlanDir, opt
|
|
|
17874
17999
|
applyDistributedAudioWarningPolicy(job, audioResult.audioError, audioResult.audioFailures, log);
|
|
17875
18000
|
}
|
|
17876
18001
|
const planAudioPath = join38(planDir, PLAN_AUDIO_RELATIVE_PATH);
|
|
17877
|
-
if (audioResult?.hasAudio &&
|
|
18002
|
+
if (audioResult?.hasAudio && existsSync25(audioResult.audioOutputPath)) {
|
|
17878
18003
|
renameWithRetry(audioResult.audioOutputPath, planAudioPath);
|
|
17879
18004
|
}
|
|
17880
|
-
if (chunksCarryAudio &&
|
|
18005
|
+
if (chunksCarryAudio && existsSync25(planAudioPath)) {
|
|
17881
18006
|
if (options.sliceChunkAudio) {
|
|
17882
18007
|
stageStarted = Date.now();
|
|
17883
18008
|
await writeChunkAudioSlices({
|
|
@@ -17995,14 +18120,14 @@ async function plan(projectDir, config, planDir, options = {}) {
|
|
|
17995
18120
|
|
|
17996
18121
|
// ../producer/src/services/distributed/renderChunk.ts
|
|
17997
18122
|
import { randomBytes } from "crypto";
|
|
17998
|
-
import { existsSync as
|
|
18123
|
+
import { existsSync as existsSync28, mkdirSync as mkdirSync17, readFileSync as readFileSync12, readdirSync as readdirSync11, rmSync as rmSync15, writeFileSync as writeFileSync12 } from "fs";
|
|
17999
18124
|
import { cpus as cpus3 } from "os";
|
|
18000
18125
|
import { join as join42 } from "path";
|
|
18001
18126
|
|
|
18002
18127
|
// ../producer/src/services/distributed/planV2.ts
|
|
18003
18128
|
import {
|
|
18004
18129
|
copyFileSync as copyFileSync6,
|
|
18005
|
-
existsSync as
|
|
18130
|
+
existsSync as existsSync27,
|
|
18006
18131
|
lstatSync as lstatSync3,
|
|
18007
18132
|
mkdirSync as mkdirSync16,
|
|
18008
18133
|
readFileSync as readFileSync11,
|
|
@@ -18017,7 +18142,7 @@ import { dirname as dirname15, isAbsolute as isAbsolute3, join as join41, relati
|
|
|
18017
18142
|
// ../producer/src/services/distributed/planV2Publisher.ts
|
|
18018
18143
|
import {
|
|
18019
18144
|
copyFileSync as copyFileSync5,
|
|
18020
|
-
existsSync as
|
|
18145
|
+
existsSync as existsSync26,
|
|
18021
18146
|
linkSync as linkSync2,
|
|
18022
18147
|
mkdirSync as mkdirSync15,
|
|
18023
18148
|
rmSync as rmSync13,
|
|
@@ -18084,7 +18209,7 @@ var LocalPlanV2ArtifactPublisher = class {
|
|
|
18084
18209
|
#linkFile;
|
|
18085
18210
|
#committed = false;
|
|
18086
18211
|
constructor(destinationDir, options = {}) {
|
|
18087
|
-
if (
|
|
18212
|
+
if (existsSync26(destinationDir)) {
|
|
18088
18213
|
throw new PlanV2IntegrityError(`output directory already exists: ${destinationDir}`);
|
|
18089
18214
|
}
|
|
18090
18215
|
this.destinationDir = destinationDir;
|
|
@@ -18101,7 +18226,7 @@ var LocalPlanV2ArtifactPublisher = class {
|
|
|
18101
18226
|
);
|
|
18102
18227
|
}
|
|
18103
18228
|
const destinationPath = planV2BlobPath(this.temporaryDir, digest);
|
|
18104
|
-
if (
|
|
18229
|
+
if (existsSync26(destinationPath)) return;
|
|
18105
18230
|
mkdirSync15(dirname14(destinationPath), { recursive: true });
|
|
18106
18231
|
const stagingDir = createStagingDir(dirname14(destinationPath), ".plan-v2-blob-");
|
|
18107
18232
|
const temporaryPath = join40(stagingDir, "blob");
|
|
@@ -18119,7 +18244,7 @@ var LocalPlanV2ArtifactPublisher = class {
|
|
|
18119
18244
|
}
|
|
18120
18245
|
async commitManifest(manifestBytes) {
|
|
18121
18246
|
for (const digest of new Set(manifestDigests(manifestBytes))) {
|
|
18122
|
-
if (!
|
|
18247
|
+
if (!existsSync26(planV2BlobPath(this.temporaryDir, digest))) {
|
|
18123
18248
|
throw new PlanV2IntegrityError(
|
|
18124
18249
|
`cannot commit manifest before referenced blob is durable: ${digest}`
|
|
18125
18250
|
);
|
|
@@ -18198,7 +18323,7 @@ function assertValidExtractionCacheCompleteSentinel(path) {
|
|
|
18198
18323
|
}
|
|
18199
18324
|
function validateExtractionCacheCompleteSentinels(executionPlanDir) {
|
|
18200
18325
|
const videoRoot = join41(executionPlanDir, "video-frames");
|
|
18201
|
-
if (!
|
|
18326
|
+
if (!existsSync27(videoRoot)) return;
|
|
18202
18327
|
for (const videoEntry of readdirSync10(videoRoot, { withFileTypes: true })) {
|
|
18203
18328
|
if (!videoEntry.isDirectory()) continue;
|
|
18204
18329
|
const videoDir = join41(videoRoot, videoEntry.name);
|
|
@@ -18214,7 +18339,7 @@ function isExtractionCacheCompleteSentinelPath(path) {
|
|
|
18214
18339
|
}
|
|
18215
18340
|
function resolveExtractedVideoOutputDir(planDir, videoId) {
|
|
18216
18341
|
const videoRoot = resolve8(planDir, "video-frames");
|
|
18217
|
-
const outputDir = resolve8(videoRoot, videoId);
|
|
18342
|
+
const outputDir = resolve8(videoRoot, mediaIdPathSegment(videoId));
|
|
18218
18343
|
if (outputDir === videoRoot || !outputDir.startsWith(`${videoRoot}${sep4}`)) {
|
|
18219
18344
|
throw new PlanV2IntegrityError(`unsafe extracted video id: ${JSON.stringify(videoId)}`);
|
|
18220
18345
|
}
|
|
@@ -18299,7 +18424,7 @@ function parsePlanVideosJson2(value) {
|
|
|
18299
18424
|
}
|
|
18300
18425
|
function materializeExtractedVideoDirectories(planDir) {
|
|
18301
18426
|
const videosPath = join41(planDir, PLAN_VIDEOS_META_RELATIVE_PATH);
|
|
18302
|
-
if (!
|
|
18427
|
+
if (!existsSync27(videosPath)) return;
|
|
18303
18428
|
const videos = parsePlanVideosJson2(readJsonFile(videosPath, PLAN_VIDEOS_META_RELATIVE_PATH));
|
|
18304
18429
|
for (const video of videos.extracted) {
|
|
18305
18430
|
mkdirSync16(resolveExtractedVideoOutputDir(planDir, video.videoId), { recursive: true });
|
|
@@ -18333,9 +18458,9 @@ function parseChunkSlices(value) {
|
|
|
18333
18458
|
}
|
|
18334
18459
|
function buildVideoChunkDependencies(executionPlanDir, dimensions) {
|
|
18335
18460
|
const videoRoot = join41(executionPlanDir, "video-frames");
|
|
18336
|
-
const hasExtractedFrames =
|
|
18461
|
+
const hasExtractedFrames = existsSync27(videoRoot) && listFiles(videoRoot).length > 0;
|
|
18337
18462
|
const videosPath = join41(executionPlanDir, PLAN_VIDEOS_META_RELATIVE_PATH);
|
|
18338
|
-
if (!
|
|
18463
|
+
if (!existsSync27(videosPath)) {
|
|
18339
18464
|
return hasExtractedFrames ? { mode: "full-source-pack", dependencies: null } : { mode: "exact-rendered-frames", dependencies: /* @__PURE__ */ new Map() };
|
|
18340
18465
|
}
|
|
18341
18466
|
const chunksPath = join41(executionPlanDir, "meta", "chunks.json");
|
|
@@ -18392,7 +18517,7 @@ function computeManifestHash(manifest) {
|
|
|
18392
18517
|
return sha256Hex(`${PLAN_V2_HASH_PREFIX}${canonicalJsonStringify(manifestPayload(manifest))}`);
|
|
18393
18518
|
}
|
|
18394
18519
|
function writeBlob(sourcePath, destinationPath) {
|
|
18395
|
-
if (
|
|
18520
|
+
if (existsSync27(destinationPath)) return;
|
|
18396
18521
|
mkdirSync16(dirname15(destinationPath), { recursive: true });
|
|
18397
18522
|
const temporaryDir = createStagingDir(dirname15(destinationPath), ".plan-v2-blob-");
|
|
18398
18523
|
const temporaryPath = join41(temporaryDir, "blob");
|
|
@@ -18432,7 +18557,7 @@ async function putTasks(tasks) {
|
|
|
18432
18557
|
}
|
|
18433
18558
|
function buildPlanV2Publication(executionPlanDir, digests) {
|
|
18434
18559
|
const executionPlanPath = join41(executionPlanDir, "plan.json");
|
|
18435
|
-
if (!
|
|
18560
|
+
if (!existsSync27(executionPlanPath)) {
|
|
18436
18561
|
throw new PlanV2IntegrityError(`execution plan is missing plan.json: ${executionPlanPath}`);
|
|
18437
18562
|
}
|
|
18438
18563
|
const executionPlanValue = readJsonFile(executionPlanPath, "execution plan.json");
|
|
@@ -18512,7 +18637,7 @@ function buildPlanV2Publication(executionPlanDir, digests) {
|
|
|
18512
18637
|
};
|
|
18513
18638
|
}
|
|
18514
18639
|
function createPlanV2FromExecutionPlan(executionPlanDir, planV2Dir) {
|
|
18515
|
-
if (
|
|
18640
|
+
if (existsSync27(planV2Dir)) {
|
|
18516
18641
|
throw new PlanV2IntegrityError(`output directory already exists: ${planV2Dir}`);
|
|
18517
18642
|
}
|
|
18518
18643
|
const publication = buildPlanV2Publication(executionPlanDir);
|
|
@@ -18598,7 +18723,7 @@ async function planV2WithPublisher(projectDir, config, publisher, options = {})
|
|
|
18598
18723
|
}
|
|
18599
18724
|
}
|
|
18600
18725
|
async function planV2(projectDir, config, planV2Dir) {
|
|
18601
|
-
if (
|
|
18726
|
+
if (existsSync27(planV2Dir)) {
|
|
18602
18727
|
throw new PlanV2IntegrityError(`output directory already exists: ${planV2Dir}`);
|
|
18603
18728
|
}
|
|
18604
18729
|
const publisher = new LocalPlanV2ArtifactPublisher(planV2Dir);
|
|
@@ -18752,7 +18877,7 @@ function parsePlanV2Manifest(value) {
|
|
|
18752
18877
|
}
|
|
18753
18878
|
function readPlanV2Manifest(planV2Dir) {
|
|
18754
18879
|
const manifestPath = join41(planV2Dir, "plan.json");
|
|
18755
|
-
if (!
|
|
18880
|
+
if (!existsSync27(manifestPath)) {
|
|
18756
18881
|
throw new PlanV2IntegrityError(`missing v2 manifest: ${manifestPath}`);
|
|
18757
18882
|
}
|
|
18758
18883
|
const value = readJsonFile(manifestPath, "v2 manifest");
|
|
@@ -18771,7 +18896,7 @@ function listPlanV2ArtifactsForTarget(manifest, target) {
|
|
|
18771
18896
|
}
|
|
18772
18897
|
function verifyBlob(planV2Dir, artifact) {
|
|
18773
18898
|
const sourcePath = planV2BlobPath(planV2Dir, artifact.sha256);
|
|
18774
|
-
if (!
|
|
18899
|
+
if (!existsSync27(sourcePath)) {
|
|
18775
18900
|
throw new PlanV2IntegrityError(`missing content-addressed artifact ${artifact.sha256}`);
|
|
18776
18901
|
}
|
|
18777
18902
|
const stats = statSync9(sourcePath);
|
|
@@ -18784,7 +18909,7 @@ function verifyBlob(planV2Dir, artifact) {
|
|
|
18784
18909
|
return sourcePath;
|
|
18785
18910
|
}
|
|
18786
18911
|
function materializePlanV2Target(planV2Dir, target, destinationDir, options = {}) {
|
|
18787
|
-
if (
|
|
18912
|
+
if (existsSync27(destinationDir)) {
|
|
18788
18913
|
throw new PlanV2IntegrityError(`materialization destination already exists: ${destinationDir}`);
|
|
18789
18914
|
}
|
|
18790
18915
|
const manifest = readPlanV2Manifest(planV2Dir);
|
|
@@ -18849,7 +18974,7 @@ function validatePlanV2MaterializedTarget(planDir, expectedTarget) {
|
|
|
18849
18974
|
}
|
|
18850
18975
|
function readValidatedPlanV2Materialization(planDir, expectedTarget) {
|
|
18851
18976
|
const markerPath = join41(planDir, PLAN_V2_MATERIALIZATION_MARKER);
|
|
18852
|
-
if (!
|
|
18977
|
+
if (!existsSync27(markerPath)) return null;
|
|
18853
18978
|
const marker = readJsonFile(markerPath, "materialization marker");
|
|
18854
18979
|
if (!isRecord3(marker) || !isRecord3(marker.manifest) || !isRecord3(marker.target)) {
|
|
18855
18980
|
throw new PlanV2IntegrityError("malformed materialization marker");
|
|
@@ -18867,7 +18992,7 @@ function readValidatedPlanV2Materialization(planDir, expectedTarget) {
|
|
|
18867
18992
|
for (const artifact of required) {
|
|
18868
18993
|
if (Object.hasOwn(remoteSources, artifact.path)) continue;
|
|
18869
18994
|
const path = join41(planDir, ...artifact.path.split("/"));
|
|
18870
|
-
if (!
|
|
18995
|
+
if (!existsSync27(path) || statSync9(path).size !== artifact.sizeBytes) {
|
|
18871
18996
|
throw new PlanV2IntegrityError(
|
|
18872
18997
|
`materialized artifact missing or truncated: ${artifact.path}`
|
|
18873
18998
|
);
|
|
@@ -19017,7 +19142,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
|
|
|
19017
19142
|
const planJsonPath = join42(planDir, "plan.json");
|
|
19018
19143
|
const encoderJsonPath = join42(planDir, "meta", "encoder.json");
|
|
19019
19144
|
const chunksJsonPath = join42(planDir, "meta", "chunks.json");
|
|
19020
|
-
if (!
|
|
19145
|
+
if (!existsSync28(planJsonPath)) {
|
|
19021
19146
|
throw new RenderChunkValidationError(
|
|
19022
19147
|
MISSING_PLAN_ARTIFACT,
|
|
19023
19148
|
`[renderChunk] planDir is missing required artifact: ${planJsonPath}`
|
|
@@ -19033,7 +19158,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
|
|
|
19033
19158
|
const v2Manifest = v2Materialization?.manifest ?? null;
|
|
19034
19159
|
const remoteSources = v2Materialization?.remoteSources ?? {};
|
|
19035
19160
|
for (const required of [encoderJsonPath, chunksJsonPath]) {
|
|
19036
|
-
if (!
|
|
19161
|
+
if (!existsSync28(required)) {
|
|
19037
19162
|
throw new RenderChunkValidationError(
|
|
19038
19163
|
MISSING_PLAN_ARTIFACT,
|
|
19039
19164
|
`[renderChunk] planDir is missing required artifact: ${required}`
|
|
@@ -19044,7 +19169,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
|
|
|
19044
19169
|
const chunks = JSON.parse(readFileSync12(chunksJsonPath, "utf-8"));
|
|
19045
19170
|
const videosJsonPath = join42(planDir, PLAN_VIDEOS_META_RELATIVE_PATH);
|
|
19046
19171
|
let planVideos = null;
|
|
19047
|
-
if (
|
|
19172
|
+
if (existsSync28(videosJsonPath)) {
|
|
19048
19173
|
try {
|
|
19049
19174
|
planVideos = validatePlanVideosForChunk(JSON.parse(readFileSync12(videosJsonPath, "utf-8")));
|
|
19050
19175
|
} catch (err) {
|
|
@@ -19075,7 +19200,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
|
|
|
19075
19200
|
const range = resolveChunkFrameRange(slice, chunkIndex, options?.frameRange);
|
|
19076
19201
|
const framesInChunk = range.endFrame - range.startFrame;
|
|
19077
19202
|
const compiledDir = join42(planDir, "compiled");
|
|
19078
|
-
if (!
|
|
19203
|
+
if (!existsSync28(compiledDir)) {
|
|
19079
19204
|
throw new RenderChunkValidationError(
|
|
19080
19205
|
MISSING_PLAN_ARTIFACT,
|
|
19081
19206
|
`[renderChunk] planDir missing compiled/ directory: ${compiledDir}`
|
|
@@ -19167,6 +19292,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
|
|
|
19167
19292
|
deferredVideos.filter((video) => remoteVideoIds.has(video.videoId))
|
|
19168
19293
|
)
|
|
19169
19294
|
});
|
|
19295
|
+
captureOptions.onStaticDedupActivity = () => noteStaticDedupActivity(job);
|
|
19170
19296
|
const captureFrames = effectiveChunkFrames(framesInChunk, slice.captureCost);
|
|
19171
19297
|
const chunkWorkerCount = resolveChunkCaptureWorkers(
|
|
19172
19298
|
captureFrames,
|
|
@@ -19326,10 +19452,10 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
|
|
|
19326
19452
|
const effectiveBitrate = encoder.crf != null ? void 0 : encoder.bitrate;
|
|
19327
19453
|
const videoOnlyPath = encoder.chunksCarryAudio ? `${outputChunkPath}.video.mp4` : outputChunkPath;
|
|
19328
19454
|
if (isPngSequence) {
|
|
19329
|
-
if (!
|
|
19455
|
+
if (!existsSync28(outputChunkPath)) mkdirSync17(outputChunkPath, { recursive: true });
|
|
19330
19456
|
} else {
|
|
19331
19457
|
const outDir = join42(outputChunkPath, "..");
|
|
19332
|
-
if (!
|
|
19458
|
+
if (!existsSync28(outDir)) mkdirSync17(outDir, { recursive: true });
|
|
19333
19459
|
}
|
|
19334
19460
|
const encodeInput = {
|
|
19335
19461
|
job,
|
|
@@ -19436,7 +19562,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
|
|
|
19436
19562
|
openAttempt,
|
|
19437
19563
|
verifyFirstSession: forceScreenshot || !verifyInWorker ? void 0 : verifyFirstWorker
|
|
19438
19564
|
}),
|
|
19439
|
-
{ stall: frameStallRule(job, framesInChunk) }
|
|
19565
|
+
{ stall: frameStallRule(job, framesInChunk, void 0) }
|
|
19440
19566
|
).catch(async (captureError) => {
|
|
19441
19567
|
await overlap.current?.abort();
|
|
19442
19568
|
overlap.current = null;
|
|
@@ -19850,6 +19976,13 @@ function validateDistributedRenderConfig(config) {
|
|
|
19850
19976
|
`distributed mode supports only ${ALLOWED_HDR_MODES.join(", ")}; got ${String(config.hdrMode)}`
|
|
19851
19977
|
);
|
|
19852
19978
|
}
|
|
19979
|
+
const chromaSubsampling = config.chromaSubsampling;
|
|
19980
|
+
if (chromaSubsampling !== void 0 && chromaSubsampling !== "420") {
|
|
19981
|
+
throw new InvalidConfigError(
|
|
19982
|
+
"config.chromaSubsampling",
|
|
19983
|
+
`distributed mode encodes 4:2:0 only; got ${String(chromaSubsampling)}`
|
|
19984
|
+
);
|
|
19985
|
+
}
|
|
19853
19986
|
if (config.variables !== void 0) {
|
|
19854
19987
|
validateVariablesPayload(config.variables);
|
|
19855
19988
|
}
|
|
@@ -20033,6 +20166,7 @@ function assertRequestOptionScalars(options) {
|
|
|
20033
20166
|
assertOptionalEnum(options, "proresProfile", PRORES_PROFILE_NAMES);
|
|
20034
20167
|
assertOptionalEnum(options, "strictness", ["strict", "best-effort"]);
|
|
20035
20168
|
assertOptionalEnum(options, "hdrMode", ["auto", "force-hdr", "force-sdr"]);
|
|
20169
|
+
assertOptionalEnum(options, "chromaSubsampling", ["420", "444"]);
|
|
20036
20170
|
assertOptionalEnum(options, "pageMotionBlur", ["off"]);
|
|
20037
20171
|
if (options.videoFrameFormat !== void 0 && !isVideoFrameFormat(options.videoFrameFormat)) {
|
|
20038
20172
|
throw new Error("Render request videoFrameFormat is invalid");
|
|
@@ -20121,6 +20255,11 @@ function distributedConfigFromRequest(request, runtime = {}) {
|
|
|
20121
20255
|
if (options.hdrMode === "force-hdr") {
|
|
20122
20256
|
throw new Error("Distributed render does not support force-hdr");
|
|
20123
20257
|
}
|
|
20258
|
+
if (options.chromaSubsampling === "444") {
|
|
20259
|
+
throw new Error(
|
|
20260
|
+
"Distributed render does not support chromaSubsampling 444: chunk workers and the assemble encode 4:2:0"
|
|
20261
|
+
);
|
|
20262
|
+
}
|
|
20124
20263
|
return {
|
|
20125
20264
|
fps: distributedFps(options.fps),
|
|
20126
20265
|
width: distributed.width,
|
|
@@ -20206,7 +20345,7 @@ function renderRequestFromDistributedConfig(input) {
|
|
|
20206
20345
|
|
|
20207
20346
|
// ../producer/src/server.ts
|
|
20208
20347
|
import {
|
|
20209
|
-
existsSync as
|
|
20348
|
+
existsSync as existsSync31,
|
|
20210
20349
|
mkdirSync as mkdirSync19,
|
|
20211
20350
|
statSync as statSync11,
|
|
20212
20351
|
mkdtempSync as mkdtempSync2,
|
|
@@ -20224,7 +20363,7 @@ import { serve as serve2 } from "@hono/node-server";
|
|
|
20224
20363
|
|
|
20225
20364
|
// ../producer/src/services/hyperframeLint.ts
|
|
20226
20365
|
import {
|
|
20227
|
-
existsSync as
|
|
20366
|
+
existsSync as existsSync29,
|
|
20228
20367
|
readFileSync as readFileSync14,
|
|
20229
20368
|
statSync as statSync10,
|
|
20230
20369
|
openSync as openSync6,
|
|
@@ -20277,7 +20416,7 @@ function readEntryHtml(filePath) {
|
|
|
20277
20416
|
}
|
|
20278
20417
|
function readProjectEntryFile(projectDir, preferredEntryFile) {
|
|
20279
20418
|
const absProjectDir = resolve9(projectDir);
|
|
20280
|
-
if (!
|
|
20419
|
+
if (!existsSync29(absProjectDir) || !statSync10(absProjectDir).isDirectory()) {
|
|
20281
20420
|
return { error: `Project directory not found: ${absProjectDir}` };
|
|
20282
20421
|
}
|
|
20283
20422
|
const entryCandidates = [preferredEntryFile, "index.html", "src/index.html"].filter(
|
|
@@ -20346,7 +20485,7 @@ async function runHyperframeLint(prepared) {
|
|
|
20346
20485
|
import { Worker as Worker2 } from "worker_threads";
|
|
20347
20486
|
import { fileURLToPath as fileURLToPath6 } from "url";
|
|
20348
20487
|
import { dirname as dirname16, join as join45 } from "path";
|
|
20349
|
-
import { existsSync as
|
|
20488
|
+
import { existsSync as existsSync30 } from "fs";
|
|
20350
20489
|
var DEFAULT_HEALTH_PORT = 9848;
|
|
20351
20490
|
async function startHealthWorker(options = {}) {
|
|
20352
20491
|
const log = options.logger ?? defaultLogger2();
|
|
@@ -20423,7 +20562,7 @@ function resolveWorkerEntry2() {
|
|
|
20423
20562
|
const here = dirname16(fileURLToPath6(import.meta.url));
|
|
20424
20563
|
const candidates = [join45(here, "healthWorkerThread.js"), join45(here, "healthWorkerThread.ts")];
|
|
20425
20564
|
for (const candidate of candidates) {
|
|
20426
|
-
if (
|
|
20565
|
+
if (existsSync30(candidate)) return candidate;
|
|
20427
20566
|
}
|
|
20428
20567
|
return void 0;
|
|
20429
20568
|
}
|
|
@@ -20493,7 +20632,15 @@ function parseRenderOptions(body) {
|
|
|
20493
20632
|
const format = parseServerFormat(body.format);
|
|
20494
20633
|
const outputDynamicRange = parseServerOutputDynamicRange(body.outputDynamicRange) ?? fromRenderHdrMode(parseLegacyServerHdrMode(body.hdrMode));
|
|
20495
20634
|
const encoder = parseEncoderOptions(body, format ?? "mp4");
|
|
20496
|
-
const {
|
|
20635
|
+
const {
|
|
20636
|
+
crf,
|
|
20637
|
+
videoBitrate,
|
|
20638
|
+
videoFrameFormat,
|
|
20639
|
+
keyframeIntervalSeconds,
|
|
20640
|
+
maxBitrate,
|
|
20641
|
+
bufferSize,
|
|
20642
|
+
chromaSubsampling
|
|
20643
|
+
} = encoder.ok ? encoder.options : {};
|
|
20497
20644
|
const { variables, outputResolution, outputResolutionAspectAgnostic } = parseRenderOverrides(body);
|
|
20498
20645
|
return {
|
|
20499
20646
|
outputPath,
|
|
@@ -20506,6 +20653,7 @@ function parseRenderOptions(body) {
|
|
|
20506
20653
|
keyframeIntervalSeconds,
|
|
20507
20654
|
maxBitrate,
|
|
20508
20655
|
bufferSize,
|
|
20656
|
+
chromaSubsampling,
|
|
20509
20657
|
useGpu,
|
|
20510
20658
|
debug,
|
|
20511
20659
|
forceScreenshot,
|
|
@@ -20545,6 +20693,7 @@ function buildRenderJobConfig(input, outputPath, log) {
|
|
|
20545
20693
|
keyframeIntervalSeconds: input.keyframeIntervalSeconds,
|
|
20546
20694
|
maxBitrate: input.maxBitrate,
|
|
20547
20695
|
bufferSize: input.bufferSize,
|
|
20696
|
+
chromaSubsampling: input.chromaSubsampling,
|
|
20548
20697
|
useGpu: input.useGpu,
|
|
20549
20698
|
debug: input.debug,
|
|
20550
20699
|
strictness: input.strictness,
|
|
@@ -20563,15 +20712,28 @@ function resolvePreparedRenderOutput(prepared, rendersDir, log) {
|
|
|
20563
20712
|
const { input, cleanupProjectDir } = prepared;
|
|
20564
20713
|
const absoluteOutputPath = resolveOutputPath(input.projectDir, input.outputPath, rendersDir, log);
|
|
20565
20714
|
const outputDir = dirname17(absoluteOutputPath);
|
|
20566
|
-
if (!
|
|
20715
|
+
if (!existsSync31(outputDir)) mkdirSync19(outputDir, { recursive: true });
|
|
20567
20716
|
return { input, cleanupProjectDir, absoluteOutputPath };
|
|
20568
20717
|
}
|
|
20718
|
+
function prepareRenderJob(prepared, rendersDir, log) {
|
|
20719
|
+
try {
|
|
20720
|
+
const output = resolvePreparedRenderOutput(prepared, rendersDir, log);
|
|
20721
|
+
const job = createRenderJob(buildRenderJobConfig(output.input, output.absoluteOutputPath, log));
|
|
20722
|
+
return { ...output, job };
|
|
20723
|
+
} catch (error) {
|
|
20724
|
+
cleanupTempDir(prepared.cleanupProjectDir, log);
|
|
20725
|
+
return { error: error instanceof Error ? error.message : String(error) };
|
|
20726
|
+
}
|
|
20727
|
+
}
|
|
20569
20728
|
function validateRenderOverrides(body) {
|
|
20570
20729
|
const encoder = parseEncoderOptions(body, parseServerFormat(body.format) ?? "mp4");
|
|
20571
20730
|
if (!encoder.ok) return encoder.error;
|
|
20572
20731
|
if (body.maxRenderMs !== void 0 && (typeof body.maxRenderMs !== "number" || !Number.isInteger(body.maxRenderMs) || body.maxRenderMs < 0)) {
|
|
20573
20732
|
return "maxRenderMs must be a non-negative integer number of milliseconds";
|
|
20574
20733
|
}
|
|
20734
|
+
if (typeof body.workers === "number" && (!Number.isInteger(body.workers) || body.workers < 1)) {
|
|
20735
|
+
return "workers must be a positive integer";
|
|
20736
|
+
}
|
|
20575
20737
|
if (body.variables !== void 0 && !isPlainObject2(body.variables)) {
|
|
20576
20738
|
return 'variables must be a JSON object keyed by variable id (e.g. {"title":"Hello"})';
|
|
20577
20739
|
}
|
|
@@ -20586,6 +20748,9 @@ function validateRenderOverrides(body) {
|
|
|
20586
20748
|
if (outputDynamicRange !== void 0 && legacyHdrMode !== void 0 && outputDynamicRange !== fromRenderHdrMode(legacyHdrMode)) {
|
|
20587
20749
|
return "outputDynamicRange and legacy hdrMode must describe the same output policy";
|
|
20588
20750
|
}
|
|
20751
|
+
if (body.chromaSubsampling === "444" && outputDynamicRange === "hdr") {
|
|
20752
|
+
return 'chromaSubsampling "444" is SDR only, not outputDynamicRange "hdr"';
|
|
20753
|
+
}
|
|
20589
20754
|
return validateOutputResolutionOverride(body);
|
|
20590
20755
|
}
|
|
20591
20756
|
function validateOutputResolutionOverride(body) {
|
|
@@ -20604,11 +20769,11 @@ function prepareProjectDirectory(projectDir, options) {
|
|
|
20604
20769
|
const candidate = nonEmptyString(projectDir);
|
|
20605
20770
|
if (!candidate) return null;
|
|
20606
20771
|
const absProjectDir = resolve10(candidate);
|
|
20607
|
-
if (!
|
|
20772
|
+
if (!existsSync31(absProjectDir) || !statSync11(absProjectDir).isDirectory()) {
|
|
20608
20773
|
return { error: `Project directory not found: ${absProjectDir}` };
|
|
20609
20774
|
}
|
|
20610
20775
|
const entry = options.entryFile || "index.html";
|
|
20611
|
-
if (!
|
|
20776
|
+
if (!existsSync31(resolve10(absProjectDir, entry))) {
|
|
20612
20777
|
return { error: `Entry file "${entry}" not found in project directory: ${absProjectDir}` };
|
|
20613
20778
|
}
|
|
20614
20779
|
return { prepared: { input: { projectDir: absProjectDir, ...options } } };
|
|
@@ -20700,7 +20865,7 @@ function cleanupTempDir(dir, log) {
|
|
|
20700
20865
|
}
|
|
20701
20866
|
}
|
|
20702
20867
|
function outputFileSize(path) {
|
|
20703
|
-
return
|
|
20868
|
+
return existsSync31(path) ? statSync11(path).size : 0;
|
|
20704
20869
|
}
|
|
20705
20870
|
function createBlockingProgressReporter(log, requestId) {
|
|
20706
20871
|
let lastLoggedPct = -10;
|
|
@@ -20849,11 +21014,11 @@ function createRenderHandlers(options = {}) {
|
|
|
20849
21014
|
if ("error" in preparedResult) {
|
|
20850
21015
|
return c.json({ success: false, requestId, error: preparedResult.error }, 400);
|
|
20851
21016
|
}
|
|
20852
|
-
const
|
|
20853
|
-
|
|
20854
|
-
|
|
20855
|
-
|
|
20856
|
-
|
|
21017
|
+
const preparedJob = prepareRenderJob(preparedResult.prepared, rendersDir, log);
|
|
21018
|
+
if ("error" in preparedJob) {
|
|
21019
|
+
return c.json({ success: false, requestId, error: preparedJob.error }, 400);
|
|
21020
|
+
}
|
|
21021
|
+
const { job, input, cleanupProjectDir, absoluteOutputPath } = preparedJob;
|
|
20857
21022
|
const release = await renderSemaphore.acquire();
|
|
20858
21023
|
log.info("render started", {
|
|
20859
21024
|
requestId,
|
|
@@ -20861,7 +21026,6 @@ function createRenderHandlers(options = {}) {
|
|
|
20861
21026
|
fps: input.fps,
|
|
20862
21027
|
quality: input.quality
|
|
20863
21028
|
});
|
|
20864
|
-
const job = createRenderJob(buildRenderJobConfig(input, absoluteOutputPath, log));
|
|
20865
21029
|
try {
|
|
20866
21030
|
await executeRenderJob(
|
|
20867
21031
|
job,
|
|
@@ -20929,13 +21093,20 @@ function createRenderHandlers(options = {}) {
|
|
|
20929
21093
|
const t0 = Date.now();
|
|
20930
21094
|
const prepared = await prepareSseRenderRequest(c, stream, requestId);
|
|
20931
21095
|
if (!prepared) return;
|
|
20932
|
-
const
|
|
20933
|
-
|
|
20934
|
-
|
|
20935
|
-
|
|
20936
|
-
|
|
21096
|
+
const preparedJob = prepareRenderJob(prepared, rendersDir, log);
|
|
21097
|
+
if ("error" in preparedJob) {
|
|
21098
|
+
await stream.writeSSE({
|
|
21099
|
+
data: JSON.stringify({
|
|
21100
|
+
type: "error",
|
|
21101
|
+
requestId,
|
|
21102
|
+
error: preparedJob.error,
|
|
21103
|
+
stage: "validation"
|
|
21104
|
+
})
|
|
21105
|
+
});
|
|
21106
|
+
return;
|
|
21107
|
+
}
|
|
21108
|
+
const { job, input, cleanupProjectDir, absoluteOutputPath } = preparedJob;
|
|
20937
21109
|
log.info("render-stream started", { requestId, projectDir: input.projectDir });
|
|
20938
|
-
const job = createRenderJob(buildRenderJobConfig(input, absoluteOutputPath, log));
|
|
20939
21110
|
const abortController = new AbortController();
|
|
20940
21111
|
const onRequestAbort = () => abortController.abort(new RenderCancelledError("request_aborted"));
|
|
20941
21112
|
c.req.raw.signal.addEventListener("abort", onRequestAbort, { once: true });
|
|
@@ -20979,7 +21150,8 @@ function createRenderHandlers(options = {}) {
|
|
|
20979
21150
|
videoDurationSeconds: job.duration ?? null,
|
|
20980
21151
|
outcome: job.outcome ?? "completed",
|
|
20981
21152
|
warnings: job.warnings,
|
|
20982
|
-
perf: job.perfSummary ?? null
|
|
21153
|
+
perf: job.perfSummary ?? null,
|
|
21154
|
+
producerVersion: readProducerVersion()
|
|
20983
21155
|
})
|
|
20984
21156
|
});
|
|
20985
21157
|
} catch (error) {
|
|
@@ -21004,7 +21176,7 @@ function createRenderHandlers(options = {}) {
|
|
|
21004
21176
|
if (!artifact) {
|
|
21005
21177
|
return c.json({ success: false, error: "Output artifact not found or expired" }, 404);
|
|
21006
21178
|
}
|
|
21007
|
-
if (!
|
|
21179
|
+
if (!existsSync31(artifact.path)) {
|
|
21008
21180
|
store.delete(token);
|
|
21009
21181
|
return c.json({ success: false, error: "Output artifact file missing" }, 404);
|
|
21010
21182
|
}
|
|
@@ -21024,9 +21196,26 @@ function createRenderHandlers(options = {}) {
|
|
|
21024
21196
|
});
|
|
21025
21197
|
return { render, renderStream, lint, health, outputs, queue };
|
|
21026
21198
|
}
|
|
21199
|
+
function isCrossOriginBrowserRequest(c) {
|
|
21200
|
+
const fetchSite = c.req.header("sec-fetch-site");
|
|
21201
|
+
if (fetchSite) return fetchSite !== "same-origin" && fetchSite !== "none";
|
|
21202
|
+
const origin = c.req.header("origin");
|
|
21203
|
+
if (!origin) return false;
|
|
21204
|
+
try {
|
|
21205
|
+
return new URL(origin).host !== c.req.header("host");
|
|
21206
|
+
} catch {
|
|
21207
|
+
return true;
|
|
21208
|
+
}
|
|
21209
|
+
}
|
|
21027
21210
|
function createProducerApp(options = {}) {
|
|
21028
21211
|
const app = new Hono2();
|
|
21029
21212
|
const handlers = createRenderHandlers(options);
|
|
21213
|
+
app.post("*", async (c, next) => {
|
|
21214
|
+
if (isCrossOriginBrowserRequest(c)) {
|
|
21215
|
+
return c.json({ success: false, error: "Cross-origin requests are not allowed" }, 403);
|
|
21216
|
+
}
|
|
21217
|
+
await next();
|
|
21218
|
+
});
|
|
21030
21219
|
app.get("/health", handlers.health);
|
|
21031
21220
|
app.post("/render", handlers.render);
|
|
21032
21221
|
app.post("/render/stream", handlers.renderStream);
|
|
@@ -21051,7 +21240,7 @@ function startServer(options = {}) {
|
|
|
21051
21240
|
});
|
|
21052
21241
|
async function shutdown(signal) {
|
|
21053
21242
|
log.info(`Received ${signal}, shutting down`);
|
|
21054
|
-
const { drainBrowserPool } = await import("./src-
|
|
21243
|
+
const { drainBrowserPool } = await import("./src-C3XYMTF4.js");
|
|
21055
21244
|
await drainBrowserPool().catch(() => {
|
|
21056
21245
|
});
|
|
21057
21246
|
const handle = await Promise.race([
|
|
@@ -21094,7 +21283,7 @@ import { join as join48 } from "path";
|
|
|
21094
21283
|
// ../producer/src/services/distributed/assemble.ts
|
|
21095
21284
|
import {
|
|
21096
21285
|
cpSync as cpSync3,
|
|
21097
|
-
existsSync as
|
|
21286
|
+
existsSync as existsSync32,
|
|
21098
21287
|
mkdirSync as mkdirSync20,
|
|
21099
21288
|
readFileSync as readFileSync15,
|
|
21100
21289
|
readdirSync as readdirSync12,
|
|
@@ -21135,7 +21324,7 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
|
|
|
21135
21324
|
}
|
|
21136
21325
|
const format = plan2.dimensions.format;
|
|
21137
21326
|
const cfrEncoder = cfr ? readCfrEncoder(planDir, format) : null;
|
|
21138
|
-
if (!
|
|
21327
|
+
if (!existsSync32(dirname18(outputPath))) {
|
|
21139
21328
|
mkdirSync20(dirname18(outputPath), { recursive: true });
|
|
21140
21329
|
}
|
|
21141
21330
|
const workDir = createStagingDir(dirname18(outputPath), `${basename8(outputPath)}.assemble-work-`);
|
|
@@ -21159,7 +21348,7 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
|
|
|
21159
21348
|
try {
|
|
21160
21349
|
const videoSources = cfrEncoder ? [await reencodeCfr(ctx, chunkPaths, cfrEncoder)] : chunkPaths;
|
|
21161
21350
|
const finalPath = join47(workDir, `output.${format}`);
|
|
21162
|
-
const audio = audioPath !== null &&
|
|
21351
|
+
const audio = audioPath !== null && existsSync32(audioPath) ? audioPath : null;
|
|
21163
21352
|
await writeJoined(ctx, videoSources, audio, finalPath);
|
|
21164
21353
|
renameWithRetry(finalPath, outputPath);
|
|
21165
21354
|
log.info("[assemble] stage timings", {
|
|
@@ -21177,7 +21366,7 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
|
|
|
21177
21366
|
});
|
|
21178
21367
|
}
|
|
21179
21368
|
}
|
|
21180
|
-
const fileSize =
|
|
21369
|
+
const fileSize = existsSync32(outputPath) ? statSync12(outputPath).size : 0;
|
|
21181
21370
|
return {
|
|
21182
21371
|
...referenceBackgroundResult(plan2[REFERENCE_BACKGROUND_FIELD]),
|
|
21183
21372
|
outputPath,
|
|
@@ -21189,13 +21378,13 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
|
|
|
21189
21378
|
function readAssemblePlan(planDir, chunkPaths) {
|
|
21190
21379
|
const planJsonPath = join47(planDir, "plan.json");
|
|
21191
21380
|
const chunksJsonPath = join47(planDir, "meta", "chunks.json");
|
|
21192
|
-
if (!
|
|
21381
|
+
if (!existsSync32(planJsonPath)) {
|
|
21193
21382
|
throw new Error(`[assemble] planDir missing plan.json: ${planJsonPath}`);
|
|
21194
21383
|
}
|
|
21195
21384
|
const plan2 = JSON.parse(readFileSync15(planJsonPath, "utf-8"));
|
|
21196
21385
|
readPlanProtocolV1(plan2, DISTRIBUTED_RENDER_CAPABILITIES.roles.assembler);
|
|
21197
21386
|
validatePlanV2MaterializedTarget(planDir, { role: "assembler" });
|
|
21198
|
-
if (!
|
|
21387
|
+
if (!existsSync32(chunksJsonPath)) {
|
|
21199
21388
|
throw new Error(`[assemble] planDir missing meta/chunks.json: ${chunksJsonPath}`);
|
|
21200
21389
|
}
|
|
21201
21390
|
const chunks = JSON.parse(readFileSync15(chunksJsonPath, "utf-8"));
|
|
@@ -21210,7 +21399,7 @@ function readAssemblePlan(planDir, chunkPaths) {
|
|
|
21210
21399
|
}
|
|
21211
21400
|
}
|
|
21212
21401
|
for (const path of chunkPaths.flat()) {
|
|
21213
|
-
if (!
|
|
21402
|
+
if (!existsSync32(path)) {
|
|
21214
21403
|
throw new Error(`[assemble] chunk path does not exist: ${path}`);
|
|
21215
21404
|
}
|
|
21216
21405
|
}
|
|
@@ -21349,7 +21538,7 @@ function planFormat(planDir) {
|
|
|
21349
21538
|
}
|
|
21350
21539
|
function lockedAudio(planDir) {
|
|
21351
21540
|
const encoderJsonPath = join47(planDir, "meta", "encoder.json");
|
|
21352
|
-
if (!
|
|
21541
|
+
if (!existsSync32(encoderJsonPath)) return {};
|
|
21353
21542
|
return JSON.parse(readFileSync15(encoderJsonPath, "utf-8"));
|
|
21354
21543
|
}
|
|
21355
21544
|
function readCfrEncoder(planDir, format) {
|
|
@@ -21359,7 +21548,7 @@ function readCfrEncoder(planDir, format) {
|
|
|
21359
21548
|
);
|
|
21360
21549
|
}
|
|
21361
21550
|
const encoderJsonPath = join47(planDir, "meta", "encoder.json");
|
|
21362
|
-
if (!
|
|
21551
|
+
if (!existsSync32(encoderJsonPath)) {
|
|
21363
21552
|
throw new Error(`[assemble] planDir missing meta/encoder.json: ${encoderJsonPath}`);
|
|
21364
21553
|
}
|
|
21365
21554
|
const encoderJson = JSON.parse(readFileSync15(encoderJsonPath, "utf-8"));
|
|
@@ -21371,7 +21560,7 @@ function readCfrEncoder(planDir, format) {
|
|
|
21371
21560
|
return encoderJson;
|
|
21372
21561
|
}
|
|
21373
21562
|
function mergePngFrameDirs(chunkPaths, outputPath, totalFrames, audioPath, startTimeMs) {
|
|
21374
|
-
if (
|
|
21563
|
+
if (existsSync32(outputPath)) rmSync18(outputPath, { recursive: true, force: true });
|
|
21375
21564
|
mkdirSync20(outputPath, { recursive: true });
|
|
21376
21565
|
let globalIdx = 0;
|
|
21377
21566
|
for (const chunkDir of chunkPaths) {
|
|
@@ -21395,7 +21584,7 @@ function mergePngFrameDirs(chunkPaths, outputPath, totalFrames, audioPath, start
|
|
|
21395
21584
|
`[assemble] png-sequence frame count mismatch: merged ${globalIdx} frames vs plan.totalFrames=${totalFrames}. Using on-disk count.`
|
|
21396
21585
|
);
|
|
21397
21586
|
}
|
|
21398
|
-
if (audioPath !== null &&
|
|
21587
|
+
if (audioPath !== null && existsSync32(audioPath)) {
|
|
21399
21588
|
const sidecar = join47(outputPath, MIXED_AUDIO_FILENAME);
|
|
21400
21589
|
cpSync3(audioPath, sidecar);
|
|
21401
21590
|
}
|