hyperframes 0.9.5 → 0.9.6

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.
Files changed (212) hide show
  1. package/dist/{add-XI5CW2YO.js → add-FI2ERBMZ.js} +11 -11
  2. package/dist/{agentPromptGenerator-EEP7CJRK.js → agentPromptGenerator-DZTXHJV3.js} +5 -5
  3. package/dist/{animatedGifPrep-3VKPC32B.js → animatedGifPrep-GXQA4KCD.js} +5 -5
  4. package/dist/api.d.ts +2 -0
  5. package/dist/api.js +19 -19
  6. package/dist/{asset-RYVHIREA.js → asset-BRSG6JNL.js} +2 -2
  7. package/dist/{assetCataloger-MG3GSWNQ.js → assetCataloger-KVWF4SRK.js} +6 -6
  8. package/dist/{audio-CNKU2KQR.js → audio-BVZOX6LU.js} +502 -143
  9. package/dist/{auth-MX2SGZQH.js → auth-HFFN7USX.js} +2 -2
  10. package/dist/{autoUpdate-MB3SWOXG.js → autoUpdate-JNGMUXLZ.js} +2 -2
  11. package/dist/{backgroundChecks-TYCDOGQX.js → backgroundChecks-O4ADPXOL.js} +3 -3
  12. package/dist/backgroundChecksWorker.js +3 -3
  13. package/dist/{batchRender-PHXZBVEA.js → batchRender-A2HW6QW7.js} +3 -3
  14. package/dist/{beats-5SXSGNUM.js → beats-F7Q3G6VW.js} +7 -7
  15. package/dist/{benchmark-V5Y5OQ3W.js → benchmark-4BDMIYTW.js} +8 -8
  16. package/dist/{billing-FFWAEIQ6.js → billing-35NVMZWK.js} +1 -1
  17. package/dist/{browser-CJ2HDBEC.js → browser-S6ADXSB7.js} +3 -3
  18. package/dist/{bundleWithLocalizedFonts-2FPP3MMD.js → bundleWithLocalizedFonts-EE27EYEU.js} +2 -2
  19. package/dist/{capture-424KH55L.js → capture-CXDJO524.js} +18 -18
  20. package/dist/{capture-KE3474CJ.js → capture-LWWBL6SH.js} +3 -3
  21. package/dist/{captureCompositionFrame-ZPZCQTYL.js → captureCompositionFrame-BB2ZGM6R.js} +10 -10
  22. package/dist/{catalog-3S4LAGZH.js → catalog-RQ6HIUBG.js} +11 -11
  23. package/dist/{catch-up-7ZLNBOG4.js → catch-up-PBAXR7FI.js} +4 -4
  24. package/dist/{check-6OCBPXX5.js → check-O4V4UWE3.js} +35 -35
  25. package/dist/{checkAudio-O5RDEOEX.js → checkAudio-EUT3AO3L.js} +8 -8
  26. package/dist/{checkBrowser-DJPH634D.js → checkBrowser-QQUBR4QI.js} +29 -29
  27. package/dist/{chunk-GC2GKCRQ.js → chunk-27AVZR7K.js} +17 -17
  28. package/dist/{chunk-JZJ3LLIO.js → chunk-2FNUCIHD.js} +1 -1
  29. package/dist/{chunk-ARNCWQNR.js → chunk-2KO357TJ.js} +1 -1
  30. package/dist/chunk-2KYY75JP.js +134 -0
  31. package/dist/{chunk-KLJEGC6M.js → chunk-3SB24TVT.js} +1 -1
  32. package/dist/{chunk-BXE6GDIL.js → chunk-44T2V4EW.js} +1 -1
  33. package/dist/{chunk-MX7NW3QW.js → chunk-47IBOMXH.js} +3 -3
  34. package/dist/{chunk-JDT5PZWS.js → chunk-4E7G2GME.js} +1 -1
  35. package/dist/{chunk-CRDXU4IX.js → chunk-4III3SDC.js} +9 -9
  36. package/dist/{chunk-CS6UO5NC.js → chunk-4VOK22DG.js} +1 -1
  37. package/dist/{chunk-TI4JPSFS.js → chunk-5BCFV2HE.js} +3 -3
  38. package/dist/{chunk-5T2D2XYR.js → chunk-6GZB32Q5.js} +1 -1
  39. package/dist/{chunk-HWIGWPIG.js → chunk-6JMNJYYR.js} +1 -1
  40. package/dist/{chunk-HDKRDALC.js → chunk-6UOHLXVU.js} +2 -2
  41. package/dist/{chunk-MGXQXY4C.js → chunk-7DKGU6CY.js} +2 -2
  42. package/dist/{chunk-WAQX3AYB.js → chunk-AB3ZXWI3.js} +1 -1
  43. package/dist/{chunk-5TBRPDH3.js → chunk-APVBITVZ.js} +55 -16
  44. package/dist/{chunk-XXFWK5Y7.js → chunk-BIJBGCF4.js} +1 -1
  45. package/dist/{chunk-ALBHEVJJ.js → chunk-BMRZP6X6.js} +1 -1
  46. package/dist/{chunk-YGSQABOD.js → chunk-BQQTZET2.js} +2 -2
  47. package/dist/{chunk-VPVO5COM.js → chunk-BUDP4GF4.js} +1 -1
  48. package/dist/{chunk-QIFINY2N.js → chunk-C47ZGVKT.js} +7 -7
  49. package/dist/{chunk-ZFQ4N6D2.js → chunk-CUAZHDVV.js} +3 -3
  50. package/dist/{chunk-TWIPYH4G.js → chunk-DETBSOYO.js} +1 -1
  51. package/dist/{chunk-C555UZ5B.js → chunk-DUSSDJJC.js} +2 -2
  52. package/dist/{chunk-NRO2PLEC.js → chunk-E2VWKW2A.js} +2 -2
  53. package/dist/{chunk-IWMVCOUX.js → chunk-FB366S4I.js} +5 -5
  54. package/dist/{chunk-6447ORC2.js → chunk-FDZXVTBY.js} +1 -1
  55. package/dist/{chunk-JAYAOI3W.js → chunk-FIIFME5M.js} +1 -1
  56. package/dist/{chunk-JX5GUEFA.js → chunk-FM7VWSN3.js} +1 -1
  57. package/dist/{chunk-MYTROPEC.js → chunk-FP37FSOT.js} +2 -2
  58. package/dist/{chunk-64OUBJSX.js → chunk-G4VDT5D7.js} +1 -1
  59. package/dist/{chunk-EG2ESF6S.js → chunk-GKVERDJ2.js} +1 -1
  60. package/dist/{chunk-CGXL36FR.js → chunk-GP7OHHXR.js} +1 -1
  61. package/dist/{chunk-KW2ZREKY.js → chunk-GR3LU4D5.js} +1 -1
  62. package/dist/{chunk-6PLIPRVQ.js → chunk-GYPSZFRF.js} +2 -2
  63. package/dist/{chunk-7FERR4YN.js → chunk-HTTGTROQ.js} +1 -1
  64. package/dist/{chunk-PMQ65BTY.js → chunk-I2OMLFBJ.js} +1 -1
  65. package/dist/{chunk-7XCGHD55.js → chunk-I47SIQGX.js} +4 -4
  66. package/dist/{chunk-PYOEIKGI.js → chunk-IG3GSBHB.js} +2 -2
  67. package/dist/{chunk-46DXV7OQ.js → chunk-IVFZG3CU.js} +2 -2
  68. package/dist/{chunk-HZMM3D6P.js → chunk-JFIBO4CZ.js} +1 -1
  69. package/dist/{chunk-2RLI5ISA.js → chunk-JLKEXS4I.js} +2 -2
  70. package/dist/{chunk-SXKFFBN3.js → chunk-JLLNDU2F.js} +84 -8
  71. package/dist/{chunk-JAJ6PAR6.js → chunk-KAWNVSAE.js} +7 -7
  72. package/dist/{chunk-5FAU3XAO.js → chunk-KJDQS24S.js} +2 -2
  73. package/dist/{chunk-SBPDYU34.js → chunk-KJLZZ4MY.js} +1 -1
  74. package/dist/{chunk-MCROAQ7A.js → chunk-KXAGCBVO.js} +8 -8
  75. package/dist/{chunk-HMMHCSSN.js → chunk-L6MNWJTL.js} +1 -1
  76. package/dist/{chunk-HZDSKYTV.js → chunk-LS4CCRTK.js} +1 -1
  77. package/dist/{chunk-Y6TDJUHR.js → chunk-M4WEGGF7.js} +2 -2
  78. package/dist/{chunk-UL3SKAZB.js → chunk-ODKXNWDL.js} +2 -2
  79. package/dist/{chunk-6U4EV64B.js → chunk-P5GOQDA2.js} +8 -8
  80. package/dist/{chunk-MBOZUQFZ.js → chunk-PWYAOU4I.js} +1 -1
  81. package/dist/{chunk-RTUQDHKE.js → chunk-QDB7EFLI.js} +94 -10
  82. package/dist/{chunk-YK6ERJTN.js → chunk-RYNMIBZM.js} +2 -2
  83. package/dist/{chunk-YPBGUVLY.js → chunk-SAWXMCHB.js} +1 -1
  84. package/dist/{chunk-NUGADGXQ.js → chunk-SWWDVPVO.js} +1 -1
  85. package/dist/{chunk-RW4DTMPK.js → chunk-T57ARBNR.js} +7 -7
  86. package/dist/{chunk-44IJ426Z.js → chunk-TIXW6JWD.js} +1 -1
  87. package/dist/chunk-TNWWLO4T.js +5030 -0
  88. package/dist/{chunk-M56MEMPF.js → chunk-TS4HYR6I.js} +1 -1
  89. package/dist/{chunk-FEC4UQK2.js → chunk-VFOCEFRZ.js} +5 -5
  90. package/dist/{chunk-K4SINZFP.js → chunk-VG4JPJMI.js} +2 -2
  91. package/dist/{chunk-MNW4FTAJ.js → chunk-VWRIARRR.js} +12 -12
  92. package/dist/{chunk-T46SP3UD.js → chunk-W3G7DNCR.js} +2 -2
  93. package/dist/{chunk-WAK6IPMP.js → chunk-WCET3OHQ.js} +4 -4
  94. package/dist/{chunk-5FFHLOVF.js → chunk-XC3LDNBH.js} +1 -1
  95. package/dist/{chunk-JD7MLLJD.js → chunk-YDG5LVIK.js} +4 -4
  96. package/dist/{chunk-NVPB37H4.js → chunk-YFISKULK.js} +2 -2
  97. package/dist/{chunk-S5SVW6ZY.js → chunk-YIWNZ2CI.js} +13 -13
  98. package/dist/{chunk-WTUIK6Y4.js → chunk-YOZPHSYV.js} +2 -0
  99. package/dist/{chunk-DRXVRDUX.js → chunk-YUMVQB2F.js} +1 -1
  100. package/dist/{chunk-RUZ63CJF.js → chunk-YVUOJW4H.js} +1 -1
  101. package/dist/{chunk-4W2ZN4HT.js → chunk-YY7YI2FW.js} +1 -1
  102. package/dist/{chunk-3B3LGZ36.js → chunk-ZP3LPFTA.js} +9 -9
  103. package/dist/{chunk-Q2LWMJAQ.js → chunk-ZR2GMFNH.js} +2 -2
  104. package/dist/{chunk-H7KAHDJJ.js → chunk-ZV5GD5LV.js} +3 -3
  105. package/dist/{clean-ZKPZ4HHG.js → clean-2AFJGFIG.js} +15 -15
  106. package/dist/cli.js +58 -57
  107. package/dist/{cloud-GQZYBRBI.js → cloud-JM5MFMVV.js} +4 -4
  108. package/dist/{cloudrun-TWSNNKIV.js → cloudrun-PNVETMPA.js} +4 -4
  109. package/dist/{compare-3IXL3WVG.js → compare-ST4DXEMX.js} +26 -26
  110. package/dist/{compiler-SKQTN3EA.js → compiler-UCX3MZVN.js} +2 -2
  111. package/dist/{component-RV72K74J.js → component-ECFJIDUD.js} +3 -3
  112. package/dist/{compositions-W2IKF36U.js → compositions-ZCAD47PD.js} +9 -9
  113. package/dist/{curve-TRCKVHYB.js → curve-NYXZWGPO.js} +9 -9
  114. package/dist/{cuts-SRXTGX33.js → cuts-CKUCNNOX.js} +10 -10
  115. package/dist/{delete-7PZLZFBE.js → delete-MVGSOWSC.js} +2 -2
  116. package/dist/{deploy-GORJQIPX.js → deploy-WBKPSWPG.js} +4 -4
  117. package/dist/{describeProject-ZIFVZUSV.js → describeProject-ZDI5B6JO.js} +6 -6
  118. package/dist/{diff-PHRMVJMC.js → diff-3UYDXIEZ.js} +21 -21
  119. package/dist/{dist-4KKPG6A5.js → dist-XRAW3URT.js} +2 -2
  120. package/dist/{doctor-C6Q2FECX.js → doctor-A4HMMBII.js} +9 -9
  121. package/dist/{energy-CNXVSSE6.js → energy-RN6KTYH6.js} +10 -10
  122. package/dist/{events-FSUH46NR.js → events-6NE2NRCQ.js} +12 -12
  123. package/dist/{events-27C4TXPP.js → events-AO3FEPL3.js} +3 -3
  124. package/dist/{events-UG3LC2PB.js → events-LSEMS2LO.js} +2 -2
  125. package/dist/{extract-GLPADLLV.js → extract-6UO4QR77.js} +10 -10
  126. package/dist/{face-TTOHRJEY.js → face-FTKPGC2O.js} +10 -10
  127. package/dist/{feedback-BYONPSSM.js → feedback-GSKVBGA7.js} +6 -6
  128. package/dist/{ffmpeg-WAM27CD6.js → ffmpeg-HPMQUKY4.js} +5 -5
  129. package/dist/{figma-Y4UR2EDE.js → figma-UIWB3XSX.js} +3 -3
  130. package/dist/fontLocalizeCli.js +8 -8
  131. package/dist/{frames-CNQUJEUV.js → frames-U3LLSXSV.js} +11 -11
  132. package/dist/{generate-BPYDIEPB.js → generate-AFCKBHGB.js} +13 -13
  133. package/dist/{get-4LY5VJW2.js → get-J3TJCAZW.js} +2 -2
  134. package/dist/{gpuPolicy-OUHJ7GVX.js → gpuPolicy-W2OEEW7Y.js} +5 -5
  135. package/dist/{grade-compare-WEZBE3WM.js → grade-compare-AOXNJ53Z.js} +27 -27
  136. package/dist/{heifImagePrep-7L4HH33F.js → heifImagePrep-4RSVCLPX.js} +6 -6
  137. package/dist/{help-QKNWJOBV.js → help-5NYIBLJJ.js} +2 -1
  138. package/dist/{history-XQEWP2IW.js → history-KAXYCLVT.js} +6 -6
  139. package/dist/hyperframe.manifest.json +1 -1
  140. package/dist/hyperframe.runtime.iife.js +64 -64
  141. package/dist/hyperframes-player.global.js +90 -3
  142. package/dist/{info-AMRQ5R4N.js → info-Z6KNUMH6.js} +7 -7
  143. package/dist/{init-4VTMKZSQ.js → init-GSMXQX3U.js} +30 -27
  144. package/dist/{ink-KB3LZMJY.js → ink-IPPBJFH3.js} +10 -10
  145. package/dist/{inspect-ZWN2DVO4.js → inspect-MXIGEN6Z.js} +27 -27
  146. package/dist/{installer-2NUMLKHQ.js → installer-JXI2JC3T.js} +4 -4
  147. package/dist/{keyframes-I456RFGP.js → keyframes-Z53YGH5F.js} +6 -6
  148. package/dist/{lambda-2QKB4BJM.js → lambda-KD7ZRYVK.js} +9 -9
  149. package/dist/{layout-WPHWXQCM.js → layout-NLDWEPDQ.js} +27 -27
  150. package/dist/{lint-EO5DXJ36.js → lint-MSZMGQO5.js} +6 -6
  151. package/dist/{list-LZOUUJBY.js → list-OLNBKKB4.js} +2 -2
  152. package/dist/{localPage-SZWQWWJ7.js → localPage-BQ2LKHED.js} +5 -5
  153. package/dist/{login-IEWPNTGD.js → login-TBJVG5PZ.js} +4 -4
  154. package/dist/{look-6L3CPY4H.js → look-T5V6JBD5.js} +10 -10
  155. package/dist/{manager-C7677YAV.js → manager-FHVSGJNR.js} +6 -6
  156. package/dist/{measure-TINTS6YY.js → measure-KI3XY2MJ.js} +11 -11
  157. package/dist/{media-treatment-3BDHM4P6.js → media-treatment-UZI55RS3.js} +11 -11
  158. package/dist/{media-use-JC2B2JSE.js → media-use-2PIPVWX4.js} +1 -1
  159. package/dist/{models-JMM25YO6.js → models-MV4HBZKZ.js} +9 -9
  160. package/dist/{motionShot-4WB3SH6V.js → motionShot-A3TWOBRE.js} +13 -13
  161. package/dist/{normalize-audio-2ZJKR5G3.js → normalize-audio-37WYHLP4.js} +8 -8
  162. package/dist/{open-LMYSLYH2.js → open-4PPPV45S.js} +11 -11
  163. package/dist/{parakeetRunner-HTQVLX2B.js → parakeetRunner-J22MMWSM.js} +10 -10
  164. package/dist/{pipeline-FMVCPIRU.js → pipeline-GE4LBTRO.js} +8 -8
  165. package/dist/{play-GFHBG3NZ.js → play-MZSW7GIL.js} +18 -18
  166. package/dist/{preflight-L5GC6ASI.js → preflight-NXMN7P4B.js} +6 -6
  167. package/dist/{present-PW3RWNWF.js → present-TWZLASXI.js} +14 -14
  168. package/dist/{preview-IRLHPLSD.js → preview-OEXP2RPO.js} +16 -16
  169. package/dist/probe-HNAD6ACH.js +69 -0
  170. package/dist/{producer-M6IWCFMK.js → producer-E4AN4ADM.js} +1 -1
  171. package/dist/{projectConfig-IVJE7A42.js → projectConfig-HKWVTV5Q.js} +10 -6
  172. package/dist/{publication-BS2YATIF.js → publication-DTIE7G2E.js} +2 -2
  173. package/dist/{publish-OTRA2JWM.js → publish-CUU5W6CP.js} +8 -8
  174. package/dist/{remove-background-UV37Y7T7.js → remove-background-2MRQ3YH4.js} +9 -9
  175. package/dist/{render-XSDVVBEY.js → render-EEIQAOGV.js} +34 -15
  176. package/dist/{render-3FANM5MO.js → render-JP6JUXWP.js} +5 -5
  177. package/dist/{render-7VBLI4AZ.js → render-QRWGJUCD.js} +30 -30
  178. package/dist/{render-batch-DPWJHKFY.js → render-batch-46SYPMYV.js} +5 -5
  179. package/dist/{resolver-VQ32ZH6Y.js → resolver-DPRCISSD.js} +4 -4
  180. package/dist/reverse-MY6DSOXL.js +32 -0
  181. package/dist/{run-MTGSR5HH.js → run-2VGZ3URU.js} +1 -1
  182. package/dist/{sherpa-BSIBIIIO.js → sherpa-5LOEXZ46.js} +9 -9
  183. package/dist/{skills-S7JNBPZZ.js → skills-BBHR4SHX.js} +5 -5
  184. package/dist/{skillsUpdateCheck-WFEV6VYU.js → skillsUpdateCheck-HBOVCIXG.js} +3 -3
  185. package/dist/{snapshot-NCWXYS2E.js → snapshot-S264O54Z.js} +31 -31
  186. package/dist/{src-AYBT7IBT.js → src-G2EK32ZO.js} +7 -7
  187. package/dist/{src-7WW3KXOI.js → src-GLO4X3WA.js} +12 -4
  188. package/dist/start-6AFMEXPO.js +226 -0
  189. package/dist/{staticProjectServer-VYZV4BSU.js → staticProjectServer-KWSV5IRS.js} +16 -16
  190. package/dist/{status-Z5BPMROD.js → status-5ZRM4R4N.js} +1 -1
  191. package/dist/studio/assets/hyperframes-player-CGO8wE5a.js +565 -0
  192. package/dist/studio/assets/{index-BohL7wdo.js → index-COtefOSM.js} +1 -1
  193. package/dist/studio/assets/{index-CTbhykVD.js → index-DHPJjAUV.js} +4 -4
  194. package/dist/studio/index.html +1 -1
  195. package/dist/{studio-api-OTNMLH4B.js → studio-api-JJO6VEFD.js} +8 -8
  196. package/dist/{studioServer-AA4B3YP7.js → studioServer-YFZIESIH.js} +45 -45
  197. package/dist/{sync-3M7VO3UJ.js → sync-DBMNZ32Z.js} +10 -10
  198. package/dist/{telemetry-VJ3A6ZMD.js → telemetry-OPZTKPDG.js} +3 -3
  199. package/dist/{timeline-ZLZ45W7F.js → timeline-MCJUCDME.js} +16 -16
  200. package/dist/{tokens-WXEJNNJV.js → tokens-3DREMPWC.js} +2 -2
  201. package/dist/{transcribe-PPH5H67E.js → transcribe-AU7TPKMU.js} +8 -8
  202. package/dist/{transcribe-XMVXOBHM.js → transcribe-TMGPK6FM.js} +17 -17
  203. package/dist/{updateCheck-HDLNWLIC.js → updateCheck-YKTRFFFV.js} +2 -2
  204. package/dist/{upgrade-6UXVTJII.js → upgrade-UAKM3KAT.js} +2 -2
  205. package/dist/{urlDownloader-DPN2KRCX.js → urlDownloader-77YL7TXO.js} +4 -4
  206. package/dist/{validate-BZOURM4G.js → validate-SR35R3QM.js} +21 -21
  207. package/dist/{video-BE42DAT2.js → video-GNMQTE4D.js} +6 -6
  208. package/dist/warmCheck.js +35 -35
  209. package/package.json +1 -1
  210. package/dist/chunk-2YQ2XYO5.js +0 -5030
  211. package/dist/probe-FPHFC3SD.js +0 -179
  212. package/dist/studio/assets/hyperframes-player-Cum4k6V2.js +0 -478
@@ -20,13 +20,13 @@ import {
20
20
  findFFmpeg,
21
21
  findFFprobe,
22
22
  getFFmpegInstallHint
23
- } from "./chunk-MBOZUQFZ.js";
23
+ } from "./chunk-PWYAOU4I.js";
24
24
  import {
25
25
  formatBytes
26
26
  } from "./chunk-5LOZWO2M.js";
27
27
  import {
28
28
  parseAnimatedGifMetadata
29
- } from "./chunk-HWIGWPIG.js";
29
+ } from "./chunk-6JMNJYYR.js";
30
30
  import {
31
31
  cleanAssetUrl,
32
32
  isRemoteOrInlineUrl,
@@ -49,11 +49,14 @@ import {
49
49
  import { execFile } from "child_process";
50
50
  import { createHash } from "crypto";
51
51
  import {
52
+ closeSync,
52
53
  copyFileSync,
53
54
  createReadStream,
54
55
  mkdirSync,
55
56
  mkdtempSync,
57
+ openSync,
56
58
  readFileSync,
59
+ readSync,
57
60
  renameSync,
58
61
  rmSync,
59
62
  writeFileSync
@@ -62,6 +65,33 @@ import { tmpdir } from "os";
62
65
  import { basename as basename2, dirname, extname, join, posix, relative, resolve } from "path";
63
66
  import { promisify } from "util";
64
67
 
68
+ // src/cloud/offloadSniff.ts
69
+ function bytesMatchExtension(ext, head) {
70
+ const at = (offset, text) => head.toString("latin1", offset, offset + text.length) === text;
71
+ switch (ext) {
72
+ case ".mp3":
73
+ return at(0, "ID3") || head[0] === 255 && ((head[1] ?? 0) & 230) === 226;
74
+ case ".wav":
75
+ return at(0, "RIFF") && at(8, "WAVE");
76
+ case ".webp":
77
+ return at(0, "RIFF") && at(8, "WEBP");
78
+ case ".png":
79
+ return head.subarray(0, 4).equals(Buffer.from([137, 80, 78, 71]));
80
+ case ".jpg":
81
+ case ".jpeg":
82
+ return head[0] === 255 && head[1] === 216 && head[2] === 255;
83
+ case ".webm":
84
+ return head.subarray(0, 4).equals(Buffer.from([26, 69, 223, 163]));
85
+ case ".mov":
86
+ return ["ftyp", "moov", "mdat", "wide", "free"].some((box) => at(4, box));
87
+ case ".mp4":
88
+ case ".m4v":
89
+ return at(4, "ftyp") && !at(8, "M4A ") && !at(8, "M4B ") && !at(8, "M4P ");
90
+ default:
91
+ return false;
92
+ }
93
+ }
94
+
65
95
  // src/cloud/offloadTrim.ts
66
96
  import { basename } from "path";
67
97
  var TRIM_MARGIN_SECONDS = 0.5;
@@ -419,7 +449,33 @@ async function trimGrid(sourcePath, kind) {
419
449
  const fps = rate(real);
420
450
  return Number.isFinite(fps) && Math.abs(fps - rate(average)) < 0.01 ? fps : null;
421
451
  }
422
- var ffmpegReencoder = { choose: choosePreset, trimGrid, run: ffmpegReencode };
452
+ async function hasVideoStream(sourcePath) {
453
+ const ffprobe = findFFprobe();
454
+ if (!ffprobe) return true;
455
+ try {
456
+ const { stdout } = await execFileAsync(ffprobe, [
457
+ "-v",
458
+ "error",
459
+ "-select_streams",
460
+ "v:0",
461
+ "-show_entries",
462
+ "stream=codec_type",
463
+ "-of",
464
+ "csv=p=0",
465
+ "--",
466
+ sourcePath
467
+ ]);
468
+ return stdout.trim() !== "";
469
+ } catch {
470
+ return true;
471
+ }
472
+ }
473
+ var ffmpegReencoder = {
474
+ choose: choosePreset,
475
+ trimGrid,
476
+ hasVideo: hasVideoStream,
477
+ run: ffmpegReencode
478
+ };
423
479
  async function stagedSha256(file) {
424
480
  if (Buffer.isBuffer(file)) return createHash("sha256").update(file).digest("hex");
425
481
  const hash = createHash("sha256");
@@ -465,19 +521,39 @@ function assertFitsAsset(path, filename, size) {
465
521
  );
466
522
  }
467
523
  }
524
+ function readHead(file) {
525
+ if (Buffer.isBuffer(file)) return file.subarray(0, 16);
526
+ const fd = openSync(file.absPath, "r");
527
+ try {
528
+ const head = Buffer.alloc(16);
529
+ readSync(fd, head, 0, 16, 0);
530
+ return head;
531
+ } finally {
532
+ closeSync(fd);
533
+ }
534
+ }
468
535
  async function planFile(ctx, path, file) {
469
- const kind = mediaKind(path);
536
+ let kind = mediaKind(path);
470
537
  const size = stagedSize(file);
471
538
  if (!kind || size < OFFLOAD_MIN_BYTES) return null;
472
- const accepted = ACCEPTED[extname(path).toLowerCase()];
473
- const asIs = accepted !== void 0 && size <= accepted.maxBytes;
539
+ const ext = extname(path).toLowerCase();
540
+ const accepted = ACCEPTED[ext];
541
+ let asIs = accepted !== void 0 && size <= accepted.maxBytes && bytesMatchExtension(ext, readHead(file));
542
+ let sourcePath;
543
+ if (kind === "video" && ctx.reencoder.hasVideo) {
544
+ sourcePath = snapshotPath(path, file, ctx.tempFiles);
545
+ if (!await ctx.reencoder.hasVideo(sourcePath)) {
546
+ kind = "audio";
547
+ asIs = false;
548
+ }
549
+ }
474
550
  const mayBeCached = ctx.opts.upload !== void 0 || (asIs ? ctx.cachedSizes.has(size) : ctx.cachedSizes.size > 0);
475
551
  const sha256 = mayBeCached ? await stagedSha256(file) : void 0;
476
552
  const keyFor = (variant2) => sha256 && `${ctx.opts.apiBaseUrl} ${sha256} ${variant2}`;
477
553
  if (asIs) {
478
554
  return { key: keyFor("as-is"), sourcePath: "", contentType: accepted?.contentType };
479
555
  }
480
- const sourcePath = snapshotPath(path, file, ctx.tempFiles);
556
+ sourcePath ??= snapshotPath(path, file, ctx.tempFiles);
481
557
  const preset = await ctx.reencoder.choose(sourcePath, kind);
482
558
  if (!preset) return null;
483
559
  const segments = kind === "image" ? null : await planFileTrim(ctx, path, sourcePath, kind);
@@ -543,7 +619,7 @@ async function prepareEntryGifs(ctx, fileMap) {
543
619
  if (!html || !/\.gif\b/i.test(html)) return;
544
620
  const sourceAssets = entryGifSources(ctx, entryPath, html);
545
621
  if (!sourceAssets) return;
546
- const prep = ctx.opts.gifPrep ?? (await import("./src-AYBT7IBT.js")).prepareAnimatedGifInputs;
622
+ const prep = ctx.opts.gifPrep ?? (await import("./src-G2EK32ZO.js")).prepareAnimatedGifInputs;
547
623
  const outputDir = mkdtempSync(join(tmpdir(), "hf-offload-gif-"));
548
624
  ctx.tempFiles.push(outputDir);
549
625
  const result = await prep(html, {
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  getMimeType,
9
9
  injectMediaCodecMapIntoHtml
10
- } from "./chunk-6U4EV64B.js";
10
+ } from "./chunk-P5GOQDA2.js";
11
11
  import {
12
12
  PROXY_VARIANT_CONFIG,
13
13
  ProxyCapacityError,
@@ -18,26 +18,26 @@ import {
18
18
  recordProxyRequest,
19
19
  resolveProxy,
20
20
  resolveProxyVariantRequest
21
- } from "./chunk-T46SP3UD.js";
21
+ } from "./chunk-W3G7DNCR.js";
22
22
  import {
23
23
  findStageProxyBox
24
- } from "./chunk-KW2ZREKY.js";
24
+ } from "./chunk-GR3LU4D5.js";
25
25
  import {
26
26
  resolveAutoProxy
27
- } from "./chunk-5TBRPDH3.js";
27
+ } from "./chunk-APVBITVZ.js";
28
28
  import {
29
29
  openRangeEnd
30
30
  } from "./chunk-VEIGTKYZ.js";
31
31
  import {
32
32
  listenOnBrowserSafePort
33
- } from "./chunk-RTUQDHKE.js";
33
+ } from "./chunk-QDB7EFLI.js";
34
34
  import {
35
35
  stripSdrPngColourTags
36
- } from "./chunk-HZMM3D6P.js";
36
+ } from "./chunk-JFIBO4CZ.js";
37
37
  import {
38
38
  PREVIEW_PROXY_BOX_PARAM,
39
39
  parsePreviewProxyBox
40
- } from "./chunk-HWIGWPIG.js";
40
+ } from "./chunk-6JMNJYYR.js";
41
41
  import {
42
42
  decodeWellFormedEscapes
43
43
  } from "./chunk-C2KEGBR3.js";
@@ -21,10 +21,10 @@ import {
21
21
  emitWords,
22
22
  getPreparedWavDurationSeconds,
23
23
  prepareWav
24
- } from "./chunk-MX7NW3QW.js";
24
+ } from "./chunk-47IBOMXH.js";
25
25
  import {
26
26
  stoppedByCancelSignal
27
- } from "./chunk-44IJ426Z.js";
27
+ } from "./chunk-TIXW6JWD.js";
28
28
  import {
29
29
  verifies
30
30
  } from "./chunk-RZ6CXJ56.js";
@@ -11,7 +11,7 @@ import {
11
11
  distroLabel,
12
12
  getFFmpegInstallHint,
13
13
  parseLddMissingLibs
14
- } from "./chunk-MBOZUQFZ.js";
14
+ } from "./chunk-PWYAOU4I.js";
15
15
  import {
16
16
  ensureBrowser,
17
17
  findBrowser
@@ -8,12 +8,12 @@ import {
8
8
  Semaphore,
9
9
  prepareHeifImageInputs,
10
10
  withMediaProbeSlot
11
- } from "./chunk-MGXQXY4C.js";
11
+ } from "./chunk-7DKGU6CY.js";
12
12
  import {
13
13
  EncoderInterruptedError,
14
14
  encoderFailureError,
15
15
  prepareAnimatedGifInputs
16
- } from "./chunk-YGSQABOD.js";
16
+ } from "./chunk-BQQTZET2.js";
17
17
  import {
18
18
  GENERIC_FAMILIES,
19
19
  collectFontFamilyCustomProperties,
@@ -185,7 +185,7 @@ import {
185
185
  videoAudioId,
186
186
  videoStartOnMediaTimeline,
187
187
  writeCapturedFrame
188
- } from "./chunk-RTUQDHKE.js";
188
+ } from "./chunk-QDB7EFLI.js";
189
189
  import {
190
190
  assignBundledRuntimeCompositionIds,
191
191
  emitMountedModuleScripts,
@@ -197,7 +197,7 @@ import {
197
197
  parsesAsScript,
198
198
  prepareFlattenedInnerRoot,
199
199
  stripSdrPngColourTags
200
- } from "./chunk-HZMM3D6P.js";
200
+ } from "./chunk-JFIBO4CZ.js";
201
201
  import {
202
202
  collectScratchLeftovers,
203
203
  removeScratch,
@@ -216,7 +216,7 @@ import {
216
216
  parseVfxChain,
217
217
  resolveAuthoredTimingWindow,
218
218
  toFps
219
- } from "./chunk-HWIGWPIG.js";
219
+ } from "./chunk-6JMNJYYR.js";
220
220
  import {
221
221
  gsapCdnDist,
222
222
  normalizeGsapBaseUrl
@@ -255,7 +255,7 @@ import {
255
255
  sourceTimeAt,
256
256
  styleElementsFor,
257
257
  timeAtSourceTime
258
- } from "./chunk-2YQ2XYO5.js";
258
+ } from "./chunk-TNWWLO4T.js";
259
259
  import {
260
260
  TRANSITIONS,
261
261
  convertTransfer,
@@ -16893,7 +16893,7 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
16893
16893
  if (probeResult.fileServer) closeFileServerSafely(probeResult.fileServer, "plan", log);
16894
16894
  if (probeResult.probeSession) {
16895
16895
  try {
16896
- const { closeCaptureSession: closeCaptureSession2 } = await import("./src-7WW3KXOI.js");
16896
+ const { closeCaptureSession: closeCaptureSession2 } = await import("./src-GLO4X3WA.js");
16897
16897
  await closeCaptureSession2(probeResult.probeSession);
16898
16898
  } catch (err) {
16899
16899
  log.warn("[plan] probe session close failed", {
@@ -20276,7 +20276,7 @@ function startServer(options = {}) {
20276
20276
  });
20277
20277
  async function shutdown(signal) {
20278
20278
  log.info(`Received ${signal}, shutting down`);
20279
- const { drainBrowserPool } = await import("./src-7WW3KXOI.js");
20279
+ const { drainBrowserPool } = await import("./src-GLO4X3WA.js");
20280
20280
  await drainBrowserPool().catch(() => {
20281
20281
  });
20282
20282
  const handle = await Promise.race([
@@ -24,7 +24,7 @@ import {
24
24
  } from "./chunk-J3RXEDR2.js";
25
25
  import {
26
26
  VERSION
27
- } from "./chunk-UL3SKAZB.js";
27
+ } from "./chunk-ODKXNWDL.js";
28
28
 
29
29
  // src/utils/updateCheck.ts
30
30
  import { existsSync, readFileSync } from "fs";
@@ -43,7 +43,7 @@ import {
43
43
  } from "./chunk-BLBMPEBX.js";
44
44
  import {
45
45
  VERSION
46
- } from "./chunk-UL3SKAZB.js";
46
+ } from "./chunk-ODKXNWDL.js";
47
47
 
48
48
  // src/telemetry/transport.ts
49
49
  import { spawn } from "child_process";
@@ -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-ALBHEVJJ.js";
9
+ } from "./chunk-BMRZP6X6.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-SKQTN3EA.js");
16
+ const { bundleToSingleHtml } = await import("./compiler-UCX3MZVN.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");
@@ -6,8 +6,8 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
 
8
8
  // src/version.ts
9
- var VERSION = true ? "0.9.5" : "0.0.0-dev";
10
- var PRODUCER_VERSION = true ? "0.9.5" : "0.0.0-dev";
9
+ var VERSION = true ? "0.9.6" : "0.0.0-dev";
10
+ var PRODUCER_VERSION = true ? "0.9.6" : "0.0.0-dev";
11
11
 
12
12
  export {
13
13
  VERSION,
@@ -19,7 +19,7 @@ import {
19
19
  splitElementInHtml,
20
20
  unwrapElementsFromHtml,
21
21
  wrapElementsInHtml
22
- } from "./chunk-2RLI5ISA.js";
22
+ } from "./chunk-JLKEXS4I.js";
23
23
  import {
24
24
  DEFAULT_TARGET_LUFS,
25
25
  absoluteLoudnessPlan,
@@ -28,7 +28,7 @@ import {
28
28
  requestedProjectPath,
29
29
  requiredFfmpeg,
30
30
  resolveLocalAudioPath
31
- } from "./chunk-MYTROPEC.js";
31
+ } from "./chunk-FP37FSOT.js";
32
32
  import {
33
33
  MEDIA_LINK_ATTR,
34
34
  relinkSplitHalves
@@ -55,11 +55,11 @@ import {
55
55
  scanProjectMedia,
56
56
  shouldPrewarmProxy,
57
57
  waitForProxy
58
- } from "./chunk-T46SP3UD.js";
58
+ } from "./chunk-W3G7DNCR.js";
59
59
  import {
60
60
  probeAudioTrack,
61
61
  probeMediaMetadata
62
- } from "./chunk-CS6UO5NC.js";
62
+ } from "./chunk-4VOK22DG.js";
63
63
  import {
64
64
  HistoryBusyError,
65
65
  MAX_WINDOW_IDLE_MS,
@@ -116,7 +116,7 @@ import {
116
116
  ensureHfIds,
117
117
  stampHfIdsInPlace,
118
118
  stripSdrPngColourTags
119
- } from "./chunk-HZMM3D6P.js";
119
+ } from "./chunk-JFIBO4CZ.js";
120
120
  import {
121
121
  PREVIEW_PROXY_BOX_PARAM,
122
122
  PREVIEW_PROXY_LIGHT_PARAM,
@@ -128,7 +128,7 @@ import {
128
128
  fpsToNumber,
129
129
  parseFps,
130
130
  parsePreviewProxyBox
131
- } from "./chunk-HWIGWPIG.js";
131
+ } from "./chunk-6JMNJYYR.js";
132
132
  import {
133
133
  GSAP_BASE_URL_META,
134
134
  gsapCdnDist,
@@ -150,7 +150,7 @@ import {
150
150
  resolveRateSpec,
151
151
  sourceTimeAt,
152
152
  stripEmbeddedRuntimeScripts
153
- } from "./chunk-2YQ2XYO5.js";
153
+ } from "./chunk-TNWWLO4T.js";
154
154
  import {
155
155
  ProjectRootMissingError,
156
156
  folderGone,
@@ -5617,7 +5617,7 @@ async function prepareGsapMutationScript(c, res, firstMutation) {
5617
5617
  let block = extractGsapScriptBlock(html);
5618
5618
  if (!block && (firstMutation.type === "add" || firstMutation.type === "add-with-keyframes")) {
5619
5619
  const compId = html.match(/data-composition-id="([^"]+)"/)?.[1] ?? "main";
5620
- const { GSAP_CDN } = await import("./dist-4KKPG6A5.js");
5620
+ const { GSAP_CDN } = await import("./dist-XRAW3URT.js");
5621
5621
  const bootstrap = [
5622
5622
  `<script src="${GSAP_CDN}"></script>`,
5623
5623
  "<script>",
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  getCachedGpuEncoder
9
- } from "./chunk-RTUQDHKE.js";
9
+ } from "./chunk-QDB7EFLI.js";
10
10
  import {
11
11
  runCancellableProcess
12
12
  } from "./chunk-X6JUUQCM.js";
@@ -42,7 +42,7 @@ import {
42
42
  renderFrameIdForRenderId,
43
43
  resolveAuthoredTimingWindow,
44
44
  toFps
45
- } from "./chunk-HWIGWPIG.js";
45
+ } from "./chunk-6JMNJYYR.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-2YQ2XYO5.js";
88
+ } from "./chunk-TNWWLO4T.js";
89
89
  import {
90
90
  redactTelemetryString,
91
91
  redactUrlQueryStrings
@@ -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 result = await sendBeginFrame(client, { frameTimeTicks, interval, screenshot });
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
- if (!options.rawInputFormat && (options.imageFormat ?? "jpeg") === "jpeg") {
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";
@@ -19523,6 +19603,10 @@ export {
19523
19603
  applyFaststart,
19524
19604
  createFrameReorderBuffer,
19525
19605
  spawnStreamingEncoder,
19606
+ BT709_LIMITED,
19607
+ buildChunkStreamingArgs,
19608
+ spawnChunkStreamingEncoder,
19609
+ resolveInPageEncode,
19526
19610
  HF_AUDIO_GROUP_TAG,
19527
19611
  HF_AUDIO_GROUP_ATTR,
19528
19612
  isSelfOrAncestorHidden,
@@ -10,13 +10,13 @@ import {
10
10
  parseNumbers,
11
11
  parseRoi,
12
12
  probeVideo
13
- } from "./chunk-ARNCWQNR.js";
13
+ } from "./chunk-2KO357TJ.js";
14
14
  import {
15
15
  c
16
16
  } from "./chunk-2GICKZ3I.js";
17
17
  import {
18
18
  withMeta
19
- } from "./chunk-HMMHCSSN.js";
19
+ } from "./chunk-L6MNWJTL.js";
20
20
  import {
21
21
  failCommand
22
22
  } from "./chunk-66W5IWLO.js";
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  VERSION
9
- } from "./chunk-UL3SKAZB.js";
9
+ } from "./chunk-ODKXNWDL.js";
10
10
 
11
11
  // src/registry/compatibility.ts
12
12
  import { compareVersions } from "compare-versions";
@@ -27,7 +27,7 @@ import {
27
27
  } from "./chunk-T2WJO4XM.js";
28
28
  import {
29
29
  ITEM_TYPE_DIRS
30
- } from "./chunk-HWIGWPIG.js";
30
+ } from "./chunk-6JMNJYYR.js";
31
31
  import {
32
32
  realProjectRoot
33
33
  } from "./chunk-OFQWTKPW.js";