hyperframes 0.9.5 → 0.9.7
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-XI5CW2YO.js → add-WLXYFHMC.js} +12 -12
- package/dist/{agentPromptGenerator-EEP7CJRK.js → agentPromptGenerator-2SMADJAL.js} +6 -6
- package/dist/{animatedGifPrep-3VKPC32B.js → animatedGifPrep-4WCFONEJ.js} +6 -6
- package/dist/api.d.ts +2 -0
- package/dist/api.js +25 -25
- package/dist/{asset-RYVHIREA.js → asset-UQBTWAMJ.js} +2 -2
- package/dist/{assetCataloger-MG3GSWNQ.js → assetCataloger-GOUD7VDG.js} +7 -7
- package/dist/{audio-CNKU2KQR.js → audio-LDVXMRHU.js} +506 -147
- package/dist/{auth-MX2SGZQH.js → auth-6LVATNTF.js} +6 -6
- package/dist/{autoUpdate-MB3SWOXG.js → autoUpdate-X6KZRI5E.js} +2 -2
- package/dist/{backgroundChecks-TYCDOGQX.js → backgroundChecks-3HGGWYLY.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-PHXZBVEA.js → batchRender-4ISYYVPQ.js} +3 -3
- package/dist/{beats-5SXSGNUM.js → beats-WN2KYIK3.js} +9 -9
- package/dist/{benchmark-V5Y5OQ3W.js → benchmark-HZPGQ2MP.js} +9 -9
- package/dist/{billing-FFWAEIQ6.js → billing-3Q2EAZFJ.js} +4 -4
- package/dist/{browser-CJ2HDBEC.js → browser-6XC7MTQL.js} +4 -4
- package/dist/{bundleWithLocalizedFonts-2FPP3MMD.js → bundleWithLocalizedFonts-ZZ6Y4CEO.js} +2 -2
- package/dist/{capture-KE3474CJ.js → capture-46LJ2VU2.js} +3 -3
- package/dist/{capture-424KH55L.js → capture-FCLAEX5L.js} +19 -19
- package/dist/{captureCompositionFrame-ZPZCQTYL.js → captureCompositionFrame-SMUDCZ2L.js} +11 -11
- package/dist/{catalog-3S4LAGZH.js → catalog-72AEDDEG.js} +12 -12
- package/dist/{catch-up-7ZLNBOG4.js → catch-up-6WIX7SWV.js} +5 -5
- package/dist/{check-6OCBPXX5.js → check-R2G5OYIA.js} +37 -37
- package/dist/{checkAudio-O5RDEOEX.js → checkAudio-2RP7BNQ3.js} +9 -9
- package/dist/{checkBrowser-DJPH634D.js → checkBrowser-OWLF2BT4.js} +31 -31
- package/dist/{chunk-T46SP3UD.js → chunk-2BARV2ZU.js} +48 -8
- package/dist/{chunk-DRXVRDUX.js → chunk-2X43RFKM.js} +1 -1
- package/dist/{chunk-6U4EV64B.js → chunk-3AH6KE6F.js} +39 -11
- package/dist/{chunk-ZDQEVQHB.js → chunk-3LHJHMFK.js} +1 -1
- package/dist/{chunk-ZFQ4N6D2.js → chunk-3Q7UFKFN.js} +3 -3
- package/dist/{chunk-TWIPYH4G.js → chunk-3YJB4QVS.js} +1 -1
- package/dist/{chunk-M56MEMPF.js → chunk-46HMQ4I3.js} +1 -1
- package/dist/{chunk-HMMHCSSN.js → chunk-6IW2HWYI.js} +7 -8
- package/dist/{chunk-OHWVSTNO.js → chunk-74VSOKKS.js} +6 -4
- package/dist/{chunk-JX5GUEFA.js → chunk-7LCZBNX7.js} +1 -1
- package/dist/{chunk-QIFINY2N.js → chunk-7XRS2NDR.js} +7 -7
- package/dist/{chunk-5FAU3XAO.js → chunk-AWQE37H3.js} +2 -2
- package/dist/{chunk-NASVSJQK.js → chunk-BGMMC352.js} +19 -7
- package/dist/{chunk-6NJVSTSY.js → chunk-BVAPHHMQ.js} +7 -3
- package/dist/{chunk-CRDXU4IX.js → chunk-C3FKYBZ4.js} +10 -10
- package/dist/{chunk-NVPB37H4.js → chunk-C7XW5WPZ.js} +2 -2
- package/dist/{chunk-YK6ERJTN.js → chunk-CTPYBHF3.js} +2 -2
- package/dist/{chunk-JZJ3LLIO.js → chunk-CUCDUPTA.js} +1 -1
- package/dist/{chunk-MNW4FTAJ.js → chunk-CX6MGY2B.js} +13 -13
- package/dist/{chunk-BXE6GDIL.js → chunk-DOS6S7HW.js} +1 -1
- package/dist/{chunk-MBOZUQFZ.js → chunk-DZNJD7BH.js} +1 -1
- package/dist/{chunk-YPBGUVLY.js → chunk-E3IBPTX7.js} +1 -1
- package/dist/{chunk-7FERR4YN.js → chunk-E4XS2M2E.js} +1 -1
- package/dist/{chunk-44IJ426Z.js → chunk-EG7FZSEF.js} +1 -1
- package/dist/{chunk-GOPJLAMZ.js → chunk-ETYQYG6Q.js} +78 -19
- package/dist/chunk-FLDSZTHP.js +134 -0
- package/dist/{chunk-S5SVW6ZY.js → chunk-FYDFHW22.js} +13 -13
- package/dist/{chunk-JD7MLLJD.js → chunk-FYR2GKAA.js} +4 -4
- package/dist/{chunk-WAQX3AYB.js → chunk-GBEGZOP3.js} +1 -1
- package/dist/{chunk-4W2ZN4HT.js → chunk-GK3OROLS.js} +1 -1
- package/dist/{chunk-Y6TDJUHR.js → chunk-HBCY63DS.js} +2 -2
- package/dist/{chunk-5TBRPDH3.js → chunk-HRSZOW3U.js} +55 -16
- package/dist/{chunk-MX7NW3QW.js → chunk-HZG42ZYW.js} +3 -3
- package/dist/{chunk-RTUQDHKE.js → chunk-IAZ2A7D6.js} +97 -11
- package/dist/{chunk-KLJEGC6M.js → chunk-IOECRDWX.js} +1 -1
- package/dist/{chunk-CGXL36FR.js → chunk-IX3R4BKU.js} +1 -1
- package/dist/{chunk-SXKFFBN3.js → chunk-IXGZ6YFZ.js} +85 -9
- package/dist/{chunk-TI4JPSFS.js → chunk-KD22R2UE.js} +3 -3
- package/dist/{chunk-JDT5PZWS.js → chunk-KDTOB4TD.js} +1 -1
- package/dist/{chunk-RUZ63CJF.js → chunk-LAZREIJF.js} +1 -1
- package/dist/{chunk-PYOEIKGI.js → chunk-LCDXHXYH.js} +2 -2
- package/dist/{chunk-2RLI5ISA.js → chunk-LFDPOL45.js} +3 -3
- package/dist/{chunk-YGSQABOD.js → chunk-LIA4GZ4F.js} +2 -2
- package/dist/{chunk-HWIGWPIG.js → chunk-N6O2RQLQ.js} +3 -1
- package/dist/{chunk-MYTROPEC.js → chunk-NEI65CWG.js} +2 -2
- package/dist/{chunk-MGXQXY4C.js → chunk-NFNYH6VQ.js} +2 -2
- package/dist/{chunk-FZM6E4S4.js → chunk-OJTXXFYO.js} +2 -2
- package/dist/{chunk-JAYAOI3W.js → chunk-OO7U23BR.js} +1 -1
- package/dist/chunk-OUZSRPKC.js +5035 -0
- package/dist/{chunk-XXFWK5Y7.js → chunk-P73MHFBX.js} +1 -1
- package/dist/{chunk-46DXV7OQ.js → chunk-P7CVKVPD.js} +2 -2
- package/dist/{chunk-C555UZ5B.js → chunk-PG356QHK.js} +2 -2
- package/dist/{chunk-EG2ESF6S.js → chunk-PPNA6EBI.js} +1 -1
- package/dist/{chunk-5FFHLOVF.js → chunk-PUMQDN2T.js} +1 -1
- package/dist/{chunk-64OUBJSX.js → chunk-PYWJGSWO.js} +1 -1
- package/dist/{chunk-JAJ6PAR6.js → chunk-QXUDHDJU.js} +7 -7
- package/dist/{chunk-WTUIK6Y4.js → chunk-QXVW22VM.js} +3 -1
- package/dist/{chunk-ARNCWQNR.js → chunk-RJ6LXDUC.js} +1 -1
- package/dist/{chunk-WAK6IPMP.js → chunk-RWHCRVZV.js} +5 -5
- package/dist/{chunk-7XCGHD55.js → chunk-RY7Z6KFS.js} +4 -4
- package/dist/{chunk-HZMM3D6P.js → chunk-SE6O4APZ.js} +2 -2
- package/dist/{chunk-K4SINZFP.js → chunk-SEJ7UBR2.js} +2 -2
- package/dist/{chunk-VPVO5COM.js → chunk-SIJYH7XM.js} +1 -1
- package/dist/{chunk-CS6UO5NC.js → chunk-SXGXJAA7.js} +1 -1
- package/dist/{chunk-UL3SKAZB.js → chunk-T252SG67.js} +2 -2
- package/dist/{chunk-NRO2PLEC.js → chunk-TBCRTIXP.js} +2 -2
- package/dist/{chunk-5T2D2XYR.js → chunk-TSCO4XR4.js} +1 -1
- package/dist/{chunk-QEQEKBL7.js → chunk-TSQZ3DSC.js} +20 -5
- package/dist/{chunk-3B3LGZ36.js → chunk-UDY3FS6G.js} +9 -9
- package/dist/{chunk-ALBHEVJJ.js → chunk-ULH6TLE3.js} +1 -1
- package/dist/{chunk-Q2LWMJAQ.js → chunk-UQH3MOES.js} +2 -2
- package/dist/{chunk-HDKRDALC.js → chunk-V6MZZEA7.js} +5 -5
- package/dist/{chunk-H7KAHDJJ.js → chunk-WAURLEUO.js} +3 -3
- package/dist/{chunk-6447ORC2.js → chunk-WZGVBZY6.js} +1 -1
- package/dist/{chunk-NUGADGXQ.js → chunk-X2PPRHKO.js} +1 -1
- package/dist/{chunk-RW4DTMPK.js → chunk-X3DTUYKZ.js} +7 -7
- package/dist/{chunk-PMQ65BTY.js → chunk-X4K7Q5PT.js} +1 -1
- package/dist/{chunk-KW2ZREKY.js → chunk-XEP7PGXS.js} +1 -1
- package/dist/{chunk-6PLIPRVQ.js → chunk-XFA6NPMP.js} +3 -3
- package/dist/{chunk-GC2GKCRQ.js → chunk-XKTLYF4N.js} +18 -18
- package/dist/{chunk-HZDSKYTV.js → chunk-XXEOJXXY.js} +2 -2
- package/dist/{chunk-MCROAQ7A.js → chunk-Y2R4N6HQ.js} +9 -9
- package/dist/{chunk-FEC4UQK2.js → chunk-YHO5SKUR.js} +5 -5
- package/dist/{chunk-IWMVCOUX.js → chunk-YTWTG67C.js} +7 -7
- package/dist/{chunk-SBPDYU34.js → chunk-ZVERYNYS.js} +1 -1
- package/dist/{clean-ZKPZ4HHG.js → clean-52TVJH4U.js} +16 -16
- package/dist/cli.js +58 -57
- package/dist/{cloud-GQZYBRBI.js → cloud-FEPPMA5F.js} +4 -4
- package/dist/{cloudrun-TWSNNKIV.js → cloudrun-DFWQ7ZJW.js} +4 -4
- package/dist/{compare-3IXL3WVG.js → compare-UBQUKWOB.js} +28 -28
- package/dist/{compiler-SKQTN3EA.js → compiler-UCJ4KC75.js} +3 -3
- package/dist/{component-RV72K74J.js → component-6YUQ2XAM.js} +3 -3
- package/dist/{compositions-W2IKF36U.js → compositions-KGZO4UYR.js} +11 -11
- package/dist/{curve-TRCKVHYB.js → curve-VISYHZKL.js} +10 -10
- package/dist/{cuts-SRXTGX33.js → cuts-HCWYCBI2.js} +11 -11
- package/dist/{delete-7PZLZFBE.js → delete-CNKHLEDS.js} +6 -6
- package/dist/{deploy-GORJQIPX.js → deploy-TS3R7DTD.js} +4 -4
- package/dist/{describeProject-ZIFVZUSV.js → describeProject-6TNE4FY4.js} +7 -7
- package/dist/{diff-PHRMVJMC.js → diff-YRBYR56R.js} +25 -25
- package/dist/{dist-IHPMKRYN.js → dist-H4C7ZCFU.js} +1 -1
- package/dist/{dist-4KKPG6A5.js → dist-T57O7KXT.js} +4 -2
- package/dist/{doctor-C6Q2FECX.js → doctor-PLA77GFC.js} +10 -10
- package/dist/{energy-CNXVSSE6.js → energy-7BTNGNR7.js} +11 -11
- package/dist/{events-FSUH46NR.js → events-25FIG2O6.js} +13 -13
- package/dist/{events-27C4TXPP.js → events-IMWCEFSZ.js} +4 -4
- package/dist/{events-UG3LC2PB.js → events-QTM2OEFB.js} +3 -3
- package/dist/{extract-GLPADLLV.js → extract-C66C5A22.js} +11 -11
- package/dist/{face-TTOHRJEY.js → face-MDOI2JO5.js} +11 -11
- package/dist/{feedback-BYONPSSM.js → feedback-26OSAZF3.js} +11 -11
- package/dist/{ffmpeg-WAM27CD6.js → ffmpeg-R5ND25AV.js} +6 -6
- package/dist/{figma-Y4UR2EDE.js → figma-276JAPS4.js} +3 -3
- package/dist/fontLocalizeCli.js +9 -9
- package/dist/{frames-CNQUJEUV.js → frames-AMLBNI5B.js} +12 -12
- package/dist/{generate-BPYDIEPB.js → generate-YIZS4JFA.js} +17 -17
- package/dist/{get-4LY5VJW2.js → get-HFEFIRAJ.js} +6 -6
- package/dist/{gpuPolicy-OUHJ7GVX.js → gpuPolicy-7JA66MJG.js} +6 -6
- package/dist/{grade-compare-WEZBE3WM.js → grade-compare-7NH6XYIY.js} +29 -29
- package/dist/{heifImagePrep-7L4HH33F.js → heifImagePrep-WCL36MHY.js} +7 -7
- package/dist/{help-QKNWJOBV.js → help-HHIAUMBQ.js} +2 -1
- package/dist/{history-XQEWP2IW.js → history-SLWPRU6Q.js} +7 -7
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +64 -64
- package/dist/hyperframes-player.global.js +90 -3
- package/dist/{info-AMRQ5R4N.js → info-MIPROXSM.js} +8 -8
- package/dist/{init-4VTMKZSQ.js → init-T56UGI6Z.js} +32 -29
- package/dist/{ink-KB3LZMJY.js → ink-TY7CKC6Q.js} +11 -11
- package/dist/{inspect-ZWN2DVO4.js → inspect-TIF7YHGN.js} +29 -29
- package/dist/{installer-2NUMLKHQ.js → installer-72QUKTPE.js} +4 -4
- package/dist/{keyframes-I456RFGP.js → keyframes-I4JRA37J.js} +7 -7
- package/dist/{lambda-2QKB4BJM.js → lambda-VGFSEG56.js} +10 -10
- package/dist/{layout-WPHWXQCM.js → layout-K776Z2IS.js} +29 -29
- package/dist/{lint-EO5DXJ36.js → lint-XLTSC66T.js} +8 -8
- package/dist/{lintProject-SG4KRUAV.js → lintProject-NZADSVSU.js} +1 -1
- package/dist/{list-LZOUUJBY.js → list-6V3IKLXF.js} +6 -6
- package/dist/{localPage-SZWQWWJ7.js → localPage-RM6EXBBT.js} +6 -6
- package/dist/{login-IEWPNTGD.js → login-HD47X3JE.js} +12 -13
- package/dist/{logout-B6H5F5YP.js → logout-UMDA3HDE.js} +3 -3
- package/dist/{look-6L3CPY4H.js → look-KUDJYDTK.js} +11 -11
- package/dist/{manager-C7677YAV.js → manager-TUKVGY7O.js} +7 -7
- package/dist/{measure-TINTS6YY.js → measure-6BRNY3II.js} +11 -11
- package/dist/{media-treatment-3BDHM4P6.js → media-treatment-MLME5LNQ.js} +13 -13
- package/dist/{media-use-JC2B2JSE.js → media-use-3YTDQKGR.js} +9 -5
- package/dist/{models-JMM25YO6.js → models-IUX642FY.js} +10 -10
- package/dist/{motionShot-4WB3SH6V.js → motionShot-INNVFSPU.js} +14 -14
- package/dist/{normalize-audio-2ZJKR5G3.js → normalize-audio-ZMJIN2OV.js} +9 -9
- package/dist/{open-LMYSLYH2.js → open-FDQ3NDSX.js} +12 -12
- package/dist/{parakeetRunner-HTQVLX2B.js → parakeetRunner-WZ6JW3QQ.js} +11 -11
- package/dist/{pipeline-FMVCPIRU.js → pipeline-V3TOATHS.js} +9 -9
- package/dist/{play-GFHBG3NZ.js → play-5WIU4CZL.js} +20 -20
- package/dist/{preflight-L5GC6ASI.js → preflight-JXEVL63B.js} +7 -7
- package/dist/{present-PW3RWNWF.js → present-UHWGVCP4.js} +16 -16
- package/dist/{preview-IRLHPLSD.js → preview-W75P6D7E.js} +18 -18
- package/dist/probe-O2ADL5FX.js +69 -0
- package/dist/{producer-M6IWCFMK.js → producer-6GQQQT7M.js} +1 -1
- package/dist/{projectConfig-IVJE7A42.js → projectConfig-FQ7CAOXL.js} +10 -6
- package/dist/{publication-BS2YATIF.js → publication-YRVC6D56.js} +2 -2
- package/dist/{publish-OTRA2JWM.js → publish-4IN3WW5G.js} +15 -15
- package/dist/{refresh-T6JLFCS4.js → refresh-4FQFQ2SW.js} +3 -3
- package/dist/{remove-background-UV37Y7T7.js → remove-background-L4KWXVMH.js} +10 -10
- package/dist/{render-3FANM5MO.js → render-73VGDCCH.js} +5 -5
- package/dist/{render-XSDVVBEY.js → render-GZ4DBQ5E.js} +41 -31
- package/dist/{render-7VBLI4AZ.js → render-IP7KBRD7.js} +32 -32
- package/dist/{render-batch-DPWJHKFY.js → render-batch-RX3TJ4NY.js} +5 -5
- package/dist/renderSetupWorker.js +1 -1
- package/dist/{resolver-VQ32ZH6Y.js → resolver-SNTBG6O2.js} +4 -4
- package/dist/reverse-5SHT4TC6.js +32 -0
- package/dist/{run-MTGSR5HH.js → run-GV6MEM2M.js} +4 -4
- package/dist/{sherpa-BSIBIIIO.js → sherpa-LJJHQNQ6.js} +10 -10
- package/dist/skills/hyperframes-cli/references/cloud.md +1 -1
- package/dist/skills/media-use/SKILL.md +5 -5
- package/dist/skills/media-use/audio/references/requirements.md +7 -7
- package/dist/skills/media-use/audio/references/tts.md +7 -6
- package/dist/skills/media-use/audio/scripts/lib/heygen.mjs +16 -10
- package/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +32 -0
- package/dist/skills/media-use/references/heygen.md +1 -1
- package/dist/{skills-S7JNBPZZ.js → skills-NVNRQU7K.js} +6 -6
- package/dist/{skillsUpdateCheck-WFEV6VYU.js → skillsUpdateCheck-QNFIPFLX.js} +3 -3
- package/dist/{snapshot-NCWXYS2E.js → snapshot-75S4SIRK.js} +173 -66
- package/dist/{src-AYBT7IBT.js → src-KS6W3WRC.js} +8 -8
- package/dist/{src-7WW3KXOI.js → src-MTLH4YHV.js} +17 -5
- package/dist/start-4UCLBL76.js +226 -0
- package/dist/{staticProjectServer-VYZV4BSU.js → staticProjectServer-USD7TCZH.js} +17 -17
- package/dist/{status-Z5BPMROD.js → status-MPCREDMQ.js} +9 -6
- package/dist/studio/assets/hyperframes-player-CQLtM2zB.js +565 -0
- package/dist/studio/assets/{index-BohL7wdo.js → index-CKnGNPHF.js} +1 -1
- package/dist/studio/assets/{index-CTbhykVD.js → index-CdWK2GVp.js} +101 -101
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-OTNMLH4B.js → studio-api-447CJUUM.js} +9 -9
- package/dist/{studioServer-AA4B3YP7.js → studioServer-TMPKQRQA.js} +48 -48
- package/dist/{sync-3M7VO3UJ.js → sync-V456U5AA.js} +11 -11
- package/dist/{telemetry-VJ3A6ZMD.js → telemetry-NK6K3VRH.js} +4 -4
- package/dist/{timeline-ZLZ45W7F.js → timeline-M5URP7QS.js} +18 -18
- package/dist/{tokens-WXEJNNJV.js → tokens-5OIFB4MD.js} +2 -2
- package/dist/{transcribe-XMVXOBHM.js → transcribe-N3E7T7AW.js} +21 -21
- package/dist/{transcribe-PPH5H67E.js → transcribe-ON5WTZV3.js} +9 -9
- package/dist/{updateCheck-HDLNWLIC.js → updateCheck-JQOAKPNR.js} +2 -2
- package/dist/{upgrade-6UXVTJII.js → upgrade-737POFN4.js} +2 -2
- package/dist/{urlDownloader-DPN2KRCX.js → urlDownloader-ZIPT6PZC.js} +5 -5
- package/dist/{validate-BZOURM4G.js → validate-6IPCQFXI.js} +23 -23
- package/dist/{video-BE42DAT2.js → video-BEZHDPH2.js} +7 -7
- package/dist/warmCheck.js +37 -37
- package/package.json +1 -1
- package/dist/chunk-2YQ2XYO5.js +0 -5030
- package/dist/probe-FPHFC3SD.js +0 -179
- package/dist/studio/assets/hyperframes-player-Cum4k6V2.js +0 -478
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { createRequire as __hf_createRequire } from "node:module";
|
|
2
|
+
import { fileURLToPath as __hf_fileURLToPath } from "node:url";
|
|
3
|
+
import { dirname as __hf_dirname } from "node:path";
|
|
4
|
+
var require = __hf_createRequire(import.meta.url);
|
|
5
|
+
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = __hf_dirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
jsonArg,
|
|
9
|
+
runMeasure,
|
|
10
|
+
videoArg
|
|
11
|
+
} from "./chunk-CTPYBHF3.js";
|
|
12
|
+
import {
|
|
13
|
+
Fix,
|
|
14
|
+
ffmpegBin,
|
|
15
|
+
probeVideo,
|
|
16
|
+
round,
|
|
17
|
+
runFfmpeg
|
|
18
|
+
} from "./chunk-RJ6LXDUC.js";
|
|
19
|
+
import {
|
|
20
|
+
defineCommand
|
|
21
|
+
} from "./chunk-DL4OD7IA.js";
|
|
22
|
+
|
|
23
|
+
// src/commands/measure/probe.ts
|
|
24
|
+
import { execFileSync } from "child_process";
|
|
25
|
+
import { mkdirSync } from "fs";
|
|
26
|
+
import { dirname, resolve } from "path";
|
|
27
|
+
var examples = [
|
|
28
|
+
[
|
|
29
|
+
"Size, frame rate, sound, and what to fix before rebuilding",
|
|
30
|
+
"hyperframes measure probe ref.mp4"
|
|
31
|
+
],
|
|
32
|
+
[
|
|
33
|
+
"Make a constant-rate SDR working copy of a phone or HDR video",
|
|
34
|
+
"hyperframes measure probe ref.mp4 --normalize original.mp4"
|
|
35
|
+
]
|
|
36
|
+
];
|
|
37
|
+
var SECTION_S = 60;
|
|
38
|
+
var STANDARD = ["24000/1001", "24", "25", "30000/1001", "30", "50", "60000/1001", "60"];
|
|
39
|
+
var rateOf = (text) => {
|
|
40
|
+
const [a, b] = text.split("/").map(Number);
|
|
41
|
+
return (a ?? 0) / (b || 1);
|
|
42
|
+
};
|
|
43
|
+
var standardRate = (info) => STANDARD.reduce(
|
|
44
|
+
(best, r) => Math.abs(rateOf(r) - info.avgFps) < Math.abs(rateOf(best) - info.avgFps) ? r : best
|
|
45
|
+
);
|
|
46
|
+
var hasFilter = (name) => new RegExp(`\\s${name}\\s`).test(
|
|
47
|
+
execFileSync(ffmpegBin(), ["-hide_banner", "-filters"], { windowsHide: true }).toString()
|
|
48
|
+
);
|
|
49
|
+
function normalize(info, out) {
|
|
50
|
+
const fps = info.vfr ? standardRate(info) : info.fpsText;
|
|
51
|
+
const filters = [`fps=${fps}`];
|
|
52
|
+
if (info.hdr) {
|
|
53
|
+
if (!hasFilter("zscale"))
|
|
54
|
+
throw new Fix(
|
|
55
|
+
"this ffmpeg cannot tone-map HDR (no zscale filter)",
|
|
56
|
+
"install an ffmpeg built with libzimg, e.g. brew install ffmpeg"
|
|
57
|
+
);
|
|
58
|
+
filters.push(
|
|
59
|
+
"zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv"
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
mkdirSync(dirname(out), { recursive: true });
|
|
63
|
+
runFfmpeg([
|
|
64
|
+
...["-y", "-i", info.path, "-vf", [...filters, "format=yuv420p"].join(",")],
|
|
65
|
+
...["-c:v", "libx264", "-crf", "12", "-preset", "medium", "-c:a", "aac", "-b:a", "192k", out]
|
|
66
|
+
]);
|
|
67
|
+
return { path: out, fps };
|
|
68
|
+
}
|
|
69
|
+
function probeReport(video, normalizeTo) {
|
|
70
|
+
const info = probeVideo(video);
|
|
71
|
+
const notes = [];
|
|
72
|
+
if (info.vfr)
|
|
73
|
+
notes.push(
|
|
74
|
+
"variable frame rate: frame times drift, so measure and rebuild a constant-rate copy (--normalize)"
|
|
75
|
+
);
|
|
76
|
+
if (info.hdr) notes.push("HDR: --normalize tone-maps an SDR copy; the render is SDR");
|
|
77
|
+
if (info.duration > SECTION_S)
|
|
78
|
+
notes.push(
|
|
79
|
+
`longer than ${SECTION_S} s: analyse and check it in sections of at most ${SECTION_S} s, split at cuts (measure cuts)`
|
|
80
|
+
);
|
|
81
|
+
if (!info.audio) notes.push("no sound: the rebuild has no <audio>");
|
|
82
|
+
const made = normalizeTo ? normalize(info, resolve(normalizeTo)) : void 0;
|
|
83
|
+
return {
|
|
84
|
+
video: info.path,
|
|
85
|
+
width: info.width,
|
|
86
|
+
height: info.height,
|
|
87
|
+
fps: round(info.fps, 3),
|
|
88
|
+
fps_text: info.fpsText,
|
|
89
|
+
duration: round(info.duration, 3),
|
|
90
|
+
frames: info.frames,
|
|
91
|
+
picture_duration: round(info.frames / info.fps, 3),
|
|
92
|
+
audio: info.audio,
|
|
93
|
+
vfr: info.vfr,
|
|
94
|
+
hdr: info.hdr,
|
|
95
|
+
codec: info.codec,
|
|
96
|
+
canvas: {
|
|
97
|
+
width: info.width,
|
|
98
|
+
height: info.height,
|
|
99
|
+
fps: made?.fps ?? info.fpsText,
|
|
100
|
+
duration: round(info.frames / info.fps, 3),
|
|
101
|
+
note: "data-width, data-height and data-duration (the picture's length) on the root composition; render with --fps at this rate"
|
|
102
|
+
},
|
|
103
|
+
...made ? { normalized: made.path } : {},
|
|
104
|
+
notes,
|
|
105
|
+
...(info.vfr || info.hdr) && !made ? {
|
|
106
|
+
fix: `npx hyperframes measure probe ${video} --normalize <working-copy.mp4>`
|
|
107
|
+
} : {}
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
var probe_default = defineCommand({
|
|
111
|
+
meta: {
|
|
112
|
+
name: "probe",
|
|
113
|
+
description: "Size (as displayed), frame rate, duration, sound, and what to fix before measuring or rebuilding"
|
|
114
|
+
},
|
|
115
|
+
args: {
|
|
116
|
+
video: videoArg,
|
|
117
|
+
normalize: {
|
|
118
|
+
type: "string",
|
|
119
|
+
description: "Write a constant-frame-rate SDR copy here (for variable-rate or HDR videos); the original is left alone"
|
|
120
|
+
},
|
|
121
|
+
json: jsonArg
|
|
122
|
+
},
|
|
123
|
+
async run({ args }) {
|
|
124
|
+
await runMeasure(
|
|
125
|
+
() => probeReport(String(args.video), args.normalize ? String(args.normalize) : void 0)
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
export {
|
|
131
|
+
examples,
|
|
132
|
+
probeReport,
|
|
133
|
+
probe_default
|
|
134
|
+
};
|
|
@@ -7,19 +7,19 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
ambiguousIssue,
|
|
9
9
|
loadBrowserScript
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UDY3FS6G.js";
|
|
11
11
|
import {
|
|
12
12
|
auditClipDurations,
|
|
13
13
|
shouldIgnoreHttpError,
|
|
14
14
|
shouldIgnoreRequestFailure
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-CX6MGY2B.js";
|
|
16
16
|
import {
|
|
17
17
|
serveStaticProjectHtml
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-QXUDHDJU.js";
|
|
19
19
|
import {
|
|
20
20
|
STUDIO_PREVIEW_CAPTURE_MODE,
|
|
21
21
|
STUDIO_PREVIEW_MARK_META
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-3AH6KE6F.js";
|
|
23
23
|
import {
|
|
24
24
|
FfmpegUnavailableError,
|
|
25
25
|
decideMediaProxyEligibility,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
resolveProxies,
|
|
29
29
|
scanProjectMediaCodecMap,
|
|
30
30
|
shouldPrewarmProxy
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-2BARV2ZU.js";
|
|
32
32
|
import {
|
|
33
33
|
artifactDirectory,
|
|
34
34
|
finishSnapshotRun
|
|
@@ -46,24 +46,24 @@ import {
|
|
|
46
46
|
seekCompositionTimeline,
|
|
47
47
|
seekInPage,
|
|
48
48
|
waitForPreferredSeekTarget
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-C3FKYBZ4.js";
|
|
50
50
|
import {
|
|
51
51
|
SEEK_SETTLES_BEFORE_PROTOCOL_TIMEOUT_MS
|
|
52
52
|
} from "./chunk-YGGZ23BB.js";
|
|
53
53
|
import {
|
|
54
54
|
findStageProxyBox
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-XEP7PGXS.js";
|
|
56
56
|
import {
|
|
57
57
|
resolveAutoProxy
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-HRSZOW3U.js";
|
|
59
59
|
import {
|
|
60
60
|
BrowserCleanupError,
|
|
61
61
|
closeManagedBrowser,
|
|
62
62
|
onStopSignal
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-TBCRTIXP.js";
|
|
64
64
|
import {
|
|
65
65
|
injectTagsAtHeadStart
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-OUZSRPKC.js";
|
|
67
67
|
import {
|
|
68
68
|
normalizeErrorMessage
|
|
69
69
|
} from "./chunk-E63BDV4Z.js";
|
|
@@ -582,7 +582,7 @@ function proxyFailedDraft(message) {
|
|
|
582
582
|
return { code: "media_proxy_failed", severity: "warning", message, time: 0 };
|
|
583
583
|
}
|
|
584
584
|
async function loadCheckHtmlWithDeferredMedia(dir) {
|
|
585
|
-
const { bundleWithLocalizedFonts } = await import("./bundleWithLocalizedFonts-
|
|
585
|
+
const { bundleWithLocalizedFonts } = await import("./bundleWithLocalizedFonts-ZZ6Y4CEO.js");
|
|
586
586
|
return withCapturePreviewMark(await bundleWithLocalizedFonts(dir));
|
|
587
587
|
}
|
|
588
588
|
function withCapturePreviewMark(html) {
|
|
@@ -644,7 +644,7 @@ async function runBrowserCheck(project, options, motion, runGrid, deadline, prel
|
|
|
644
644
|
).map((draft) => runtimeFinding(draft, rootAnchor))
|
|
645
645
|
}));
|
|
646
646
|
const launchSettleMs = Date.now() - launchSettleStart;
|
|
647
|
-
const { analyzeClipMediaFit } = await import("./src-
|
|
647
|
+
const { analyzeClipMediaFit } = await import("./src-MTLH4YHV.js");
|
|
648
648
|
for (const entry of await auditClipDurations(page, analyzeClipMediaFit, options.timeout)) {
|
|
649
649
|
drafts.push({ code: "clip_media_fit", severity: entry.level, message: entry.text, time: 0 });
|
|
650
650
|
}
|
|
@@ -785,7 +785,7 @@ async function captureFindingCrops(project, options, requests, deadline) {
|
|
|
785
785
|
async function captureFindingFrames(project, options, requests, deadline) {
|
|
786
786
|
if (requests.length === 0) return { written: [], inspected: [] };
|
|
787
787
|
const inspector = requests.some((request) => request.inspect?.length) ? await prepareFindingInspector(project.dir, async (bundleOptions) => {
|
|
788
|
-
const { bundleWithLocalizedFonts } = await import("./bundleWithLocalizedFonts-
|
|
788
|
+
const { bundleWithLocalizedFonts } = await import("./bundleWithLocalizedFonts-ZZ6Y4CEO.js");
|
|
789
789
|
return withCapturePreviewMark(
|
|
790
790
|
await bundleWithLocalizedFonts(project.dir, void 0, bundleOptions)
|
|
791
791
|
);
|
|
@@ -7,12 +7,12 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
findCuts,
|
|
9
9
|
signatures
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PUMQDN2T.js";
|
|
11
11
|
import {
|
|
12
12
|
jsonArg,
|
|
13
13
|
num,
|
|
14
14
|
runMeasure
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-CTPYBHF3.js";
|
|
16
16
|
import {
|
|
17
17
|
idempotencyKey,
|
|
18
18
|
keepVoice,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
publicVoices,
|
|
21
21
|
runJob,
|
|
22
22
|
senderScope
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-V6MZZEA7.js";
|
|
24
24
|
import {
|
|
25
25
|
Fix,
|
|
26
26
|
probeVideo,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
round,
|
|
29
29
|
runFfmpeg,
|
|
30
30
|
videoClip
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-RJ6LXDUC.js";
|
|
32
32
|
import {
|
|
33
33
|
defineCommand
|
|
34
34
|
} from "./chunk-DL4OD7IA.js";
|
|
@@ -6,14 +6,14 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
loadProducer
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ULH6TLE3.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveProjectRelativeSrc
|
|
12
12
|
} from "./chunk-WVRAFHJU.js";
|
|
13
13
|
|
|
14
14
|
// src/utils/projectMedia.ts
|
|
15
15
|
async function collectProjectMedia(projectDir) {
|
|
16
|
-
const { bundleToSingleHtml } = await import("./compiler-
|
|
16
|
+
const { bundleToSingleHtml } = await import("./compiler-UCJ4KC75.js");
|
|
17
17
|
const html = await bundleToSingleHtml(projectDir);
|
|
18
18
|
const producer = await loadProducer();
|
|
19
19
|
if (!producer.collectRenderMedia) throw new Error("Render media collector unavailable");
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
} from "./chunk-HVW7ABXD.js";
|
|
13
13
|
import {
|
|
14
14
|
DEFAULT_REGISTRY_URL
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-X2PPRHKO.js";
|
|
16
16
|
|
|
17
17
|
// src/utils/projectConfig.ts
|
|
18
|
-
import { readFileSync, writeFileSync } from "fs";
|
|
18
|
+
import { mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
19
19
|
import { join, resolve } from "path";
|
|
20
20
|
var PROJECT_CONFIG_FILENAME = "hyperframes.json";
|
|
21
21
|
var PROJECT_CONFIG_SCHEMA_URL = "https://hyperframes.heygen.com/schema/hyperframes.json";
|
|
@@ -72,9 +72,14 @@ function normalizeConfig(partial) {
|
|
|
72
72
|
// Whitelist rebuild - an omission here silently drops the manifest on
|
|
73
73
|
// every config round-trip, which would read as "this project never
|
|
74
74
|
// installed a catalog item".
|
|
75
|
-
registryItems: normalizeRegistryItems(partial.registryItems)
|
|
75
|
+
registryItems: normalizeRegistryItems(partial.registryItems),
|
|
76
|
+
reverseSessionId: normalizeReverseSessionId(partial.reverseSessionId)
|
|
76
77
|
};
|
|
77
78
|
}
|
|
79
|
+
var REVERSE_SESSION_ID = /^rvs_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
80
|
+
function normalizeReverseSessionId(raw) {
|
|
81
|
+
return typeof raw === "string" && REVERSE_SESSION_ID.test(raw) ? raw : void 0;
|
|
82
|
+
}
|
|
78
83
|
function normalizeRegistryItems(raw) {
|
|
79
84
|
if (!Array.isArray(raw)) return void 0;
|
|
80
85
|
const items = raw.filter(
|
|
@@ -101,6 +106,14 @@ function resolveAutoProxy(projectDir, flagValue) {
|
|
|
101
106
|
function isJsonObject(value) {
|
|
102
107
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
103
108
|
}
|
|
109
|
+
function rewriteConfig(path, text, parsed) {
|
|
110
|
+
const indent = /\n([ \t]+)"/.exec(text)?.[1] ?? " ";
|
|
111
|
+
writeFileSync(
|
|
112
|
+
path,
|
|
113
|
+
(text.startsWith("\uFEFF") ? "\uFEFF" : "") + JSON.stringify(parsed, null, indent) + "\n",
|
|
114
|
+
"utf-8"
|
|
115
|
+
);
|
|
116
|
+
}
|
|
104
117
|
function isFileNotFound(error) {
|
|
105
118
|
return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
|
|
106
119
|
}
|
|
@@ -125,12 +138,7 @@ function seedProjectAuthoringSkill(projectDir, rawSkill) {
|
|
|
125
138
|
if (!isJsonObject(parsed)) return;
|
|
126
139
|
if (normalizeSkillSlug(parsed.authoringSkill)) return;
|
|
127
140
|
parsed.authoringSkill = skill;
|
|
128
|
-
|
|
129
|
-
writeFileSync(
|
|
130
|
-
path,
|
|
131
|
-
(text.startsWith("\uFEFF") ? "\uFEFF" : "") + JSON.stringify(parsed, null, indent) + "\n",
|
|
132
|
-
"utf-8"
|
|
133
|
-
);
|
|
141
|
+
rewriteConfig(path, text, parsed);
|
|
134
142
|
} catch {
|
|
135
143
|
}
|
|
136
144
|
}
|
|
@@ -156,13 +164,42 @@ function recordProjectRegistryItems(projectDir, items) {
|
|
|
156
164
|
});
|
|
157
165
|
if (unchanged) return;
|
|
158
166
|
parsed.registryItems = merged;
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
167
|
+
rewriteConfig(path, text, parsed);
|
|
168
|
+
} catch {
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
function recordProjectReverseSession(projectDir, sessionId, authoringSkill) {
|
|
172
|
+
if (!normalizeReverseSessionId(sessionId)) return void 0;
|
|
173
|
+
const path = projectConfigPath(projectDir);
|
|
174
|
+
let text;
|
|
175
|
+
try {
|
|
176
|
+
text = readFileSync(path, "utf-8");
|
|
177
|
+
} catch (error) {
|
|
178
|
+
if (!isFileNotFound(error)) return void 0;
|
|
179
|
+
try {
|
|
180
|
+
mkdirSync(resolve(projectDir), { recursive: true });
|
|
181
|
+
createProjectConfig(projectDir, {
|
|
182
|
+
...DEFAULT_PROJECT_CONFIG,
|
|
183
|
+
authoringSkill: normalizeSkillSlug(authoringSkill),
|
|
184
|
+
reverseSessionId: sessionId
|
|
185
|
+
});
|
|
186
|
+
return path;
|
|
187
|
+
} catch {
|
|
188
|
+
return void 0;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
try {
|
|
192
|
+
const parsed = JSON.parse(text.replace(/^\uFEFF/, ""));
|
|
193
|
+
if (!isJsonObject(parsed)) return void 0;
|
|
194
|
+
parsed.reverseSessionId = sessionId;
|
|
195
|
+
if (!normalizeSkillSlug(parsed.authoringSkill)) {
|
|
196
|
+
const skill = normalizeSkillSlug(authoringSkill);
|
|
197
|
+
if (skill) parsed.authoringSkill = skill;
|
|
198
|
+
}
|
|
199
|
+
rewriteConfig(path, text, parsed);
|
|
200
|
+
return path;
|
|
165
201
|
} catch {
|
|
202
|
+
return void 0;
|
|
166
203
|
}
|
|
167
204
|
}
|
|
168
205
|
|
|
@@ -173,10 +210,12 @@ export {
|
|
|
173
210
|
readProjectConfigWithStatus,
|
|
174
211
|
readProjectConfig,
|
|
175
212
|
normalizeConfig,
|
|
213
|
+
normalizeReverseSessionId,
|
|
176
214
|
writeProjectConfig,
|
|
177
215
|
createProjectConfig,
|
|
178
216
|
loadProjectConfig,
|
|
179
217
|
resolveAutoProxy,
|
|
180
218
|
seedProjectAuthoringSkill,
|
|
181
|
-
recordProjectRegistryItems
|
|
219
|
+
recordProjectRegistryItems,
|
|
220
|
+
recordProjectReverseSession
|
|
182
221
|
};
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
} from "./chunk-SWC3QIEH.js";
|
|
10
10
|
import {
|
|
11
11
|
stoppedByCancelSignal
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EG7FZSEF.js";
|
|
13
13
|
import {
|
|
14
14
|
DEFAULT_MODEL,
|
|
15
15
|
ensureModel,
|
|
16
16
|
ensureWhisper,
|
|
17
17
|
hasFFmpeg,
|
|
18
18
|
pinnedWhisperModel
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-GBEGZOP3.js";
|
|
20
20
|
import {
|
|
21
21
|
sha256File
|
|
22
22
|
} from "./chunk-RZ6CXJ56.js";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
findFFmpeg,
|
|
25
25
|
findFFprobe,
|
|
26
26
|
getFFmpegInstallHint
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-DZNJD7BH.js";
|
|
28
28
|
import {
|
|
29
29
|
findWavChunk
|
|
30
30
|
} from "./chunk-UOFAE5RF.js";
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
renderFrameIdForRenderId,
|
|
43
43
|
resolveAuthoredTimingWindow,
|
|
44
44
|
toFps
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-N6O2RQLQ.js";
|
|
46
46
|
import {
|
|
47
47
|
AUDIO_GROUP_RENDER_ID_ATTR,
|
|
48
48
|
AUTHORED_SOURCE_BEGIN,
|
|
@@ -85,7 +85,7 @@ import {
|
|
|
85
85
|
sourceTimeAt,
|
|
86
86
|
timeAtSourceTime,
|
|
87
87
|
volumeSegmentSampleCount
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-OUZSRPKC.js";
|
|
89
89
|
import {
|
|
90
90
|
redactTelemetryString,
|
|
91
91
|
redactUrlQueryStrings
|
|
@@ -103,7 +103,7 @@ import {
|
|
|
103
103
|
} from "./chunk-WE42NVH7.js";
|
|
104
104
|
import {
|
|
105
105
|
resolveReferencedStart
|
|
106
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-BGMMC352.js";
|
|
107
107
|
import {
|
|
108
108
|
FFMPEG_PATH_ENV,
|
|
109
109
|
FFPROBE_PATH_ENV,
|
|
@@ -331,6 +331,7 @@ var DEFAULT_CONFIG = {
|
|
|
331
331
|
videoLayerPassthrough: false,
|
|
332
332
|
useDrawElement: true,
|
|
333
333
|
enableDrawElementWorkerEncode: true,
|
|
334
|
+
useInPageEncode: false,
|
|
334
335
|
// Auto-detected per host in `resolveConfig`; defaults off for the raw
|
|
335
336
|
// DEFAULT_CONFIG (used directly by tests and worker-sizing fallbacks).
|
|
336
337
|
lowMemoryMode: false,
|
|
@@ -375,6 +376,7 @@ var BOOLEAN_ENGINE_CONFIG_FIELDS = [
|
|
|
375
376
|
"videoLayerPassthrough",
|
|
376
377
|
"useDrawElement",
|
|
377
378
|
"enableDrawElementWorkerEncode",
|
|
379
|
+
"useInPageEncode",
|
|
378
380
|
"lowMemoryMode",
|
|
379
381
|
"enablePageSideCompositing",
|
|
380
382
|
"enableChunkedEncode",
|
|
@@ -650,6 +652,7 @@ function resolveConfig(overrides) {
|
|
|
650
652
|
"HF_DE_WORKER_ENCODE",
|
|
651
653
|
DEFAULT_CONFIG.enableDrawElementWorkerEncode
|
|
652
654
|
),
|
|
655
|
+
useInPageEncode: envBool("HF_INPAGE_ENCODE", DEFAULT_CONFIG.useInPageEncode),
|
|
653
656
|
lowMemoryMode: resolveLowMemoryMode(),
|
|
654
657
|
enablePageSideCompositing: envBool(
|
|
655
658
|
"HF_PAGE_SIDE_COMPOSITING",
|
|
@@ -3802,6 +3805,9 @@ async function probeBeginFrameLiveness(page, timeoutMs, frameTimeTicks, interval
|
|
|
3802
3805
|
}
|
|
3803
3806
|
}
|
|
3804
3807
|
var lastFrameCache = /* @__PURE__ */ new WeakMap();
|
|
3808
|
+
function forgetBeginFrameCapture(page) {
|
|
3809
|
+
lastFrameCache.delete(page);
|
|
3810
|
+
}
|
|
3805
3811
|
var PENDING_FRAME_RETRIES = 5;
|
|
3806
3812
|
async function sendBeginFrame(client, params) {
|
|
3807
3813
|
for (let attempt = 0; ; attempt++) {
|
|
@@ -3831,13 +3837,24 @@ async function beginFrameCapture(page, options, frameTimeTicks, interval) {
|
|
|
3831
3837
|
quality: isPng ? void 0 : options.quality ?? 80,
|
|
3832
3838
|
optimizeForSpeed: true
|
|
3833
3839
|
};
|
|
3834
|
-
const
|
|
3840
|
+
const cached = lastFrameCache.get(page);
|
|
3841
|
+
let screenshotTicks = frameTimeTicks;
|
|
3842
|
+
if (cached) {
|
|
3843
|
+
const probe = await sendBeginFrame(client, { frameTimeTicks, interval });
|
|
3844
|
+
if (!probe.hasDamage) return { buffer: cached, hasDamage: false };
|
|
3845
|
+
screenshotTicks = frameTimeTicks + interval / 2;
|
|
3846
|
+
}
|
|
3847
|
+
const result = await sendBeginFrame(client, {
|
|
3848
|
+
frameTimeTicks: screenshotTicks,
|
|
3849
|
+
interval,
|
|
3850
|
+
screenshot,
|
|
3851
|
+
noDisplayUpdates: cached !== void 0
|
|
3852
|
+
});
|
|
3835
3853
|
let buffer;
|
|
3836
3854
|
if (result.screenshotData) {
|
|
3837
3855
|
buffer = Buffer.from(result.screenshotData, "base64");
|
|
3838
3856
|
lastFrameCache.set(page, buffer);
|
|
3839
3857
|
} else {
|
|
3840
|
-
const cached = lastFrameCache.get(page);
|
|
3841
3858
|
if (cached) {
|
|
3842
3859
|
buffer = cached;
|
|
3843
3860
|
} else {
|
|
@@ -7976,6 +7993,7 @@ async function captureFrameSurface(session, frameIndex, time, seekOptions, heldV
|
|
|
7976
7993
|
interval: session.beginFrameIntervalMs,
|
|
7977
7994
|
noDisplayUpdates: false
|
|
7978
7995
|
});
|
|
7996
|
+
forgetBeginFrameCapture(page);
|
|
7979
7997
|
session.beginFrameSeekPresented = true;
|
|
7980
7998
|
}
|
|
7981
7999
|
const result = await beginFrameCapture(
|
|
@@ -11342,14 +11360,29 @@ function buildStreamingArgs(options, outputPath, gpuEncoder = null, nvencPresets
|
|
|
11342
11360
|
return args;
|
|
11343
11361
|
}
|
|
11344
11362
|
async function spawnStreamingEncoder(outputPath, options, signal, config) {
|
|
11345
|
-
const outputDir = dirname3(outputPath);
|
|
11346
|
-
if (!existsSync6(outputDir)) mkdirSync3(outputDir, { recursive: true });
|
|
11347
11363
|
let gpuEncoder = null;
|
|
11348
11364
|
if (options.useGpu) {
|
|
11349
11365
|
gpuEncoder = await getCachedGpuEncoder();
|
|
11350
11366
|
}
|
|
11351
11367
|
const nvencPresets = gpuEncoder === "nvenc" ? await getCachedNvencPresets() : void 0;
|
|
11352
11368
|
const args = buildStreamingArgs(options, outputPath, gpuEncoder, nvencPresets);
|
|
11369
|
+
const checksJpeg = !options.rawInputFormat && (options.imageFormat ?? "jpeg") === "jpeg";
|
|
11370
|
+
return spawnFfmpegStream(outputPath, args, {
|
|
11371
|
+
signal,
|
|
11372
|
+
config,
|
|
11373
|
+
checkFrame: checksJpeg ? (frame, index) => {
|
|
11374
|
+
const error = jpegInputError(frame);
|
|
11375
|
+
if (error) throw new Error(`Invalid JPEG input at frame ${index}: ${error}`);
|
|
11376
|
+
} : void 0
|
|
11377
|
+
});
|
|
11378
|
+
}
|
|
11379
|
+
function spawnFfmpegStream(outputPath, args, {
|
|
11380
|
+
signal,
|
|
11381
|
+
config,
|
|
11382
|
+
checkFrame
|
|
11383
|
+
}) {
|
|
11384
|
+
const outputDir = dirname3(outputPath);
|
|
11385
|
+
if (!existsSync6(outputDir)) mkdirSync3(outputDir, { recursive: true });
|
|
11353
11386
|
const ffmpeg = spawn5(getFfmpegBinary(), args, {
|
|
11354
11387
|
stdio: ["pipe", "pipe", "pipe"],
|
|
11355
11388
|
// See runFfmpeg.ts: keeps a console window off the user's desktop on Windows.
|
|
@@ -11422,10 +11455,7 @@ async function spawnStreamingEncoder(outputPath, options, signal, config) {
|
|
|
11422
11455
|
return false;
|
|
11423
11456
|
}
|
|
11424
11457
|
const copy = Buffer.from(buffer);
|
|
11425
|
-
|
|
11426
|
-
const error = jpegInputError(copy);
|
|
11427
|
-
if (error) throw new Error(`Invalid JPEG input at frame ${inputFrameIndex}: ${error}`);
|
|
11428
|
-
}
|
|
11458
|
+
checkFrame?.(copy, inputFrameIndex);
|
|
11429
11459
|
const accepted = stdin.write(copy);
|
|
11430
11460
|
inputFrameIndex++;
|
|
11431
11461
|
if (accepted) {
|
|
@@ -11499,6 +11529,56 @@ FFmpeg stopped after ${streamingTimeout} ms without consuming a frame.` : "";
|
|
|
11499
11529
|
return encoder;
|
|
11500
11530
|
}
|
|
11501
11531
|
|
|
11532
|
+
// ../engine/src/services/chunkStreamingEncoder.ts
|
|
11533
|
+
var BT709_LIMITED = {
|
|
11534
|
+
primaries: 1,
|
|
11535
|
+
transfer: 1,
|
|
11536
|
+
matrix: 1,
|
|
11537
|
+
fullRange: false
|
|
11538
|
+
};
|
|
11539
|
+
function buildChunkStreamingArgs(options, outputPath) {
|
|
11540
|
+
const { primaries, transfer, matrix, fullRange } = options.colour ?? BT709_LIMITED;
|
|
11541
|
+
const vui = [
|
|
11542
|
+
`colour_primaries=${primaries}`,
|
|
11543
|
+
`transfer_characteristics=${transfer}`,
|
|
11544
|
+
`matrix_coefficients=${matrix}`,
|
|
11545
|
+
`video_full_range_flag=${fullRange ? 1 : 0}`
|
|
11546
|
+
].join(":");
|
|
11547
|
+
const args = ["-f", "h264", "-framerate", fpsToFfmpegArg(options.fps), "-i", "-"];
|
|
11548
|
+
args.push("-c:v", "copy", "-bsf:v", `h264_metadata=${vui}`);
|
|
11549
|
+
args.push(
|
|
11550
|
+
...["-colorspace:v", "bt709", "-color_primaries:v", "bt709", "-color_trc:v", "bt709"],
|
|
11551
|
+
...["-color_range", fullRange ? "pc" : "tv"],
|
|
11552
|
+
...["-video_track_timescale", "90000", "-avoid_negative_ts", "make_zero"]
|
|
11553
|
+
);
|
|
11554
|
+
appendRenderProvenanceArgs(args, outputPath);
|
|
11555
|
+
args.push("-y", outputPath);
|
|
11556
|
+
return args;
|
|
11557
|
+
}
|
|
11558
|
+
function spawnChunkStreamingEncoder(outputPath, options, signal, config) {
|
|
11559
|
+
return spawnFfmpegStream(outputPath, buildChunkStreamingArgs(options, outputPath), {
|
|
11560
|
+
signal,
|
|
11561
|
+
config
|
|
11562
|
+
});
|
|
11563
|
+
}
|
|
11564
|
+
|
|
11565
|
+
// ../engine/src/services/inPageEncodeEligibility.ts
|
|
11566
|
+
function resolveInPageEncode(input) {
|
|
11567
|
+
const blocker = [
|
|
11568
|
+
[!input.enabled, "disabled"],
|
|
11569
|
+
[input.captureMode !== "drawelement", "capture is not drawElement"],
|
|
11570
|
+
[input.format !== "mp4", "output is not mp4"],
|
|
11571
|
+
[input.codec !== "h264", "codec is not h264"],
|
|
11572
|
+
[input.hdr, "hdr"],
|
|
11573
|
+
[input.transparent, "transparent"],
|
|
11574
|
+
[input.workers !== 1, "parallel workers"],
|
|
11575
|
+
[input.hls, "hls"],
|
|
11576
|
+
[input.videoLayer, "video layer passthrough"],
|
|
11577
|
+
[!input.encoderSupported, "page encoder unsupported"]
|
|
11578
|
+
].find(([blocked]) => blocked);
|
|
11579
|
+
return blocker ? { eligible: false, reason: blocker[1] } : { eligible: true };
|
|
11580
|
+
}
|
|
11581
|
+
|
|
11502
11582
|
// ../core/dist/audioGroups.js
|
|
11503
11583
|
var HF_AUDIO_GROUP_TAG = "hf-audio-group";
|
|
11504
11584
|
var HF_AUDIO_GROUP_ATTR = "data-audio-group";
|
|
@@ -19399,6 +19479,7 @@ export {
|
|
|
19399
19479
|
augmentPageNavigationTimeoutError,
|
|
19400
19480
|
isPageNavigationTimeoutError,
|
|
19401
19481
|
forcePreservedDrawingBuffer,
|
|
19482
|
+
holdRenderFrameVideos,
|
|
19402
19483
|
DrawElementCaptureError,
|
|
19403
19484
|
isDrawElementCaptureError,
|
|
19404
19485
|
decodePng,
|
|
@@ -19445,6 +19526,7 @@ export {
|
|
|
19445
19526
|
buildZeroDurationDiagnostic,
|
|
19446
19527
|
evaluateHfDiagnostic,
|
|
19447
19528
|
waitForImagesReady,
|
|
19529
|
+
applyVideoMetadataHints,
|
|
19448
19530
|
VfxFailureError,
|
|
19449
19531
|
initializeSession,
|
|
19450
19532
|
captureFrame,
|
|
@@ -19523,6 +19605,10 @@ export {
|
|
|
19523
19605
|
applyFaststart,
|
|
19524
19606
|
createFrameReorderBuffer,
|
|
19525
19607
|
spawnStreamingEncoder,
|
|
19608
|
+
BT709_LIMITED,
|
|
19609
|
+
buildChunkStreamingArgs,
|
|
19610
|
+
spawnChunkStreamingEncoder,
|
|
19611
|
+
resolveInPageEncode,
|
|
19526
19612
|
HF_AUDIO_GROUP_TAG,
|
|
19527
19613
|
HF_AUDIO_GROUP_ATTR,
|
|
19528
19614
|
isSelfOrAncestorHidden,
|