hyperframes 0.8.208 → 0.8.210

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 (213) hide show
  1. package/dist/{add-XMWRBMBR.js → add-36M7YRR4.js} +17 -16
  2. package/dist/{animatedGifPrep-6XURJIPV.js → animatedGifPrep-RZLTC77F.js} +8 -6
  3. package/dist/api.js +26 -20
  4. package/dist/{appHistory-HIBH6XZW.js → appHistory-OHYU5ZBQ.js} +3 -2
  5. package/dist/{asset-I5GGEOB2.js → asset-HRGZ7ZCB.js} +2 -2
  6. package/dist/{assetCataloger-YBPXUNUP.js → assetCataloger-LN7RI2IC.js} +9 -7
  7. package/dist/{audio-GFJCHH5W.js → audio-ULOHC2KL.js} +31 -22
  8. package/dist/{auth-QOA55RYR.js → auth-K4ZULHQY.js} +4 -4
  9. package/dist/{autoUpdate-SPS4QPJU.js → autoUpdate-MUJ4WPP6.js} +4 -4
  10. package/dist/{backgroundChecks-HRJO7YK7.js → backgroundChecks-O6JST752.js} +5 -5
  11. package/dist/backgroundChecksWorker.js +5 -5
  12. package/dist/{batchRender-FBP3RKUF.js → batchRender-U742UVOD.js} +4 -4
  13. package/dist/{beats-VNGJ7F6W.js → beats-2CSE5WJD.js} +15 -12
  14. package/dist/{benchmark-NZ3N3MIV.js → benchmark-YJB2YKOE.js} +10 -10
  15. package/dist/{browser-BD5BKRJ5.js → browser-WJ5E7RYS.js} +7 -7
  16. package/dist/{bundleWithLocalizedFonts-WXVNPAWD.js → bundleWithLocalizedFonts-F5VQMFHZ.js} +3 -3
  17. package/dist/{capture-CXWXKWS5.js → capture-6OJDKKEZ.js} +26 -22
  18. package/dist/{capture-LMJ4TQRL.js → capture-IYV3OS5W.js} +3 -3
  19. package/dist/{captureCompositionFrame-ZKVCRYYU.js → captureCompositionFrame-7357PUMG.js} +15 -14
  20. package/dist/{catalog-WRXQSCAU.js → catalog-CZBK33QH.js} +18 -17
  21. package/dist/{catch-up-MDSPABFC.js → catch-up-7IJQ7AUR.js} +9 -8
  22. package/dist/{check-SIBBK5HA.js → check-ISUFX4DK.js} +46 -44
  23. package/dist/{checkAudio-QQBR4HR7.js → checkAudio-GAA2SY5E.js} +21 -12
  24. package/dist/{checkBrowser-4EBJLLIH.js → checkBrowser-JRADOMED.js} +39 -37
  25. package/dist/{chunk-Z5TGBEPJ.js → chunk-32BLIKEV.js} +1 -1
  26. package/dist/{chunk-P7WGVXR7.js → chunk-35HSGF46.js} +6 -6
  27. package/dist/{chunk-6WRN4WC6.js → chunk-36EOFTVG.js} +1 -1
  28. package/dist/{chunk-FFDYRJBE.js → chunk-3PTZ2TD4.js} +1 -1
  29. package/dist/{chunk-S4KHJERB.js → chunk-4A27M7CJ.js} +1 -1
  30. package/dist/{chunk-VYRJAQGC.js → chunk-57QUPSP2.js} +1 -1
  31. package/dist/{chunk-HUKQW4YE.js → chunk-5IWRGVAX.js} +2 -2
  32. package/dist/{chunk-SI7QCT2J.js → chunk-5PCT5DDF.js} +6 -6
  33. package/dist/{chunk-QWBVPWUI.js → chunk-5ZJGEQGS.js} +3 -1
  34. package/dist/{chunk-CP225S5H.js → chunk-7BOGLQFM.js} +5 -5
  35. package/dist/{chunk-MOEGCMKI.js → chunk-7J6LQ3SQ.js} +20 -0
  36. package/dist/chunk-7VZEOCUY.js +98 -0
  37. package/dist/{chunk-4LTBQEPD.js → chunk-A2H5EJZM.js} +2 -2
  38. package/dist/{chunk-NZ6G5YWZ.js → chunk-A45HCDG7.js} +2 -2
  39. package/dist/{chunk-MW2NQQ6Z.js → chunk-AG566TRI.js} +2 -2
  40. package/dist/{chunk-K4PHB3YQ.js → chunk-AZGVCQGO.js} +7 -3
  41. package/dist/{chunk-WNMVC3IT.js → chunk-BKXC5XHB.js} +1 -1
  42. package/dist/{chunk-S2OLTAEL.js → chunk-BN22WCAF.js} +2 -2
  43. package/dist/{chunk-J67FSI3Q.js → chunk-BW5WYF4N.js} +92 -27
  44. package/dist/{chunk-ULL3U6PV.js → chunk-BYZPLQSX.js} +1 -1
  45. package/dist/chunk-D3MUHMFG.js +16 -0
  46. package/dist/{chunk-4HT2L6W2.js → chunk-DHTWYTSV.js} +1 -1
  47. package/dist/{chunk-XUQYC5DD.js → chunk-DKJAK6JW.js} +5 -5
  48. package/dist/{chunk-LSMFOZ4F.js → chunk-DST7GU2Y.js} +2 -2
  49. package/dist/{chunk-EU7MVORF.js → chunk-E63BDV4Z.js} +10 -1
  50. package/dist/{chunk-6N7D2GUV.js → chunk-EQPXSSNG.js} +28 -24
  51. package/dist/{chunk-MBGM26P5.js → chunk-ERVBXEPZ.js} +1 -1
  52. package/dist/{chunk-MYO77JWR.js → chunk-EVTBRL37.js} +1 -1
  53. package/dist/{chunk-EGOXYG3M.js → chunk-EYGWMHXV.js} +2 -2
  54. package/dist/{chunk-DHQSDCWD.js → chunk-F7IWJMIO.js} +3 -2
  55. package/dist/{chunk-4KG3ESVO.js → chunk-FBIWJ3A4.js} +4 -4
  56. package/dist/{chunk-DXACKQ3F.js → chunk-FCIO4WSW.js} +3 -3
  57. package/dist/{chunk-43MW4SY7.js → chunk-FCXEVKFQ.js} +4 -4
  58. package/dist/{chunk-PKVA6MPV.js → chunk-FHIBBIEZ.js} +65 -204
  59. package/dist/{chunk-XG3IZV62.js → chunk-GKNTPIFD.js} +17 -9
  60. package/dist/{chunk-GHSO62LK.js → chunk-GNESG4XA.js} +4 -10
  61. package/dist/{chunk-G2A6RC5R.js → chunk-HD4KXG5U.js} +70 -49
  62. package/dist/{chunk-PWEOSJ3E.js → chunk-HKCIRH26.js} +3 -3
  63. package/dist/{chunk-B5MPMIKQ.js → chunk-HP7BXJFZ.js} +2 -2
  64. package/dist/{chunk-MPO25DQW.js → chunk-I3PNZDKR.js} +186 -153
  65. package/dist/chunk-I4H5JWND.js +205 -0
  66. package/dist/{chunk-ORFRUZPB.js → chunk-IMKBZEGT.js} +2 -2
  67. package/dist/{chunk-3O2E4Q66.js → chunk-J7A73K2B.js} +35 -22
  68. package/dist/{chunk-M4QZFUMW.js → chunk-JHNBF2HD.js} +1 -1
  69. package/dist/{chunk-XOFBXLMG.js → chunk-JLBJRJO6.js} +5 -3
  70. package/dist/{chunk-GMECXFAN.js → chunk-K4FVGVA6.js} +5 -2
  71. package/dist/{chunk-XMRA7CQG.js → chunk-KCLBO65Y.js} +1 -1
  72. package/dist/{chunk-7CPI2DWL.js → chunk-KGAPL42S.js} +1 -1
  73. package/dist/{chunk-BKDQFOKK.js → chunk-KGG2PUZN.js} +91 -17
  74. package/dist/{chunk-OTXXDONS.js → chunk-LRE4GDFA.js} +3 -3
  75. package/dist/{chunk-EYEEZXLI.js → chunk-MA447PNF.js} +25 -17
  76. package/dist/{chunk-6JNSYFOH.js → chunk-MV3J6ZOP.js} +4 -4
  77. package/dist/{chunk-CSWCZA6V.js → chunk-NEKKA2DA.js} +2 -2
  78. package/dist/{chunk-EOVYQ3IG.js → chunk-NQ2INEHX.js} +17 -17
  79. package/dist/{chunk-4F5NRJ6M.js → chunk-OMLVCHNN.js} +2 -2
  80. package/dist/{chunk-6CWKORZO.js → chunk-P2L7NNHT.js} +27 -5
  81. package/dist/{chunk-FC4WT5FX.js → chunk-P327BIJR.js} +1 -14
  82. package/dist/{chunk-NEASABW6.js → chunk-P6EXMN5D.js} +1 -1
  83. package/dist/{chunk-VR3JLTZD.js → chunk-PCPMSUW6.js} +3 -3
  84. package/dist/{chunk-D2CE2J2A.js → chunk-PV4XID2A.js} +1 -1
  85. package/dist/{chunk-IL2TMC6F.js → chunk-QFXF5GXE.js} +21 -5
  86. package/dist/{chunk-VS4SK7BN.js → chunk-QI5TLQNW.js} +7 -7
  87. package/dist/{chunk-CZUAX3BV.js → chunk-QIDN4ML5.js} +1 -1
  88. package/dist/{chunk-BLCKQPBE.js → chunk-QPX7FJP3.js} +1 -1
  89. package/dist/chunk-QRC7IVBC.js +4870 -0
  90. package/dist/{chunk-IIJVSCSH.js → chunk-QRWTVCGH.js} +18 -18
  91. package/dist/{chunk-56ANHX5U.js → chunk-QXUFQSSK.js} +1 -1
  92. package/dist/{chunk-KTWGVEN6.js → chunk-RIAWW4G2.js} +2 -2
  93. package/dist/{chunk-HTZJNQYI.js → chunk-RUW65P3N.js} +1 -1
  94. package/dist/{chunk-ENRFKCI6.js → chunk-TDEORHFN.js} +3 -3
  95. package/dist/{chunk-X6MCIK7L.js → chunk-TGFDRZTM.js} +29 -13
  96. package/dist/{chunk-U6KN6OIP.js → chunk-UA3YNZK6.js} +2 -2
  97. package/dist/{chunk-TNTGGDSD.js → chunk-UWEGMKKU.js} +1 -1
  98. package/dist/{chunk-SKKQMW5X.js → chunk-W3V5EOFA.js} +1 -1
  99. package/dist/{chunk-QP2MJYTJ.js → chunk-W4E3ZOWH.js} +1 -1
  100. package/dist/{chunk-7PAK7LZ5.js → chunk-WOFTAZSZ.js} +18 -20
  101. package/dist/{chunk-HZN7ICAF.js → chunk-WWQJYYAB.js} +3 -3
  102. package/dist/{chunk-PSOAGSNO.js → chunk-X2T5EOI7.js} +2 -2
  103. package/dist/{chunk-Q43YUROE.js → chunk-X6JUUQCM.js} +1 -1
  104. package/dist/chunk-XCIHCPJK.js +106 -0
  105. package/dist/{chunk-5HB4JM7H.js → chunk-XIUHHEBS.js} +5 -3
  106. package/dist/{chunk-EXAX37XR.js → chunk-Y65ZU7XY.js} +18 -13
  107. package/dist/{chunk-WABB4LZS.js → chunk-YBY2WVLC.js} +19 -2
  108. package/dist/{chunk-5PCALX6G.js → chunk-YIFEK3UD.js} +1 -1
  109. package/dist/{chunk-6DSYBW7Z.js → chunk-YRO3PXWU.js} +1 -85
  110. package/dist/{chunk-6PWQH77E.js → chunk-ZFVNYA3M.js} +1 -1
  111. package/dist/{chunk-GEO6THL3.js → chunk-ZRSQNF4A.js} +43 -30
  112. package/dist/{clean-6GX7WAEC.js → clean-NVBEXXIS.js} +25 -22
  113. package/dist/cli.js +56 -56
  114. package/dist/{cloud-6PFJKLNL.js → cloud-3T6HF7DT.js} +4 -4
  115. package/dist/{cloudrun-UGG3ZFH7.js → cloudrun-TXEEZGJ7.js} +5 -5
  116. package/dist/commands/layout-audit.browser.js +94 -4
  117. package/dist/{compare-P4EBOP4B.js → compare-Q42Z56P7.js} +38 -36
  118. package/dist/{compiler-PG4RKX6K.js → compiler-IL2PZJFH.js} +5 -3
  119. package/dist/{component-SQPMI3W7.js → component-2IWQZYCZ.js} +3 -3
  120. package/dist/{compositions-KRIHY3IY.js → compositions-3EZ3GBK2.js} +14 -12
  121. package/dist/{contactSheet-RYAE7Y5D.js → contactSheet-WG4HT5XP.js} +2 -2
  122. package/dist/{delete-T5TO4SV6.js → delete-2UBY2JTM.js} +10 -9
  123. package/dist/{deploy-AO6LQR5G.js → deploy-QTS2OM2H.js} +1 -1
  124. package/dist/{dist-6IMEDVMC.js → dist-73YTUT3W.js} +1 -1
  125. package/dist/{dist-23AAB5X2.js → dist-XF53LCKD.js} +4 -2
  126. package/dist/{doctor-QBUJQ655.js → doctor-FIXMXWE6.js} +21 -15
  127. package/dist/{events-J7CESLKQ.js → events-7WYSDXTE.js} +4 -4
  128. package/dist/{events-SIZO7YHI.js → events-NTZSSMBR.js} +5 -5
  129. package/dist/{feedback-74WOJ5PN.js → feedback-7SOB5GZC.js} +12 -12
  130. package/dist/{ffmpeg-AKUP6U2S.js → ffmpeg-PYY5FSIX.js} +10 -8
  131. package/dist/{figma-GGMYRR4Q.js → figma-DTWA3G22.js} +3 -3
  132. package/dist/fontLocalizeCli.js +11 -9
  133. package/dist/{get-PLKAI6JM.js → get-DMGUJPLP.js} +10 -9
  134. package/dist/{gpuPolicy-EYDAAPJF.js → gpuPolicy-KVYO4OU4.js} +8 -6
  135. package/dist/{grade-compare-UADJP4AV.js → grade-compare-NCYPJFLI.js} +39 -37
  136. package/dist/{heifImagePrep-KDF3OPOK.js → heifImagePrep-F7LFUYGC.js} +9 -7
  137. package/dist/{help-WSQQ555Q.js → help-I4RRBHCW.js} +2 -2
  138. package/dist/{history-VSQ2DQ3V.js → history-GVBBXZKQ.js} +11 -10
  139. package/dist/hyperframe.manifest.json +1 -1
  140. package/dist/hyperframe.runtime.iife.js +64 -64
  141. package/dist/hyperframes-player.global.js +1 -1
  142. package/dist/{info-MOQ4LRC3.js → info-UE2PY5AF.js} +9 -9
  143. package/dist/{init-EONQSZJG.js → init-4UGFGJQK.js} +39 -34
  144. package/dist/{inspect-OLCVLHOU.js → inspect-ZRREAUCB.js} +37 -35
  145. package/dist/{installer-GHISA75B.js → installer-ABXPRFIJ.js} +6 -5
  146. package/dist/{keyframes-DGQYCY24.js → keyframes-MFR4TYVR.js} +8 -8
  147. package/dist/{lambda-AMMWF2YH.js → lambda-E3Z6JCIB.js} +13 -11
  148. package/dist/{layout-R6CAPGRO.js → layout-IO7T5SSU.js} +37 -35
  149. package/dist/{lint-QZJEYPHD.js → lint-WYPQK5XA.js} +9 -9
  150. package/dist/{lintProject-W3YVHAGP.js → lintProject-KCN7MRBN.js} +1 -1
  151. package/dist/{list-KCJID4SP.js → list-7F2LXWOZ.js} +10 -9
  152. package/dist/{login-7HKBEPJS.js → login-TTMYCXN2.js} +7 -7
  153. package/dist/{logout-3IID4KXD.js → logout-QRSB4CNH.js} +3 -3
  154. package/dist/{manager-Z7W4GQGF.js → manager-LQXZTUTJ.js} +3 -3
  155. package/dist/{manager-6YSKJMVD.js → manager-OQ5J26ST.js} +11 -9
  156. package/dist/{media-treatment-E3DL6LEZ.js → media-treatment-ELB6WRA5.js} +17 -15
  157. package/dist/{models-URWI7YEG.js → models-D2FNIGNZ.js} +15 -13
  158. package/dist/{motionShot-27IXMDJK.js → motionShot-53VDDRIC.js} +22 -21
  159. package/dist/{normalize-audio-WGRLPR3P.js → normalize-audio-QHNCFWR2.js} +12 -9
  160. package/dist/{open-LQ35PLEN.js → open-3KMTT3AV.js} +18 -17
  161. package/dist/{parakeetRunner-XASVIDTI.js → parakeetRunner-T65S6FW3.js} +20 -17
  162. package/dist/{pipeline-GA7QVCHS.js → pipeline-DUVRZGIM.js} +15 -10
  163. package/dist/{play-RYZP77CI.js → play-27R6RBSK.js} +27 -24
  164. package/dist/{policies-PKLD4UW5.js → policies-NWIEUGGW.js} +1 -1
  165. package/dist/{preflight-HJFSJXXF.js → preflight-QB6NKBBL.js} +12 -10
  166. package/dist/{present-YBMLOWZV.js → present-RHV3FKI5.js} +21 -18
  167. package/dist/{preview-QIRKJCRV.js → preview-IAKIXYLN.js} +29 -27
  168. package/dist/{producer-524FDOLX.js → producer-F6PHB4M4.js} +1 -1
  169. package/dist/{projectConfig-IDQN5ZRW.js → projectConfig-MPHWYY5D.js} +10 -9
  170. package/dist/{publication-3X3IGSDO.js → publication-CBAEINEG.js} +4 -3
  171. package/dist/{publish-2BF7K6HX.js → publish-4A2A6V7Z.js} +20 -17
  172. package/dist/{refresh-3IRHJEQA.js → refresh-F7FUCXLX.js} +3 -3
  173. package/dist/{remove-background-EZBCEFT6.js → remove-background-3I7RZGVG.js} +15 -11
  174. package/dist/{render-TEEBI2UT.js → render-2HYATL32.js} +56 -57
  175. package/dist/{render-EFUA2A6A.js → render-BGPUHBFC.js} +6 -5
  176. package/dist/{render-JFMTAXHD.js → render-BSKLHCZ4.js} +67 -47
  177. package/dist/{render-batch-XTYNXVSW.js → render-batch-JD6C3BDD.js} +7 -6
  178. package/dist/renderSetupWorker.js +5 -5
  179. package/dist/{resolver-FZS6TN6B.js → resolver-SQYR7LII.js} +6 -5
  180. package/dist/{screenshotCapture-HOW4VSV6.js → screenshotCapture-HDRHY4NN.js} +2 -2
  181. package/dist/{sherpa-TQIAIKTH.js → sherpa-VXD3DAH4.js} +19 -16
  182. package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +2 -2
  183. package/dist/{skills-S6ZG5KKH.js → skills-B2SHEHWL.js} +7 -7
  184. package/dist/{skillsUpdateCheck-XC7JQL3F.js → skillsUpdateCheck-ST43UUPK.js} +5 -5
  185. package/dist/{snapshot-ERYZIM32.js → snapshot-USJYNKDM.js} +118 -75
  186. package/dist/{src-OL6RHPE4.js → src-5OX35WPG.js} +10 -8
  187. package/dist/{src-6XOMREMS.js → src-PX3VIS7K.js} +30 -9
  188. package/dist/{staticProjectServer-JYDDGPAH.js → staticProjectServer-ET7H5LMV.js} +22 -19
  189. package/dist/{status-DTP6ZYDU.js → status-QVDRHXW2.js} +3 -3
  190. package/dist/studio/assets/{hyperframes-player-5dRdMVOq.js → hyperframes-player-DUpxahTX.js} +1 -1
  191. package/dist/studio/assets/{index-ZqyQ91pm.js → index-B4dcZZAm.js} +1 -1
  192. package/dist/studio/assets/{index-Bu3mJUU2.js → index-CtrcjpbM.js} +5 -5
  193. package/dist/studio/assets/{index-CYbvOVp-.css → index-RUPGNyct.css} +1 -1
  194. package/dist/studio/index.html +2 -2
  195. package/dist/{studio-api-GRU4SHKD.js → studio-api-PLKYSG2X.js} +13 -10
  196. package/dist/{studioServer-OYPBEI5B.js → studioServer-CNUXGRFS.js} +65 -63
  197. package/dist/{synthesize-QZHRXGRY.js → synthesize-RVE7IUOJ.js} +3 -2
  198. package/dist/{telemetry-CPYINR63.js → telemetry-DGDEJLGL.js} +5 -5
  199. package/dist/{telemetry-6BPSGY5W.js → telemetry-EJS5PXH2.js} +2 -2
  200. package/dist/{timeline-RGK5BMPD.js → timeline-VCQC4TLM.js} +23 -20
  201. package/dist/{tokens-EX4BOWRW.js → tokens-AEOBCDW5.js} +2 -2
  202. package/dist/{transcribe-RI52JMVW.js → transcribe-COFCB3ZB.js} +25 -22
  203. package/dist/{transcribe-MK367I6A.js → transcribe-X6O5ZSGQ.js} +15 -12
  204. package/dist/{tts-AY4JO5NQ.js → tts-AGMCPQXE.js} +1 -1
  205. package/dist/{updateCheck-BIEJKQI4.js → updateCheck-BW7MDUXZ.js} +4 -4
  206. package/dist/{upgrade-ES3UUI7O.js → upgrade-QXOGA54H.js} +4 -4
  207. package/dist/{urlDownloader-XAGYSTAG.js → urlDownloader-QB3TBIQ5.js} +7 -5
  208. package/dist/{validate-A6GZHNEI.js → validate-AU2BZ7D7.js} +29 -27
  209. package/dist/{video-OEMGR3MN.js → video-GNNYAL5T.js} +9 -7
  210. package/dist/warmCheck.js +46 -44
  211. package/package.json +1 -1
  212. package/dist/chunk-BQMAPNDA.js +0 -4830
  213. package/dist/chunk-DKPNNYBZ.js +0 -44
@@ -12,6 +12,14 @@ import {
12
12
  pixelFormatHasAlpha,
13
13
  videoStreamHasAlpha
14
14
  } from "./chunk-5S7W3TUO.js";
15
+ import {
16
+ decodableAudioStream
17
+ } from "./chunk-D3MUHMFG.js";
18
+ import {
19
+ removeScratch,
20
+ renameWithRetry,
21
+ renameWithRetryAsync
22
+ } from "./chunk-XCIHCPJK.js";
15
23
  import {
16
24
  DISTRIBUTED_FPS,
17
25
  MEDIA_VISUAL_STYLE_PROPERTIES,
@@ -32,7 +40,7 @@ import {
32
40
  renderFrameIdForRenderId,
33
41
  resolveAuthoredTimingWindow,
34
42
  toFps
35
- } from "./chunk-QWBVPWUI.js";
43
+ } from "./chunk-5ZJGEQGS.js";
36
44
  import {
37
45
  AUDIO_GROUP_RENDER_ID_ATTR,
38
46
  AUTHORED_SOURCE_BEGIN,
@@ -75,7 +83,7 @@ import {
75
83
  sourceTimeAt,
76
84
  timeAtSourceTime,
77
85
  volumeSegmentSampleCount
78
- } from "./chunk-BQMAPNDA.js";
86
+ } from "./chunk-QRC7IVBC.js";
79
87
  import {
80
88
  redactTelemetryString,
81
89
  redactUrlQueryStrings
@@ -93,7 +101,7 @@ import {
93
101
  } from "./chunk-ERUQ3S6D.js";
94
102
  import {
95
103
  resolveReferencedStart
96
- } from "./chunk-FC4WT5FX.js";
104
+ } from "./chunk-P327BIJR.js";
97
105
  import {
98
106
  FFMPEG_PATH_ENV,
99
107
  FFPROBE_PATH_ENV,
@@ -673,6 +681,35 @@ async function explainChromeLaunchFailure(error, executablePath, args, signal) {
673
681
  ${diagnosis}`, { cause: error });
674
682
  }
675
683
 
684
+ // ../engine/src/services/sandboxLaunch.ts
685
+ var MACH_SERVICE_DENIED = /bootstrap_check_in\b[^\n]*Permission denied/;
686
+ var SINGLE_PROCESS = "--single-process";
687
+ var CPU_COMPOSITING = "--disable-gpu-compositing";
688
+ function machServiceDenied(errorMessage) {
689
+ return MACH_SERVICE_DENIED.test(errorMessage);
690
+ }
691
+ function pipeLaunchClosedOnMac(error, platform = process.platform) {
692
+ return platform === "darwin" && error instanceof Error && error.name === "TargetCloseError";
693
+ }
694
+ function inAgentSandbox(env = process.env, platform = process.platform) {
695
+ return platform === "darwin" && env.CODEX_SANDBOX === "seatbelt";
696
+ }
697
+ function oneProcessOverPipe(options) {
698
+ const args = options.args ?? [];
699
+ const missing = [SINGLE_PROCESS, CPU_COMPOSITING].filter((flag) => !args.includes(flag));
700
+ return { ...options, pipe: true, args: [...args, ...missing] };
701
+ }
702
+ function isOneProcessOverPipe(options) {
703
+ return options.pipe === true && (options.args ?? []).includes(SINGLE_PROCESS);
704
+ }
705
+ function sandboxDeniedRemediation(errorMessage) {
706
+ if (!machServiceDenied(errorMessage)) return void 0;
707
+ return [
708
+ "The browser can't start inside this sandbox: macOS refused Chrome's mach service (bootstrap_check_in: Permission denied).",
709
+ "Rerun this command with escalation, outside the sandbox."
710
+ ].join("\n");
711
+ }
712
+
676
713
  // ../parsers/dist/htmlAttributeSpans.js
677
714
  function readAttributeValue(html, at) {
678
715
  while (/[\t\n\f\r ]/.test(html.charAt(at))) at++;
@@ -1486,12 +1523,23 @@ async function acquireBrowser(chromeArgs, config) {
1486
1523
  const enablePool = config?.enableBrowserPool ?? DEFAULT_CONFIG.enableBrowserPool;
1487
1524
  return browserLeasePool.acquire(createBrowserLaunchFingerprint(chromeArgs, config), enablePool);
1488
1525
  }
1526
+ async function launchInsideSandbox(ppt, options) {
1527
+ const sandboxed = inAgentSandbox();
1528
+ try {
1529
+ return await ppt.launch(sandboxed ? oneProcessOverPipe(options) : options);
1530
+ } catch (error) {
1531
+ const message = error instanceof Error ? error.message : "";
1532
+ const refused = machServiceDenied(message) || pipeLaunchClosedOnMac(error);
1533
+ if (process.platform !== "darwin" || sandboxed || !refused) throw error;
1534
+ return ppt.launch(oneProcessOverPipe(options));
1535
+ }
1536
+ }
1489
1537
  async function launchBrowser(fingerprint) {
1490
1538
  const ppt = await getPuppeteer();
1491
1539
  const env = launchEnv(fingerprint);
1492
1540
  let captureMode = fingerprint.requestedCaptureMode;
1493
1541
  let browser;
1494
- const launch = (args) => ppt.launch({
1542
+ const launch = (args) => launchInsideSandbox(ppt, {
1495
1543
  ...ownedLaunchOptions(),
1496
1544
  headless: true,
1497
1545
  args: withHyperframesBrowserMarker(args),
@@ -1501,6 +1549,8 @@ async function launchBrowser(fingerprint) {
1501
1549
  timeout: fingerprint.browserTimeoutMs,
1502
1550
  protocolTimeout: fingerprint.protocolTimeoutMs
1503
1551
  }).catch(async (error) => {
1552
+ const remediation = process.platform === "darwin" && sandboxDeniedRemediation(error instanceof Error ? error.message : "");
1553
+ if (remediation) throw new Error(remediation, { cause: error });
1504
1554
  const defaults = await ppt.defaultArgs({
1505
1555
  headless: true,
1506
1556
  args: withHyperframesBrowserMarker(args)
@@ -9336,7 +9386,7 @@ async function probeMediaProfile(filePath, options) {
9336
9386
  }
9337
9387
  return {
9338
9388
  hasVideoStream: videoStreams.length > 0,
9339
- hasAudioStream: output.streams.some((stream) => stream.codec_type === "audio"),
9389
+ hasAudioStream: decodableAudioStream(output.streams) !== null,
9340
9390
  visualKind: isStillImage ? "still" : hasMovingVideoStream ? "moving" : "none"
9341
9391
  };
9342
9392
  } catch (error) {
@@ -9542,7 +9592,7 @@ async function extractMediaMetadata(filePath) {
9542
9592
  height: videoStream.height || stillImage()?.height || 0,
9543
9593
  fps,
9544
9594
  videoCodec: videoStream.codec_name || "unknown",
9545
- hasAudio: output?.streams.some((s) => s.codec_type === "audio") ?? false,
9595
+ hasAudio: decodableAudioStream(output?.streams ?? []) !== null,
9546
9596
  isVFR,
9547
9597
  hasAlpha,
9548
9598
  ...alphaPlaneDecoded === void 0 ? {} : { alphaPlaneDecoded },
@@ -9670,8 +9720,10 @@ async function extractAudioMetadata(filePath, options) {
9670
9720
  }
9671
9721
  async function probeAudioMetadata(filePath, signal) {
9672
9722
  const output = await probeMediaOutput(filePath, signal);
9673
- const audioStream = output.streams.find((s) => s.codec_type === "audio");
9674
- if (!audioStream) throw new Error("[FFmpeg] No audio stream found");
9723
+ const audioStreams = output.streams.filter((s) => s.codec_type === "audio");
9724
+ const audioStreamIndex = decodableAudioStream(output.streams);
9725
+ const audioStream = audioStreamIndex === null ? void 0 : audioStreams[audioStreamIndex];
9726
+ if (audioStreamIndex === null || !audioStream) throw new Error("[FFmpeg] No audio stream found");
9675
9727
  let durationSeconds = output.format.duration ? parseFloat(output.format.duration) : 0;
9676
9728
  const streamDuration = audioStream.duration ? parseFloat(audioStream.duration) : void 0;
9677
9729
  const sampleRate = audioStream.sample_rate ? parseInt(audioStream.sample_rate) : 44100;
@@ -9679,6 +9731,7 @@ async function probeAudioMetadata(filePath, signal) {
9679
9731
  if (sampleRate > 0) {
9680
9732
  const decoded = await probeDecodedAudioDuration(
9681
9733
  filePath,
9734
+ audioStreamIndex,
9682
9735
  sampleRate,
9683
9736
  audioStartSeconds(audioStream, output.format),
9684
9737
  durationSeconds,
@@ -9697,7 +9750,8 @@ async function probeAudioMetadata(filePath, signal) {
9697
9750
  bitrate: output.format.bit_rate ? parseInt(output.format.bit_rate) : void 0,
9698
9751
  latestStreamLeadSeconds: latestStreamLeadSeconds(output),
9699
9752
  audioStreamLeadSeconds: streamLeadSeconds(output, audioStream),
9700
- audioStreamCount: output.streams.filter((s) => s.codec_type === "audio").length
9753
+ audioStreamCount: audioStreams.length,
9754
+ audioStream: audioStreamIndex
9701
9755
  };
9702
9756
  }
9703
9757
  function audioVideoStreamStarts(output) {
@@ -9725,11 +9779,11 @@ function reconcileAudioDuration(containerSeconds, decodedSeconds, format) {
9725
9779
  if (trustShorter && difference < -AUDIO_DURATION_PROBE_MARGIN_SECONDS) return decodedSeconds;
9726
9780
  return containerSeconds;
9727
9781
  }
9728
- async function probeDecodedAudioDuration(filePath, sampleRate, startSeconds, containerDurationSeconds, signal) {
9782
+ async function probeDecodedAudioDuration(filePath, audioStream, sampleRate, startSeconds, containerDurationSeconds, signal) {
9729
9783
  const probe = async (readInterval) => {
9730
9784
  const args = [
9731
9785
  "-select_streams",
9732
- "a:0",
9786
+ `a:${audioStream}`,
9733
9787
  "-show_entries",
9734
9788
  "frame=best_effort_timestamp_time,nb_samples",
9735
9789
  "-of",
@@ -9785,6 +9839,18 @@ async function analyzeKeyframeIntervals(filePath, metadata) {
9785
9839
  });
9786
9840
  return promise;
9787
9841
  }
9842
+ async function keyframeGapSeconds(filePath, seekSeconds, signal) {
9843
+ const stdout = await runFfprobe(
9844
+ filePath,
9845
+ [
9846
+ ...["-select_streams", "v:0", "-show_entries", "packet=pts_time", "-of", "csv=p=0"],
9847
+ ...["-read_intervals", `${seekSeconds}%+#1`]
9848
+ ],
9849
+ signal
9850
+ );
9851
+ const keyframe = parseFloat(stdout.split("\n")[0] ?? "");
9852
+ return Number.isFinite(keyframe) ? Math.max(0, seekSeconds - keyframe) : 0;
9853
+ }
9788
9854
  async function analyzeKeyframeIntervalsUncached(filePath, videoStreamStartSeconds, videoStreamDurationSeconds) {
9789
9855
  const stdout = await runFfprobe(filePath, [
9790
9856
  "-select_streams",
@@ -9946,7 +10012,18 @@ async function shouldCopyAacSidecar(audioPath, options) {
9946
10012
  return false;
9947
10013
  }
9948
10014
  }
9949
- function getEncoderPreset(quality, format = "mp4", hdr) {
10015
+ var PRORES_PROFILE_NAMES = ["4444", "hq", "422", "lt", "proxy"];
10016
+ var PRORES_PROFILES = {
10017
+ "4444": { profile: "4444", pixelFormat: "yuva444p10le", alpha: true },
10018
+ hq: { profile: "3", pixelFormat: "yuv422p10le", alpha: false },
10019
+ "422": { profile: "2", pixelFormat: "yuv422p10le", alpha: false },
10020
+ lt: { profile: "1", pixelFormat: "yuv422p10le", alpha: false },
10021
+ proxy: { profile: "0", pixelFormat: "yuv422p10le", alpha: false }
10022
+ };
10023
+ function isProresProfile(value) {
10024
+ return typeof value === "string" && PRORES_PROFILE_NAMES.includes(value);
10025
+ }
10026
+ function getEncoderPreset(quality, format = "mp4", hdr, proresProfile = "4444") {
9950
10027
  const base = ENCODER_PRESETS[quality];
9951
10028
  if (format === "webm") {
9952
10029
  return {
@@ -9957,12 +10034,8 @@ function getEncoderPreset(quality, format = "mp4", hdr) {
9957
10034
  };
9958
10035
  }
9959
10036
  if (format === "mov") {
9960
- return {
9961
- preset: "4444",
9962
- quality: base.quality,
9963
- codec: "prores",
9964
- pixelFormat: "yuva444p10le"
9965
- };
10037
+ const { profile, pixelFormat } = PRORES_PROFILES[proresProfile];
10038
+ return { preset: profile, quality: base.quality, codec: "prores", pixelFormat };
9966
10039
  }
9967
10040
  if (hdr) {
9968
10041
  return {
@@ -10425,8 +10498,9 @@ async function encodeFramesChunkedConcat(framesDir, framePattern, outputPath, op
10425
10498
  async function muxVideoWithAudio(videoPath, audioPath, outputPath, signal, config, fps, onSecondsWritten) {
10426
10499
  const outputDir = dirname2(outputPath);
10427
10500
  if (!existsSync5(outputDir)) mkdirSync2(outputDir, { recursive: true });
10428
- const isWebm = outputPath.endsWith(".webm");
10429
- const isMov = outputPath.endsWith(".mov");
10501
+ const outputExtension = extname(outputPath).toLowerCase();
10502
+ const isWebm = outputExtension === ".webm";
10503
+ const isMov = outputExtension === ".mov";
10430
10504
  const shouldCopyAudio = isWebm ? false : await shouldCopyAacSidecar(audioPath, config);
10431
10505
  const args = [...config?.videoInputArgs ?? ["-i", videoPath], "-i", audioPath, "-c:v", "copy"];
10432
10506
  if (isWebm) {
@@ -11116,7 +11190,7 @@ function isMemberGroupHidden(groupsById, el) {
11116
11190
  }
11117
11191
 
11118
11192
  // ../engine/src/services/videoFrameExtractor.ts
11119
- import { copyFileSync as copyFileSync3, existsSync as existsSync9, linkSync as linkSync2, mkdirSync as mkdirSync6, rmSync as rmSync6 } from "fs";
11193
+ import { copyFileSync as copyFileSync2, existsSync as existsSync9, linkSync as linkSync2, mkdirSync as mkdirSync6, rmSync as rmSync5 } from "fs";
11120
11194
  import { basename as basename2, join as join12 } from "path";
11121
11195
  import { cpus } from "os";
11122
11196
 
@@ -12260,103 +12334,11 @@ import {
12260
12334
  lstatSync as lstatSync2,
12261
12335
  mkdirSync as mkdirSync5,
12262
12336
  readdirSync as readdirSync5,
12263
- rmSync as rmSync5,
12337
+ rmSync as rmSync4,
12264
12338
  statSync as statSync6,
12265
12339
  utimesSync,
12266
12340
  writeFileSync as writeFileSync3
12267
12341
  } from "fs";
12268
-
12269
- // ../engine/src/utils/renameWithRetry.ts
12270
- import { copyFileSync as copyFileSync2, renameSync } from "fs";
12271
- import { copyFile, rename } from "fs/promises";
12272
-
12273
- // ../engine/src/utils/removeScratch.ts
12274
- import { AsyncLocalStorage } from "async_hooks";
12275
- import { rmSync as rmSync4 } from "fs";
12276
- var collecting = new AsyncLocalStorage();
12277
- function removeScratch(path) {
12278
- try {
12279
- rmSync4(path, { recursive: true, force: true });
12280
- } catch {
12281
- collecting.getStore()?.push(path);
12282
- }
12283
- }
12284
- async function collectScratchLeftovers(run, report) {
12285
- const left = [];
12286
- try {
12287
- return await collecting.run(left, run);
12288
- } finally {
12289
- report(left);
12290
- }
12291
- }
12292
-
12293
- // ../engine/src/utils/renameWithRetry.ts
12294
- var RETRYABLE = /* @__PURE__ */ new Set(["EPERM", "EACCES", "EBUSY"]);
12295
- var BACKOFF_MS = [10, 20, 40, 80, 160, 320, 640];
12296
- function isRetryable(error, platform) {
12297
- if (platform !== "win32") return false;
12298
- return RETRYABLE.has(error?.code ?? "");
12299
- }
12300
- function nextStep(error, attempt, options, platform) {
12301
- if (!isRetryable(error, platform)) return "throw";
12302
- if (attempt < BACKOFF_MS.length) return "wait";
12303
- return options.copyFallback ? "copy" : "throw";
12304
- }
12305
- function sleepSync(ms) {
12306
- Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
12307
- }
12308
- function renameWithRetry(from, to, options = {}) {
12309
- const doRename = options.rename ?? renameSync;
12310
- const doCopy = options.copy ?? copyFileSync2;
12311
- const platform = options.platform ?? process.platform;
12312
- for (let attempt = 0; ; attempt++) {
12313
- try {
12314
- doRename(from, to);
12315
- return;
12316
- } catch (error) {
12317
- const step = nextStep(error, attempt, options, platform);
12318
- if (step === "throw") throw error;
12319
- if (step === "wait") {
12320
- sleepSync(BACKOFF_MS[attempt]);
12321
- continue;
12322
- }
12323
- try {
12324
- doCopy(from, to);
12325
- } catch {
12326
- throw error;
12327
- }
12328
- removeScratch(from);
12329
- return;
12330
- }
12331
- }
12332
- }
12333
- async function renameWithRetryAsync(from, to, options = {}) {
12334
- const doRename = options.rename ?? rename;
12335
- const doCopy = options.copy ?? copyFile;
12336
- const platform = options.platform ?? process.platform;
12337
- for (let attempt = 0; ; attempt++) {
12338
- try {
12339
- await doRename(from, to);
12340
- return;
12341
- } catch (error) {
12342
- const step = nextStep(error, attempt, options, platform);
12343
- if (step === "throw") throw error;
12344
- if (step === "wait") {
12345
- await new Promise((resolve2) => setTimeout(resolve2, BACKOFF_MS[attempt]));
12346
- continue;
12347
- }
12348
- try {
12349
- await doCopy(from, to);
12350
- } catch {
12351
- throw error;
12352
- }
12353
- removeScratch(from);
12354
- return;
12355
- }
12356
- }
12357
- }
12358
-
12359
- // ../engine/src/services/extractionCache.ts
12360
12342
  import { join as join11 } from "path";
12361
12343
  var COMPLETE_SENTINEL = ".hf-complete";
12362
12344
  var GC_MARKER = ".hf-last-gc";
@@ -12439,7 +12421,7 @@ function publishCacheEntry(entry, partialDir) {
12439
12421
  const winner = adoptPublishedWinner(entry, partialDir);
12440
12422
  if (winner) return winner;
12441
12423
  try {
12442
- rmSync5(entry.dir, { recursive: true, force: true });
12424
+ rmSync4(entry.dir, { recursive: true, force: true });
12443
12425
  } catch {
12444
12426
  return { dir: partialDir, published: false };
12445
12427
  }
@@ -12501,7 +12483,7 @@ function directorySizeBytes(path) {
12501
12483
  }
12502
12484
  function removeDir(path) {
12503
12485
  try {
12504
- rmSync5(path, { recursive: true, force: true });
12486
+ rmSync4(path, { recursive: true, force: true });
12505
12487
  } catch {
12506
12488
  }
12507
12489
  }
@@ -13028,6 +13010,18 @@ function sdrCanvasColourFilters(metadata, toneMappedToSdr = false) {
13028
13010
  return toneMappedToSdr ? [SDR_CANVAS_PASSTHROUGH_FILTER] : [];
13029
13011
  }
13030
13012
  var EXTRACTION_SEGMENT_SECONDS = 120;
13013
+ var SKIP_DECODE_FPS_FLOOR = 30;
13014
+ async function leadInSecondsUnlessAborted(videoPath, seek, signal) {
13015
+ try {
13016
+ return await keyframeGapSeconds(videoPath, seek, signal);
13017
+ } catch (error) {
13018
+ if (signal?.aborted) return 0;
13019
+ throw error;
13020
+ }
13021
+ }
13022
+ function stallTimeoutMs(baseMs, skippedSeconds, sourceFps) {
13023
+ return baseMs + Math.ceil(skippedSeconds * sourceFps * 1e3 / SKIP_DECODE_FPS_FLOOR);
13024
+ }
13031
13025
  function undoTickRoundingOnTheSourceFrameGrid(seek, lead) {
13032
13026
  const sinceFileStart = `(PTS*TB+${seek}-${lead})`;
13033
13027
  return [
@@ -13052,7 +13046,7 @@ function splitFrameRanges(ranges, segmentFrames) {
13052
13046
  return segments;
13053
13047
  }
13054
13048
  async function runSegmentedExtraction(job) {
13055
- const { decodeArgs, filterAndEncodeArgs, videoPath, startTime, fps, segments, gate } = job;
13049
+ const { decodeArgs, filterAndEncodeArgs, videoPath, startTime, fps, sourceFps, segments, gate } = job;
13056
13050
  const segmentCount = segments.length;
13057
13051
  const failed = new AbortController();
13058
13052
  const signal = job.runOptions.signal ? AbortSignal.any([job.runOptions.signal, failed.signal]) : failed.signal;
@@ -13064,7 +13058,7 @@ async function runSegmentedExtraction(job) {
13064
13058
  const { firstFrame, frames } = segments[index];
13065
13059
  const seek = startTime + firstFrame / fps;
13066
13060
  const result = await gate(
13067
- () => runFfmpeg(
13061
+ async () => runFfmpeg(
13068
13062
  [
13069
13063
  ...decodeArgs,
13070
13064
  "-noaccurate_seek",
@@ -13081,7 +13075,15 @@ async function runSegmentedExtraction(job) {
13081
13075
  String(firstFrame + 1),
13082
13076
  ...filterAndEncodeArgs(seek)
13083
13077
  ],
13084
- { ...job.runOptions, signal }
13078
+ {
13079
+ ...job.runOptions,
13080
+ signal,
13081
+ timeout: stallTimeoutMs(
13082
+ job.runOptions.timeout,
13083
+ await leadInSecondsUnlessAborted(videoPath, seek, signal),
13084
+ sourceFps
13085
+ )
13086
+ }
13085
13087
  ),
13086
13088
  signal
13087
13089
  );
@@ -13090,7 +13092,10 @@ async function runSegmentedExtraction(job) {
13090
13092
  }
13091
13093
  };
13092
13094
  const workers = Math.min(segmentCount, EXTRACTION_SLOTS);
13093
- await Promise.all(Array.from({ length: workers }, worker));
13095
+ await Promise.all(Array.from({ length: workers }, worker)).catch((error) => {
13096
+ failed.abort();
13097
+ throw error;
13098
+ });
13094
13099
  const ran = results.filter(Boolean);
13095
13100
  const failure = ran.find((r) => !r.success && r.terminationReason !== "abort") ?? ran.find((r) => !r.success);
13096
13101
  if (failure) return failure;
@@ -13209,6 +13214,7 @@ async function extractVideoFramesRangeUnredacted(videoPath, videoId, startTime,
13209
13214
  videoPath,
13210
13215
  startTime,
13211
13216
  fps,
13217
+ sourceFps: metadata.fps,
13212
13218
  gate: options.tailProbe ? inTailProbeSlot : inExtractionSlot,
13213
13219
  segments: splitFrameRanges(
13214
13220
  options.frameRanges ?? [{ firstFrame: 0, frames: totalFrames }],
@@ -13216,10 +13222,14 @@ async function extractVideoFramesRangeUnredacted(videoPath, videoId, startTime,
13216
13222
  ),
13217
13223
  runOptions
13218
13224
  }) : inExtractionSlot(
13219
- () => runFfmpeg(
13220
- [...hwaccel, ...args, ...filterArgsFor(startTime), ...encodeArgs],
13221
- runOptions
13222
- ),
13225
+ async () => runFfmpeg([...hwaccel, ...args, ...filterArgsFor(startTime), ...encodeArgs], {
13226
+ ...runOptions,
13227
+ timeout: stallTimeoutMs(
13228
+ ffmpegProcessTimeout,
13229
+ options.finalFrameOnly ? startTime : await leadInSecondsUnlessAborted(videoPath, startTime, signal),
13230
+ metadata.fps
13231
+ )
13232
+ }),
13223
13233
  signal
13224
13234
  );
13225
13235
  let processResult = await extract(decodeWithVideoToolbox ? ["-hwaccel", "videotoolbox"] : []);
@@ -13531,7 +13541,7 @@ function linkOrCopyFrame(src, dest) {
13531
13541
  try {
13532
13542
  linkSync2(src, dest);
13533
13543
  } catch {
13534
- copyFileSync3(src, dest);
13544
+ copyFileSync2(src, dest);
13535
13545
  }
13536
13546
  }
13537
13547
  function supersetGroupingKey(work, fps) {
@@ -13621,7 +13631,7 @@ function planSupersetGroups(misses, fps) {
13621
13631
  }
13622
13632
  function sliceSupersetMember(member, superset, outputDir, fps, configuredFps) {
13623
13633
  const { work } = member.miss;
13624
- rmSync6(outputDir, { recursive: true, force: true });
13634
+ rmSync5(outputDir, { recursive: true, force: true });
13625
13635
  mkdirSync6(outputDir, { recursive: true });
13626
13636
  const requestedFrames = extractionFrameCountForDuration(
13627
13637
  work.videoDuration,
@@ -13795,7 +13805,7 @@ async function extractAllVideoFrames(videos, baseDir, options, signal, config, c
13795
13805
  const hdrPreflightStart = Date.now();
13796
13806
  const hdrInfo = analyzeCompositionHdr(videoColorSpaces);
13797
13807
  const hdrSkippedIndices = /* @__PURE__ */ new Set();
13798
- if (hdrInfo.hasHdr && hdrInfo.dominantTransfer) {
13808
+ if (!options.toneMapHdrToSdr && hdrInfo.hasHdr && hdrInfo.dominantTransfer) {
13799
13809
  const targetTransfer = hdrInfo.dominantTransfer;
13800
13810
  for (let i = 0; i < resolvedVideos.length; i++) {
13801
13811
  if (signal?.aborted) break;
@@ -13950,14 +13960,14 @@ async function extractAllVideoFrames(videos, baseDir, options, signal, config, c
13950
13960
  maxTransientRetries,
13951
13961
  onRetry: () => {
13952
13962
  recordTransientRetries(1);
13953
- rmSync6(outputDir, { recursive: true, force: true });
13963
+ rmSync5(outputDir, { recursive: true, force: true });
13954
13964
  }
13955
13965
  }
13956
13966
  );
13957
13967
  return attempted2.result;
13958
13968
  }
13959
13969
  const partialDir = partialCacheEntryDir(cacheTarget.entry);
13960
- rmSync6(partialDir, { recursive: true, force: true });
13970
+ rmSync5(partialDir, { recursive: true, force: true });
13961
13971
  mkdirSync6(partialDir, { recursive: true });
13962
13972
  const attempted = await runVideoExtractionWithRetry(
13963
13973
  () => extractVideoFramesRange(
@@ -13975,7 +13985,7 @@ async function extractAllVideoFrames(videos, baseDir, options, signal, config, c
13975
13985
  maxTransientRetries,
13976
13986
  onRetry: () => {
13977
13987
  recordTransientRetries(1);
13978
- rmSync6(partialDir, { recursive: true, force: true });
13988
+ rmSync5(partialDir, { recursive: true, force: true });
13979
13989
  mkdirSync6(partialDir, { recursive: true });
13980
13990
  }
13981
13991
  }
@@ -14059,7 +14069,7 @@ async function extractAllVideoFrames(videos, baseDir, options, signal, config, c
14059
14069
  } catch {
14060
14070
  return null;
14061
14071
  } finally {
14062
- rmSync6(probeDir, { recursive: true, force: true });
14072
+ rmSync5(probeDir, { recursive: true, force: true });
14063
14073
  }
14064
14074
  }
14065
14075
  async function executeDirectMiss(miss, maxTransientRetries = options.maxTransientRetries ?? 0) {
@@ -14095,7 +14105,7 @@ async function extractAllVideoFrames(videos, baseDir, options, signal, config, c
14095
14105
  if (!first) return [];
14096
14106
  const tempDir = cacheRootDir ? join12(cacheRootDir, `${group.groupId}.partial-${process.pid}`) : join12(options.outputDir, group.groupId);
14097
14107
  try {
14098
- rmSync6(tempDir, { recursive: true, force: true });
14108
+ rmSync5(tempDir, { recursive: true, force: true });
14099
14109
  const superset = await extractVideoFramesRange(
14100
14110
  first.videoPath,
14101
14111
  group.groupId,
@@ -14128,7 +14138,7 @@ async function extractAllVideoFrames(videos, baseDir, options, signal, config, c
14128
14138
  );
14129
14139
  return fallback;
14130
14140
  } finally {
14131
- rmSync6(tempDir, { recursive: true, force: true });
14141
+ rmSync5(tempDir, { recursive: true, force: true });
14132
14142
  }
14133
14143
  }
14134
14144
  const preparedExtractions = await Promise.all(
@@ -14432,7 +14442,7 @@ var FrameLookupTable = class {
14432
14442
  for (const video of this.videos.values()) {
14433
14443
  if (video.extracted.ownedByLookup) continue;
14434
14444
  if (existsSync9(video.extracted.outputDir)) {
14435
- rmSync6(video.extracted.outputDir, { recursive: true, force: true });
14445
+ rmSync5(video.extracted.outputDir, { recursive: true, force: true });
14436
14446
  }
14437
14447
  }
14438
14448
  this.videos.clear();
@@ -14937,7 +14947,7 @@ async function queryElementStacking(page, nativeHdrIds) {
14937
14947
  }
14938
14948
 
14939
14949
  // ../engine/src/services/audioMixer.ts
14940
- import { closeSync as closeSync4, existsSync as existsSync11, mkdirSync as mkdirSync7, mkdtempSync as mkdtempSync9, openSync as openSync4, rmSync as rmSync8, writeFileSync as writeFileSync7 } from "fs";
14950
+ import { closeSync as closeSync4, existsSync as existsSync11, mkdirSync as mkdirSync7, mkdtempSync as mkdtempSync9, openSync as openSync4, rmSync as rmSync7, writeFileSync as writeFileSync7 } from "fs";
14941
14951
  import { join as join16, dirname as dirname7, isAbsolute, relative } from "path";
14942
14952
 
14943
14953
  // ../engine/src/utils/notMediaPayload.ts
@@ -15286,7 +15296,7 @@ function audioFailureDiagnostics(values) {
15286
15296
  }
15287
15297
 
15288
15298
  // ../engine/src/services/audioVolumeEnvelope.ts
15289
- import { mkdtempSync as mkdtempSync7, readFileSync as readFileSync6, rmSync as rmSync7, writeFileSync as writeFileSync5 } from "fs";
15299
+ import { mkdtempSync as mkdtempSync7, readFileSync as readFileSync6, rmSync as rmSync6, writeFileSync as writeFileSync5 } from "fs";
15290
15300
  import { dirname as dirname6, join as join14 } from "path";
15291
15301
 
15292
15302
  // ../core/dist/runtime/mediaVolumeEnvelope.js
@@ -15423,7 +15433,7 @@ function applyVolumeEnvelopeToWav(wavPath, keyframes, trackStart, baseVolume) {
15423
15433
  } finally {
15424
15434
  if (stagingDir) {
15425
15435
  try {
15426
- rmSync7(stagingDir, { recursive: true, force: true });
15436
+ rmSync6(stagingDir, { recursive: true, force: true });
15427
15437
  } catch {
15428
15438
  }
15429
15439
  }
@@ -16004,6 +16014,11 @@ async function applyAudioFxChain(inputWav, chain, outputWav, options) {
16004
16014
  }
16005
16015
  });
16006
16016
  }
16017
+ var fxBrowserArgs;
16018
+ var fxChromeArgs = () => fxBrowserArgs ??= buildChromeArgs(
16019
+ { width: 1280, height: 720, captureMode: "screenshot" },
16020
+ { browserGpuMode: "software" }
16021
+ );
16007
16022
  async function withFxBrowser(options, body) {
16008
16023
  const hostDir = mkdtempSync8(join15(tmpdir5(), "hf-fx-host-"));
16009
16024
  let lease = null;
@@ -16011,7 +16026,7 @@ async function withFxBrowser(options, body) {
16011
16026
  if (options.signal?.aborted) {
16012
16027
  throw new AudioFxRenderError(`Audio FX cancelled for track ${options.trackId}`);
16013
16028
  }
16014
- lease = await acquireBrowser(["--no-sandbox", "--autoplay-policy=no-user-gesture-required"]);
16029
+ lease = await acquireBrowser(fxChromeArgs());
16015
16030
  const { browser } = lease;
16016
16031
  return await body(() => openFxPage(browser, hostDir));
16017
16032
  } catch (err) {
@@ -16152,11 +16167,11 @@ function buildAtempoFilter(playbackRate) {
16152
16167
  }
16153
16168
  var RAMP_SLICE_SECONDS = 0.25;
16154
16169
  var MAX_RAMP_SLICES = 240;
16155
- function buildRampFilterComplex(lane, duration, headFilter, tailFilter) {
16170
+ function buildRampFilterComplex(lane, duration, headFilter, tailFilter, input) {
16156
16171
  const slices = Math.min(MAX_RAMP_SLICES, Math.max(1, Math.ceil(duration / RAMP_SLICE_SECONDS)));
16157
16172
  const step = duration / slices;
16158
16173
  const split = Array.from({ length: slices }, (_, i) => `[s${i}]`).join("");
16159
- const parts = [`[0:a]${headFilter ? `${headFilter},` : ""}asplit=${slices}${split}`];
16174
+ const parts = [`[${input}]${headFilter ? `${headFilter},` : ""}asplit=${slices}${split}`];
16160
16175
  for (let i = 0; i < slices; i += 1) {
16161
16176
  const from = sourceTimeAt(lane, i * step);
16162
16177
  const to = sourceTimeAt(lane, (i + 1) * step);
@@ -16176,16 +16191,22 @@ function buildRampFilterComplex(lane, duration, headFilter, tailFilter) {
16176
16191
  if (tailFilter) parts.push(`[cat]${tailFilter}[out]`);
16177
16192
  return parts.join(";");
16178
16193
  }
16179
- function preparedAudioOutputArgs(metadata, playbackRate, duration, headFilter) {
16194
+ function preparedAudioOutputArgs(metadata, playbackRate, duration, headFilter, stream) {
16180
16195
  const channelFilter = metadata?.channels === 1 ? STEREO_CHANNEL_FILTER : null;
16181
16196
  const outputArgs = channelFilter ? [] : ["-ac", "2"];
16182
16197
  if (typeof playbackRate === "object") {
16183
- const graph = buildRampFilterComplex(playbackRate, duration, headFilter, channelFilter);
16198
+ const graph = buildRampFilterComplex(
16199
+ playbackRate,
16200
+ duration,
16201
+ headFilter,
16202
+ channelFilter,
16203
+ stream ?? "0:a"
16204
+ );
16184
16205
  return ["-filter_complex", graph, "-map", "[out]", ...outputArgs];
16185
16206
  }
16186
16207
  const filters = [headFilter, channelFilter, buildAtempoFilter(playbackRate)].filter(Boolean);
16187
16208
  if (filters.length > 0) outputArgs.push("-af", filters.join(","));
16188
- return outputArgs;
16209
+ return [...stream ? ["-map", stream] : [], ...outputArgs];
16189
16210
  }
16190
16211
  function escapeExpressionCommas(expression) {
16191
16212
  return expression.replace(/\\/g, "\\\\").replace(/,/g, "\\,");
@@ -16508,7 +16529,13 @@ async function extractAudioSegment(srcPath, outputPath, stage, mediaStart, durat
16508
16529
  { padToDuration: true }
16509
16530
  );
16510
16531
  if (!cycle.success) return { ...cycle, outputPath };
16511
- const outputArgs2 = preparedAudioOutputArgs(metadata, normalizedPlaybackRate, duration, null);
16532
+ const outputArgs2 = preparedAudioOutputArgs(
16533
+ metadata,
16534
+ normalizedPlaybackRate,
16535
+ duration,
16536
+ null,
16537
+ null
16538
+ );
16512
16539
  const result2 = await runFfmpeg(
16513
16540
  [
16514
16541
  "-stream_loop",
@@ -16554,7 +16581,8 @@ async function extractAudioSegment(srcPath, outputPath, stage, mediaStart, durat
16554
16581
  [
16555
16582
  warmUp > 0 ? `atrim=start=${warmUp},asetpts=PTS-STARTPTS` : timestampTrim,
16556
16583
  ...options?.padToDuration ? ["apad"] : []
16557
- ].filter(Boolean).join(",") || null
16584
+ ].filter(Boolean).join(",") || null,
16585
+ metadata ? `0:a:${metadata.audioStream}` : null
16558
16586
  );
16559
16587
  const readFrom = fromSidecar ? audioSidecarUrl : srcPath;
16560
16588
  const args = [
@@ -17235,7 +17263,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
17235
17263
  ).catch((err) => {
17236
17264
  internalController.abort();
17237
17265
  try {
17238
- rmSync8(workDir, { recursive: true, force: true });
17266
+ rmSync7(workDir, { recursive: true, force: true });
17239
17267
  } catch {
17240
17268
  }
17241
17269
  throw err;
@@ -17260,7 +17288,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
17260
17288
  });
17261
17289
  const removeWorkDir = () => {
17262
17290
  try {
17263
- rmSync8(workDir, { recursive: true, force: true });
17291
+ rmSync7(workDir, { recursive: true, force: true });
17264
17292
  } catch {
17265
17293
  }
17266
17294
  };
@@ -17419,7 +17447,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
17419
17447
  // ../engine/src/services/parallelCoordinator.ts
17420
17448
  import { cpus as cpus3, freemem } from "os";
17421
17449
  import { existsSync as existsSync12, mkdirSync as mkdirSync8, readdirSync as readdirSync6 } from "fs";
17422
- import { copyFile as copyFile2, readFile as readFile2 } from "fs/promises";
17450
+ import { copyFile, readFile as readFile2 } from "fs/promises";
17423
17451
  import { join as join18 } from "path";
17424
17452
  import { getHeapStatistics } from "v8";
17425
17453
 
@@ -18156,7 +18184,7 @@ async function mergeWorkerFrames(workDir, tasks, outputDir) {
18156
18184
  try {
18157
18185
  await renameWithRetryAsync(sourcePath, targetPath);
18158
18186
  } catch {
18159
- await copyFile2(sourcePath, targetPath);
18187
+ await copyFile(sourcePath, targetPath);
18160
18188
  }
18161
18189
  });
18162
18190
  await Promise.all(copyTasks);
@@ -18609,6 +18637,12 @@ export {
18609
18637
  SDR_RGB_TO_BT709_FILTER,
18610
18638
  SDR_RGB_TO_TAGGED_BT709_FILTER,
18611
18639
  explainChromeLaunchFailure,
18640
+ machServiceDenied,
18641
+ pipeLaunchClosedOnMac,
18642
+ inAgentSandbox,
18643
+ oneProcessOverPipe,
18644
+ isOneProcessOverPipe,
18645
+ sandboxDeniedRemediation,
18612
18646
  BrowserLeasePool,
18613
18647
  setHostHandlesSigint,
18614
18648
  resolveHeadlessShellPath,
@@ -18727,6 +18761,9 @@ export {
18727
18761
  appendRenderProvenanceArgs,
18728
18762
  readRenderProvenance,
18729
18763
  ENCODER_PRESETS,
18764
+ PRORES_PROFILE_NAMES,
18765
+ PRORES_PROFILES,
18766
+ isProresProfile,
18730
18767
  getEncoderPreset,
18731
18768
  keyframeIntervalToGopSize,
18732
18769
  appendRateCapArgs,
@@ -18753,10 +18790,6 @@ export {
18753
18790
  fetchPublicHttpsText,
18754
18791
  downloadToTemp,
18755
18792
  isHttpUrl,
18756
- removeScratch,
18757
- collectScratchLeftovers,
18758
- renameWithRetry,
18759
- renameWithRetryAsync,
18760
18793
  directorySizeBytes,
18761
18794
  gcExtractionCache,
18762
18795
  VIDEO_FRAME_FORMATS,