hyperframes 0.8.189 → 0.8.190-hdr.1
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-TIKUM2YX.js → add-42OFT2PY.js} +11 -11
- package/dist/{animatedGifPrep-25X4G5IE.js → animatedGifPrep-ADGDO7XY.js} +5 -5
- package/dist/api.js +13 -13
- package/dist/{asset-TPKLIP4R.js → asset-O67VPO3R.js} +2 -2
- package/dist/{assetCataloger-PQAIV3FI.js → assetCataloger-6XITUU4Q.js} +5 -5
- package/dist/{audio-6RLPKB5X.js → audio-XKJ3ZIDS.js} +11 -11
- package/dist/{auth-O7QSTP6Y.js → auth-OQPI6LUT.js} +1 -1
- package/dist/{autoUpdate-TIEJODP7.js → autoUpdate-A2N5A6DZ.js} +2 -2
- package/dist/{backgroundChecks-K2AXYDYG.js → backgroundChecks-WMA3TUHP.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-ORVWYJAH.js → batchRender-QZKFVWEI.js} +3 -3
- package/dist/{beats-2VTB2ATR.js → beats-36HTUETR.js} +4 -4
- package/dist/{benchmark-NLNBL6YR.js → benchmark-PPJOA4I5.js} +8 -8
- package/dist/{browser-M5UV6VJB.js → browser-ZVRJHCG5.js} +3 -3
- package/dist/{bundleWithLocalizedFonts-EDD2XDS2.js → bundleWithLocalizedFonts-R64YXJL5.js} +2 -2
- package/dist/{capture-JSYVNFKO.js → capture-U7E5PPGU.js} +8 -8
- package/dist/{capture-WHWEE5FE.js → capture-YFK4OMCA.js} +2 -2
- package/dist/{captureCompositionFrame-JANGQCIA.js → captureCompositionFrame-DSKY6NL7.js} +10 -10
- package/dist/{catalog-MPOOKNSZ.js → catalog-AYZ2KQMV.js} +11 -11
- package/dist/{catch-up-6KZV3UMZ.js → catch-up-EXF4BC4Z.js} +4 -4
- package/dist/{check-G273NWK7.js → check-4CTWFC7P.js} +32 -32
- package/dist/{checkBrowser-G53E2ZQI.js → checkBrowser-JCZJGHYX.js} +27 -27
- package/dist/{chunk-E7TI5PAQ.js → chunk-2ICQSIZZ.js} +1 -1
- package/dist/{chunk-74Y43RJZ.js → chunk-3B35XAD2.js} +3 -3
- package/dist/{chunk-QYQ2EYOI.js → chunk-3Q5WJY5E.js} +3 -3
- package/dist/{chunk-HXM2ISEK.js → chunk-4BINHKAB.js} +245 -208
- package/dist/{chunk-R5FS7GFU.js → chunk-4TFBD773.js} +1 -1
- package/dist/{chunk-WYCFMNU3.js → chunk-56IOFIYB.js} +1 -1
- package/dist/{chunk-NSJ5HD6A.js → chunk-5XD6QAMF.js} +5 -5
- package/dist/{chunk-WMJJCHVQ.js → chunk-6HYHHMX3.js} +2 -2
- package/dist/{chunk-NDBWI7OA.js → chunk-6OJBN6P4.js} +5 -5
- package/dist/{chunk-6RA4TWGV.js → chunk-6TBDO6H6.js} +1 -1
- package/dist/{chunk-M6FHSQZ3.js → chunk-7DJCW4YE.js} +3 -3
- package/dist/{chunk-3OLOVRWS.js → chunk-7KTMMDHC.js} +1 -1
- package/dist/{chunk-5544QB3U.js → chunk-A4WDFBHY.js} +1 -1
- package/dist/{chunk-TFUAKV6O.js → chunk-AGUVIOZR.js} +1 -1
- package/dist/{chunk-CTF7BYCV.js → chunk-AMGFHO6X.js} +2 -2
- package/dist/{chunk-B634ZCY2.js → chunk-ATQTK7CJ.js} +1 -1
- package/dist/{chunk-5HJJEHGE.js → chunk-AYFF3GX6.js} +1 -1
- package/dist/{chunk-4QFKGRTB.js → chunk-B7JFAXDP.js} +2 -2
- package/dist/{chunk-BZQLTNMB.js → chunk-BT64TTSE.js} +1 -1
- package/dist/{chunk-3X6LH25W.js → chunk-BWPY64WA.js} +1 -1
- package/dist/{chunk-JZDVIDFH.js → chunk-CWRAVNDW.js} +2 -2
- package/dist/chunk-DIV37NUE.js +3896 -0
- package/dist/{chunk-ANYBRVPF.js → chunk-E65UJDKR.js} +1 -1
- package/dist/{chunk-565X6Q4X.js → chunk-E6BMTU6F.js} +16 -8
- package/dist/{chunk-AQ3L7DVB.js → chunk-EPOYPP36.js} +2 -2
- package/dist/{chunk-TREMHDWT.js → chunk-EQXUGT5K.js} +9 -9
- package/dist/{chunk-ASZ4IQB4.js → chunk-EYBS6GH2.js} +2 -2
- package/dist/{chunk-B52BJM5K.js → chunk-EZFGQAYH.js} +2 -2
- package/dist/{chunk-37EPEFXM.js → chunk-GWE3UEGX.js} +1 -1
- package/dist/{chunk-CSYSEPWL.js → chunk-HJZ5CPZA.js} +5 -5
- package/dist/{chunk-44TJOEH5.js → chunk-ID4S5OVW.js} +16 -16
- package/dist/{chunk-HQIFMCQN.js → chunk-ILIPOK4L.js} +43 -27
- package/dist/{chunk-F45HHA3M.js → chunk-JVG4G46L.js} +1 -1
- package/dist/{chunk-AYBKDHYD.js → chunk-KVZ4ZANT.js} +1 -1
- package/dist/{chunk-ZPMF6GAQ.js → chunk-L34DPWY4.js} +11 -7
- package/dist/{chunk-OHXHBMF4.js → chunk-LJKMM3XW.js} +1 -1
- package/dist/{chunk-KLWUB37U.js → chunk-O6NHRPQV.js} +7 -7
- package/dist/{chunk-TPTQHOXU.js → chunk-OAZGGUCB.js} +9 -9
- package/dist/{chunk-GBT7P3OQ.js → chunk-PFMLW2WE.js} +4 -4
- package/dist/{chunk-FJF5JBYU.js → chunk-PWEK5IYU.js} +1 -1
- package/dist/{chunk-2CYM34M7.js → chunk-RDHEG7RX.js} +2 -2
- package/dist/{chunk-VRQU564T.js → chunk-SUSSMCWL.js} +1 -1
- package/dist/{chunk-4DZ3HBKF.js → chunk-T6MUUXE3.js} +1 -1
- package/dist/{chunk-SMF6YAUL.js → chunk-TSQAPPRS.js} +1 -1
- package/dist/{chunk-IFXOMIBP.js → chunk-U4DWSOH5.js} +3 -3
- package/dist/{chunk-E676Y7AY.js → chunk-UASUPXBJ.js} +27 -13
- package/dist/{chunk-GWYMAII7.js → chunk-UQMPHIOA.js} +1 -1
- package/dist/{chunk-T37XXYRK.js → chunk-UWSJL63I.js} +1 -1
- package/dist/{chunk-Z2BW2WJS.js → chunk-UZ7RJDEC.js} +1 -1
- package/dist/{chunk-QMFI4N7J.js → chunk-WBUO6WH6.js} +1 -1
- package/dist/{chunk-KS4HMJJD.js → chunk-XBZEQTBH.js} +1 -1
- package/dist/{chunk-HUG47UEE.js → chunk-XNLYMHX2.js} +1 -1
- package/dist/{chunk-JIPUWKLA.js → chunk-XRYN74FP.js} +11 -11
- package/dist/{chunk-XJVXROOL.js → chunk-XSDZ3H5H.js} +2 -2
- package/dist/{chunk-HNMDLKA4.js → chunk-YDGW5KWX.js} +1 -1
- package/dist/{chunk-SGFMCNLY.js → chunk-ZFFKWHXN.js} +1 -1
- package/dist/{chunk-IPEP346Y.js → chunk-ZKWXDQAE.js} +1 -1
- package/dist/{clean-PS4VYGQ6.js → clean-2JS7FOL5.js} +13 -13
- package/dist/cli.js +53 -53
- package/dist/{cloud-E47CE5VQ.js → cloud-HCB6VY6B.js} +4 -4
- package/dist/{cloudrun-3J4SQBXE.js → cloudrun-CTNX64R6.js} +4 -4
- package/dist/{compare-EAKHXBDO.js → compare-ISRKIX34.js} +24 -24
- package/dist/{compiler-23MT6CX6.js → compiler-EJE3HLCS.js} +2 -2
- package/dist/{component-QBOXYJJS.js → component-ZBPQXTNP.js} +3 -3
- package/dist/{compositions-QC3EO3MJ.js → compositions-WOZU3EYH.js} +9 -9
- package/dist/{delete-TXEOLPC6.js → delete-NX3DWOKP.js} +2 -2
- package/dist/{deploy-3B3WJ6PM.js → deploy-RW7L3BHN.js} +1 -1
- package/dist/{dist-F4UJFK4S.js → dist-NHW2JQCA.js} +2 -2
- package/dist/{doctor-2CRFH4B3.js → doctor-KFHSQJWL.js} +9 -9
- package/dist/{events-KVTX3QFV.js → events-RY3Z2CFX.js} +2 -2
- package/dist/{events-GUIOSBIB.js → events-YT6WKFUT.js} +3 -3
- package/dist/{feedback-VQIOSTIB.js → feedback-GRNEVOPP.js} +6 -6
- package/dist/{ffmpeg-BPCZGXFW.js → ffmpeg-BTEY5DB5.js} +5 -5
- package/dist/{figma-QIOKCH26.js → figma-WN7BLU45.js} +3 -3
- package/dist/fontLocalizeCli.js +7 -7
- package/dist/{get-TU45SNXF.js → get-DVXYGS3H.js} +2 -2
- package/dist/{gpuPolicy-AWAJBGYY.js → gpuPolicy-MWZSLJFR.js} +5 -5
- package/dist/{grade-compare-LDNUXX3Q.js → grade-compare-LQXE5JYS.js} +25 -25
- package/dist/{help-YUCHJKKL.js → help-22RCD5VH.js} +1 -1
- package/dist/{history-MMHFUMIG.js → history-IF553ERO.js} +6 -6
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +62 -62
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/{info-HBHOFSC2.js → info-VQGFR3XN.js} +7 -7
- package/dist/{init-3E4GUXIZ.js → init-UPM6HJKO.js} +25 -25
- package/dist/{inspect-YNUPJVIH.js → inspect-S2XEY7E2.js} +25 -25
- package/dist/{installer-WLCRP33K.js → installer-PQKH2S7C.js} +4 -4
- package/dist/{keyframes-Z47GHCGO.js → keyframes-54Q3I2A5.js} +6 -6
- package/dist/{lambda-CA4PEUO2.js → lambda-6IGRFK3D.js} +6 -6
- package/dist/{layout-YPV6PIKF.js → layout-ZIE7P36K.js} +25 -25
- package/dist/{lint-3AVVQ74A.js → lint-ONB3UNVL.js} +6 -6
- package/dist/{list-JH52Y735.js → list-P5VNTBT4.js} +2 -2
- package/dist/{login-G7NPJUAW.js → login-7ROFE2PP.js} +4 -4
- package/dist/{manager-2LSMMZY4.js → manager-4IBU76NA.js} +6 -6
- package/dist/{media-treatment-BVMMD5EN.js → media-treatment-GUZYPOL5.js} +11 -11
- package/dist/{models-P3TNRVRV.js → models-POH5ZYWG.js} +9 -9
- package/dist/{motionShot-LK62QHNE.js → motionShot-TXQ7EFJW.js} +13 -13
- package/dist/{normalize-audio-Y7BAQ7AR.js → normalize-audio-SFFU7VUW.js} +4 -4
- package/dist/{open-CCFFLAT7.js → open-2MY4ESCL.js} +11 -11
- package/dist/{parakeetRunner-N2BWSOSD.js → parakeetRunner-7UPEE7SO.js} +10 -10
- package/dist/{pipeline-3VT2DQGU.js → pipeline-VZMOR53B.js} +6 -6
- package/dist/{play-G4I5IFHO.js → play-IOELJ2NM.js} +16 -16
- package/dist/{preflight-2KU2QLCZ.js → preflight-MGUBNYUV.js} +6 -6
- package/dist/{present-EJ7XHGQO.js → present-7LOVKMN7.js} +12 -12
- package/dist/{preview-O23BYFAY.js → preview-XN7YD5ZP.js} +16 -16
- package/dist/{producer-UJQVLKLP.js → producer-BLRL4SQP.js} +1 -1
- package/dist/{projectConfig-QFVIBT37.js → projectConfig-LN3NR5OM.js} +6 -6
- package/dist/{publication-4UYGFB2X.js → publication-TXMCS4KM.js} +2 -2
- package/dist/{publish-MHLVJLCR.js → publish-57VURD7Z.js} +7 -7
- package/dist/{remove-background-N7AHTZWP.js → remove-background-OOF3QB2R.js} +7 -7
- package/dist/{render-EI2ODKOP.js → render-E27W7W3K.js} +26 -26
- package/dist/{render-CDATEVDJ.js → render-IDI4KMVH.js} +12 -12
- package/dist/{render-6HQV4LZJ.js → render-SP7WAUB4.js} +5 -5
- package/dist/{render-batch-F7HMC7XH.js → render-batch-7ULP5RIJ.js} +5 -5
- package/dist/{resolver-63DB5JCY.js → resolver-D3XERO6U.js} +4 -4
- package/dist/{sherpa-AK3MTPL3.js → sherpa-B7HLM6FV.js} +9 -9
- package/dist/skills/hyperframes/references/motion.md +1 -1
- package/dist/{skills-EVIDL7PV.js → skills-JASL5NGP.js} +5 -5
- package/dist/{skillsUpdateCheck-YCNJYDJO.js → skillsUpdateCheck-OTF363HZ.js} +3 -3
- package/dist/{snapshot-WSYZKR3C.js → snapshot-MWBENTZA.js} +29 -29
- package/dist/{src-YNXBU4ZQ.js → src-65S55XOQ.js} +4 -4
- package/dist/{src-KTD6WTEV.js → src-OGTPL3Q6.js} +6 -6
- package/dist/{staticProjectServer-D2D3BKBP.js → staticProjectServer-JMFGTPMX.js} +13 -13
- package/dist/studio/assets/{hyperframes-player-CkK8Zijf.js → hyperframes-player-BV6dTpsG.js} +1 -1
- package/dist/studio/assets/{index-CESvLzz0.css → index-B3vk3hfU.css} +1 -1
- package/dist/studio/assets/{index-ATnRoBug.js → index-CPVUyhno.js} +1 -1
- package/dist/studio/assets/{index-B2JcCaRF.js → index-Ct_WfjBH.js} +127 -127
- package/dist/studio/index.html +2 -2
- package/dist/{studio-api-3ZGQPE5J.js → studio-api-SZ4OMFPN.js} +6 -6
- package/dist/{studioServer-VWM4J7ZP.js → studioServer-6JDUXBF7.js} +42 -42
- package/dist/{telemetry-BEVI64BB.js → telemetry-R7QKFTNL.js} +3 -3
- package/dist/{timeline-P57FUXJQ.js → timeline-GTUWGREV.js} +14 -14
- package/dist/{tokens-OUQY6LPD.js → tokens-2JZSWS5F.js} +2 -2
- package/dist/{transcribe-QUPX67KC.js → transcribe-M7OSQ5OU.js} +14 -14
- package/dist/{transcribe-CK66VIU4.js → transcribe-PSZC4HH6.js} +8 -8
- package/dist/{updateCheck-XZ43CH3L.js → updateCheck-Y4MKTYXE.js} +2 -2
- package/dist/{upgrade-7QQNGI7I.js → upgrade-WHEHL2KG.js} +2 -2
- package/dist/{urlDownloader-ESAEL6YX.js → urlDownloader-VN2X7CIY.js} +4 -4
- package/dist/{validate-5GZ6KFRU.js → validate-TC66RN5I.js} +19 -19
- package/dist/{video-AQNVR6PE.js → video-SNGPARSX.js} +5 -5
- package/dist/warmCheck.js +32 -32
- package/package.json +1 -1
- package/dist/chunk-BPX7LZG6.js +0 -3896
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
renderFrameIdForRenderId,
|
|
27
27
|
resolveAuthoredTimingWindow,
|
|
28
28
|
toFps
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-56IOFIYB.js";
|
|
30
30
|
import {
|
|
31
31
|
AUDIO_GROUP_RENDER_ID_ATTR,
|
|
32
32
|
COLOR_GRADING_SOURCE_HIDDEN_ATTR,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
sourceTimeAt,
|
|
64
64
|
timeAtSourceTime,
|
|
65
65
|
volumeSegmentSampleCount
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-DIV37NUE.js";
|
|
67
67
|
import {
|
|
68
68
|
clampAudioGain,
|
|
69
69
|
clipGain,
|
|
@@ -1090,7 +1090,6 @@ var BEGINFRAME_ONLY_FLAGS = /* @__PURE__ */ new Set([
|
|
|
1090
1090
|
function stripBeginFrameFlags(args) {
|
|
1091
1091
|
return args.filter((a) => !BEGINFRAME_ONLY_FLAGS.has(a));
|
|
1092
1092
|
}
|
|
1093
|
-
var BEGINFRAME_SCREENSHOT_PROBE_ATTEMPTS = 10;
|
|
1094
1093
|
var BEGINFRAME_PROBE_TIMEOUT_MS = 2e3;
|
|
1095
1094
|
var BEGINFRAME_PROBE_CLEANUP_TIMEOUT_MS = 250;
|
|
1096
1095
|
async function awaitBeforeDeadline(operation, deadline, label) {
|
|
@@ -1174,7 +1173,8 @@ async function probeBeginFrameSupport(browser, timeoutMs = BEGINFRAME_PROBE_TIME
|
|
|
1174
1173
|
let bytes = Buffer.alloc(0);
|
|
1175
1174
|
let isPng = false;
|
|
1176
1175
|
let attempts = 0;
|
|
1177
|
-
|
|
1176
|
+
while (!isPng && Date.now() < deadline) {
|
|
1177
|
+
attempts += 1;
|
|
1178
1178
|
const response = await awaitBeforeDeadline(
|
|
1179
1179
|
client.send("HeadlessExperimental.beginFrame", {
|
|
1180
1180
|
frameTimeTicks: 1e3 + (attempts - 1) * 33,
|
|
@@ -1187,7 +1187,7 @@ async function probeBeginFrameSupport(browser, timeoutMs = BEGINFRAME_PROBE_TIME
|
|
|
1187
1187
|
const screenshot = response.screenshotData ?? "";
|
|
1188
1188
|
bytes = screenshot ? Buffer.from(screenshot, "base64") : Buffer.alloc(0);
|
|
1189
1189
|
isPng = bytes.length >= 8 && bytes[0] === 137 && bytes[1] === 80 && bytes[2] === 78 && bytes[3] === 71;
|
|
1190
|
-
if (isPng) break;
|
|
1190
|
+
if (isPng || Date.now() + 10 >= deadline) break;
|
|
1191
1191
|
await awaitBeforeDeadline(
|
|
1192
1192
|
new Promise((resolveDelay) => setTimeout(resolveDelay, 10)),
|
|
1193
1193
|
deadline,
|
|
@@ -1196,7 +1196,7 @@ async function probeBeginFrameSupport(browser, timeoutMs = BEGINFRAME_PROBE_TIME
|
|
|
1196
1196
|
}
|
|
1197
1197
|
if (!isPng) {
|
|
1198
1198
|
throw new Error(
|
|
1199
|
-
`beginFrame screenshot returned ${bytes.length} bytes after ${
|
|
1199
|
+
`beginFrame screenshot returned ${bytes.length} bytes after ${attempts} attempts in ${Date.now() - started}ms with signature ${bytes.length >= 4 ? bytes.subarray(0, 4).toString("hex") : "<empty>"}`
|
|
1200
1200
|
);
|
|
1201
1201
|
}
|
|
1202
1202
|
await awaitBeforeDeadline(client.detach(), deadline, "CDP detach").catch(() => {
|
|
@@ -1691,6 +1691,24 @@ identically under Docker. Consider:
|
|
|
1691
1691
|
import { existsSync as existsSync3, mkdirSync, writeFileSync } from "fs";
|
|
1692
1692
|
import { join as join3 } from "path";
|
|
1693
1693
|
|
|
1694
|
+
// ../engine/src/services/renderFrameVideoHold.ts
|
|
1695
|
+
function holdRenderFrameVideos(ids, renderIdAttr) {
|
|
1696
|
+
const held = new Set(ids);
|
|
1697
|
+
window.__HF_RENDER_FRAME_VIDEO_IDS = ids;
|
|
1698
|
+
const hold = (el) => {
|
|
1699
|
+
if (el instanceof HTMLVideoElement && held.has(el.getAttribute(renderIdAttr) || el.id))
|
|
1700
|
+
el.preload = "none";
|
|
1701
|
+
};
|
|
1702
|
+
new MutationObserver((records) => {
|
|
1703
|
+
for (const record2 of records)
|
|
1704
|
+
for (const node of record2.addedNodes) {
|
|
1705
|
+
if (node.nodeType !== 1) continue;
|
|
1706
|
+
hold(node);
|
|
1707
|
+
for (const video of node.querySelectorAll("video")) hold(video);
|
|
1708
|
+
}
|
|
1709
|
+
}).observe(document, { childList: true, subtree: true });
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1694
1712
|
// ../engine/src/services/drawElementCaptureError.ts
|
|
1695
1713
|
var DrawElementCaptureError = class extends Error {
|
|
1696
1714
|
frameIndex;
|
|
@@ -2548,15 +2566,17 @@ async function readPageMotionBlur(page) {
|
|
|
2548
2566
|
const report = api && typeof api === "object" ? Reflect.get(api, "report") : null;
|
|
2549
2567
|
const got = typeof report === "function" ? report() : null;
|
|
2550
2568
|
if (!got || typeof got !== "object") return null;
|
|
2569
|
+
const tier = Reflect.get(got, "tier");
|
|
2551
2570
|
return {
|
|
2552
2571
|
state: String(Reflect.get(got, "state")),
|
|
2553
2572
|
code: String(Reflect.get(got, "reasonCode")),
|
|
2554
2573
|
movers: Number(Reflect.get(got, "movers")),
|
|
2555
|
-
failedFrames: Number(Reflect.get(got, "failedFrames")) || 0
|
|
2574
|
+
failedFrames: Number(Reflect.get(got, "failedFrames")) || 0,
|
|
2575
|
+
tier: typeof tier === "string" ? tier : null
|
|
2556
2576
|
};
|
|
2557
2577
|
});
|
|
2558
2578
|
}
|
|
2559
|
-
var formatPageMotionBlur = (r) => `[motion-blur] ${r.state} reasonCode=${r.code} movers=${r.movers} failedFrames=${r.failedFrames}`;
|
|
2579
|
+
var formatPageMotionBlur = (r) => `[motion-blur] ${r.state} reasonCode=${r.code} movers=${r.movers} failedFrames=${r.failedFrames}${r.tier ? ` tier=${r.tier}` : ""}`;
|
|
2560
2580
|
async function describePageMotionBlur(page) {
|
|
2561
2581
|
const r = await readPageMotionBlur(page);
|
|
2562
2582
|
return r && formatPageMotionBlur(r);
|
|
@@ -5488,6 +5508,13 @@ async function constructCaptureSession(input) {
|
|
|
5488
5508
|
}
|
|
5489
5509
|
});
|
|
5490
5510
|
await installMediaRenderIdBridge(page);
|
|
5511
|
+
if (options.skipReadinessVideoIds?.length) {
|
|
5512
|
+
await page.evaluateOnNewDocument(
|
|
5513
|
+
holdRenderFrameVideos,
|
|
5514
|
+
options.skipReadinessVideoIds,
|
|
5515
|
+
MEDIA_RENDER_ID_ATTR
|
|
5516
|
+
);
|
|
5517
|
+
}
|
|
5491
5518
|
if (useDrawElement) {
|
|
5492
5519
|
await page.evaluateOnNewDocument(instrumentAcceleratedCanvases);
|
|
5493
5520
|
}
|
|
@@ -8995,8 +9022,10 @@ async function analyzeKeyframeIntervalsUncached(filePath, videoStreamStartSecond
|
|
|
8995
9022
|
|
|
8996
9023
|
// ../engine/src/services/softwareEncoderThreads.ts
|
|
8997
9024
|
import { availableParallelism } from "os";
|
|
8998
|
-
|
|
8999
|
-
|
|
9025
|
+
var X265_MAX_THREADS = 16;
|
|
9026
|
+
function appendSoftwareEncoderThreadsArg(args, encoder, parallelism = availableParallelism()) {
|
|
9027
|
+
const cap = encoder === "libx265" ? X265_MAX_THREADS : Infinity;
|
|
9028
|
+
args.push("-threads", String(Math.min(cap, Math.max(1, Math.floor(parallelism)))));
|
|
9000
9029
|
}
|
|
9001
9030
|
|
|
9002
9031
|
// ../engine/src/utils/renderProvenance.ts
|
|
@@ -9223,7 +9252,7 @@ function buildEncoderArgs(options, inputArgs, outputPath, gpuEncoder = null) {
|
|
|
9223
9252
|
} else {
|
|
9224
9253
|
const encoderName = codec === "h264" ? "libx264" : "libx265";
|
|
9225
9254
|
args.push("-c:v", encoderName, "-preset", preset);
|
|
9226
|
-
appendSoftwareEncoderThreadsArg(args);
|
|
9255
|
+
appendSoftwareEncoderThreadsArg(args, encoderName);
|
|
9227
9256
|
if (bitrate) args.push("-b:v", bitrate);
|
|
9228
9257
|
else args.push("-crf", String(quality));
|
|
9229
9258
|
const gop = resolveLockedGopSize(options);
|
|
@@ -9928,7 +9957,7 @@ function buildStreamingArgs(options, outputPath, gpuEncoder = null) {
|
|
|
9928
9957
|
} else {
|
|
9929
9958
|
const encoderName = codec === "h264" ? "libx264" : "libx265";
|
|
9930
9959
|
args.push("-c:v", encoderName, "-preset", preset);
|
|
9931
|
-
appendSoftwareEncoderThreadsArg(args);
|
|
9960
|
+
appendSoftwareEncoderThreadsArg(args, encoderName);
|
|
9932
9961
|
if (bitrate) args.push("-b:v", bitrate);
|
|
9933
9962
|
else args.push("-crf", String(quality));
|
|
9934
9963
|
const lockedGop = resolveLockedGopSize(options);
|
|
@@ -14021,6 +14050,9 @@ function clampFadesToDuration(fades, duration) {
|
|
|
14021
14050
|
return { fadeIn: fadeIn * scale, fadeOut: fadeOut * scale };
|
|
14022
14051
|
}
|
|
14023
14052
|
|
|
14053
|
+
// ../engine/src/services/audioMixer.ts
|
|
14054
|
+
import { cpus as cpus2 } from "os";
|
|
14055
|
+
|
|
14024
14056
|
// ../engine/src/services/aacEncode.ts
|
|
14025
14057
|
import { mkdtempSync as mkdtempSync4, readFileSync as readFileSync5, rmSync as rmSync5, writeFileSync as writeFileSync4 } from "fs";
|
|
14026
14058
|
import { dirname as dirname5, join as join11 } from "path";
|
|
@@ -15136,6 +15168,7 @@ function escapeExpressionCommas(expression) {
|
|
|
15136
15168
|
function legacyFilterScriptOptionIsUnsupported(stderr) {
|
|
15137
15169
|
return /filter_complex_script/i.test(stderr) && /(?:unrecognized option|option (?:was )?not found)/i.test(stderr);
|
|
15138
15170
|
}
|
|
15171
|
+
var inPrepareSlot = createConcurrencyLimit(Math.max(2, Math.floor(cpus2().length / 2)));
|
|
15139
15172
|
var MAX_VOLUME_SEGMENTS = 32;
|
|
15140
15173
|
var VOLUME_SIMPLIFY_EPSILON = 5e-3;
|
|
15141
15174
|
var STEREO_CHANNEL_FILTER = "pan=stereo|FL=FL+FC|FR=FR+FC";
|
|
@@ -15862,216 +15895,220 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
|
|
|
15862
15895
|
else signal.addEventListener("abort", () => internalController.abort(), { once: true });
|
|
15863
15896
|
}
|
|
15864
15897
|
await Promise.all(
|
|
15865
|
-
elements.map(
|
|
15866
|
-
|
|
15867
|
-
|
|
15868
|
-
stage: "cancelled",
|
|
15869
|
-
reason: "cancelled",
|
|
15870
|
-
owner: "user",
|
|
15871
|
-
retryable: false,
|
|
15872
|
-
elementId: element.id,
|
|
15873
|
-
detail: boundedDetail(`Cancelled audio element ${element.id}`)
|
|
15874
|
-
});
|
|
15875
|
-
return;
|
|
15876
|
-
}
|
|
15877
|
-
try {
|
|
15878
|
-
let srcPath = element.src;
|
|
15879
|
-
let readInPlace = false;
|
|
15880
|
-
if (!isHttpUrl(srcPath)) {
|
|
15881
|
-
srcPath = resolveProjectRelativeSrc(element.src, baseDir, compiledDir);
|
|
15882
|
-
const remoteUrl = config?.urlByAbsentLocalPath?.get(srcPath);
|
|
15883
|
-
if (remoteUrl) {
|
|
15884
|
-
srcPath = remoteUrl;
|
|
15885
|
-
readInPlace = true;
|
|
15886
|
-
}
|
|
15887
|
-
}
|
|
15888
|
-
if (isHttpUrl(srcPath) && !readInPlace) {
|
|
15889
|
-
try {
|
|
15890
|
-
srcPath = await downloadToTemp(
|
|
15891
|
-
srcPath,
|
|
15892
|
-
workDir,
|
|
15893
|
-
void 0,
|
|
15894
|
-
effectiveSignal,
|
|
15895
|
-
void 0,
|
|
15896
|
-
{
|
|
15897
|
-
onTelemetry: writeUrlDownloadTelemetry
|
|
15898
|
-
}
|
|
15899
|
-
);
|
|
15900
|
-
} catch (err) {
|
|
15901
|
-
failures.push(downloadFailure(err, element.id));
|
|
15902
|
-
return;
|
|
15903
|
-
}
|
|
15904
|
-
}
|
|
15905
|
-
if (!readInPlace && !existsSync11(srcPath)) {
|
|
15898
|
+
elements.map(
|
|
15899
|
+
(element, index) => inPrepareSlot(async () => {
|
|
15900
|
+
if (effectiveSignal.aborted) {
|
|
15906
15901
|
failures.push({
|
|
15907
|
-
stage: "
|
|
15908
|
-
reason: "
|
|
15902
|
+
stage: "cancelled",
|
|
15903
|
+
reason: "cancelled",
|
|
15909
15904
|
owner: "user",
|
|
15910
15905
|
retryable: false,
|
|
15911
15906
|
elementId: element.id,
|
|
15912
|
-
detail: boundedDetail(
|
|
15907
|
+
detail: boundedDetail(`Cancelled audio element ${element.id}`)
|
|
15913
15908
|
});
|
|
15914
15909
|
return;
|
|
15915
15910
|
}
|
|
15916
|
-
|
|
15917
|
-
|
|
15918
|
-
|
|
15919
|
-
|
|
15920
|
-
|
|
15921
|
-
|
|
15922
|
-
|
|
15923
|
-
|
|
15924
|
-
|
|
15925
|
-
|
|
15926
|
-
}
|
|
15927
|
-
|
|
15928
|
-
|
|
15929
|
-
|
|
15930
|
-
|
|
15931
|
-
|
|
15932
|
-
|
|
15911
|
+
try {
|
|
15912
|
+
let srcPath = element.src;
|
|
15913
|
+
let readInPlace = false;
|
|
15914
|
+
if (!isHttpUrl(srcPath)) {
|
|
15915
|
+
srcPath = resolveProjectRelativeSrc(element.src, baseDir, compiledDir);
|
|
15916
|
+
const remoteUrl = config?.urlByAbsentLocalPath?.get(srcPath);
|
|
15917
|
+
if (remoteUrl) {
|
|
15918
|
+
srcPath = remoteUrl;
|
|
15919
|
+
readInPlace = true;
|
|
15920
|
+
}
|
|
15921
|
+
}
|
|
15922
|
+
if (isHttpUrl(srcPath) && !readInPlace) {
|
|
15923
|
+
try {
|
|
15924
|
+
srcPath = await downloadToTemp(
|
|
15925
|
+
srcPath,
|
|
15926
|
+
workDir,
|
|
15927
|
+
void 0,
|
|
15928
|
+
effectiveSignal,
|
|
15929
|
+
void 0,
|
|
15930
|
+
{
|
|
15931
|
+
onTelemetry: writeUrlDownloadTelemetry
|
|
15932
|
+
}
|
|
15933
|
+
);
|
|
15934
|
+
} catch (err) {
|
|
15935
|
+
failures.push(downloadFailure(err, element.id));
|
|
15936
|
+
return;
|
|
15937
|
+
}
|
|
15938
|
+
}
|
|
15939
|
+
if (!readInPlace && !existsSync11(srcPath)) {
|
|
15940
|
+
failures.push({
|
|
15941
|
+
stage: "source",
|
|
15942
|
+
reason: "source_not_found",
|
|
15943
|
+
owner: "user",
|
|
15944
|
+
retryable: false,
|
|
15945
|
+
elementId: element.id,
|
|
15946
|
+
detail: boundedDetail(
|
|
15947
|
+
missingSourceMessage(element.id, element.src, baseDir, srcPath)
|
|
15948
|
+
)
|
|
15949
|
+
});
|
|
15950
|
+
return;
|
|
15951
|
+
}
|
|
15952
|
+
if (await isNotMediaPayload(srcPath)) {
|
|
15953
|
+
failures.push({
|
|
15954
|
+
stage: "source",
|
|
15955
|
+
reason: "invalid_media",
|
|
15956
|
+
owner: "user",
|
|
15957
|
+
retryable: false,
|
|
15958
|
+
elementId: element.id,
|
|
15959
|
+
detail: boundedDetail(
|
|
15960
|
+
`Audio element ${element.id} source is a text document (HTML/XML/JSON), not media`
|
|
15961
|
+
)
|
|
15962
|
+
});
|
|
15963
|
+
return;
|
|
15964
|
+
}
|
|
15965
|
+
if (element.end - element.start <= 0) {
|
|
15966
|
+
let metadata;
|
|
15967
|
+
try {
|
|
15968
|
+
metadata = await extractAudioMetadata(
|
|
15969
|
+
srcPath,
|
|
15970
|
+
readInPlace ? { signal: effectiveSignal } : void 0
|
|
15971
|
+
);
|
|
15972
|
+
} catch (err) {
|
|
15973
|
+
failures.push(
|
|
15974
|
+
probeFailure(err instanceof Error ? err.message : String(err), element.id)
|
|
15975
|
+
);
|
|
15976
|
+
return;
|
|
15977
|
+
}
|
|
15978
|
+
const effectiveDuration = timeAtSourceTime(
|
|
15979
|
+
normalizeRateSpec(element.playbackRate),
|
|
15980
|
+
metadata.durationSeconds - element.mediaStart
|
|
15981
|
+
);
|
|
15982
|
+
element.end = element.start + (effectiveDuration > 0 ? effectiveDuration : metadata.durationSeconds);
|
|
15983
|
+
}
|
|
15984
|
+
let audioSrcPath = srcPath;
|
|
15985
|
+
if (element.type === "video") {
|
|
15986
|
+
const extractedPath = join14(workDir, `${element.id}-extracted.wav`);
|
|
15987
|
+
const extractResult = await extractAudioSegment(
|
|
15933
15988
|
srcPath,
|
|
15934
|
-
|
|
15989
|
+
extractedPath,
|
|
15990
|
+
"extract",
|
|
15991
|
+
element.mediaStart,
|
|
15992
|
+
element.end - element.start,
|
|
15993
|
+
element.playbackRate,
|
|
15994
|
+
effectiveSignal,
|
|
15995
|
+
config
|
|
15935
15996
|
);
|
|
15936
|
-
|
|
15937
|
-
|
|
15938
|
-
|
|
15997
|
+
if (!extractResult.success) {
|
|
15998
|
+
failures.push(
|
|
15999
|
+
extractResult.failure ? { ...extractResult.failure, elementId: element.id } : {
|
|
16000
|
+
stage: "extract",
|
|
16001
|
+
reason: "ffmpeg_failed",
|
|
16002
|
+
owner: "system",
|
|
16003
|
+
retryable: false,
|
|
16004
|
+
elementId: element.id,
|
|
16005
|
+
detail: boundedDetail(`Audio extract failed for element ${element.id}`)
|
|
16006
|
+
}
|
|
16007
|
+
);
|
|
16008
|
+
return;
|
|
16009
|
+
}
|
|
16010
|
+
audioSrcPath = extractedPath;
|
|
16011
|
+
} else {
|
|
16012
|
+
const trimmedPath = join14(workDir, `${element.id}-trimmed.wav`);
|
|
16013
|
+
const prepResult = await extractAudioSegment(
|
|
16014
|
+
srcPath,
|
|
16015
|
+
trimmedPath,
|
|
16016
|
+
"prepare",
|
|
16017
|
+
element.mediaStart,
|
|
16018
|
+
element.end - element.start,
|
|
16019
|
+
element.playbackRate,
|
|
16020
|
+
effectiveSignal,
|
|
16021
|
+
config
|
|
15939
16022
|
);
|
|
15940
|
-
|
|
16023
|
+
if (!prepResult.success) {
|
|
16024
|
+
failures.push(
|
|
16025
|
+
prepResult.failure ? { ...prepResult.failure, elementId: element.id } : {
|
|
16026
|
+
stage: "prepare",
|
|
16027
|
+
reason: "ffmpeg_failed",
|
|
16028
|
+
owner: "system",
|
|
16029
|
+
retryable: false,
|
|
16030
|
+
elementId: element.id,
|
|
16031
|
+
detail: boundedDetail(`Audio prepare failed for element ${element.id}`)
|
|
16032
|
+
}
|
|
16033
|
+
);
|
|
16034
|
+
return;
|
|
16035
|
+
}
|
|
16036
|
+
audioSrcPath = trimmedPath;
|
|
15941
16037
|
}
|
|
15942
|
-
const
|
|
15943
|
-
|
|
15944
|
-
|
|
15945
|
-
|
|
15946
|
-
|
|
15947
|
-
|
|
15948
|
-
let audioSrcPath = srcPath;
|
|
15949
|
-
if (element.type === "video") {
|
|
15950
|
-
const extractedPath = join14(workDir, `${element.id}-extracted.wav`);
|
|
15951
|
-
const extractResult = await extractAudioSegment(
|
|
15952
|
-
srcPath,
|
|
15953
|
-
extractedPath,
|
|
15954
|
-
"extract",
|
|
15955
|
-
element.mediaStart,
|
|
16038
|
+
const chain = element.fxChain ? parseAudioFxChain(element.fxChain) : void 0;
|
|
16039
|
+
const automation = element.automation ? resolveAutomation(parseAutomation(element.automation), chain) : null;
|
|
16040
|
+
const gainBeforeFx = chain !== void 0 && enabledAudioFxNodes(chain).length > 0;
|
|
16041
|
+
const laneKeyframes = automation ? volumeLaneKeyframes(
|
|
16042
|
+
automation,
|
|
16043
|
+
element.start,
|
|
15956
16044
|
element.end - element.start,
|
|
15957
|
-
element.
|
|
15958
|
-
|
|
15959
|
-
|
|
15960
|
-
);
|
|
15961
|
-
|
|
15962
|
-
|
|
15963
|
-
|
|
15964
|
-
|
|
15965
|
-
|
|
15966
|
-
|
|
15967
|
-
|
|
15968
|
-
|
|
15969
|
-
|
|
16045
|
+
element.volume ?? 1,
|
|
16046
|
+
gainBeforeFx
|
|
16047
|
+
) : null;
|
|
16048
|
+
const tweened = !laneKeyframes && (element.volumeKeyframes?.length ?? 0) > 0;
|
|
16049
|
+
const envelopeKeyframes = laneKeyframes ?? element.volumeKeyframes;
|
|
16050
|
+
const envelope = envelopeKeyframes && envelopeKeyframes.length > 0 ? {
|
|
16051
|
+
keyframes: envelopeKeyframes,
|
|
16052
|
+
trackStart: element.start,
|
|
16053
|
+
baseVolume: element.volume ?? 1
|
|
16054
|
+
} : null;
|
|
16055
|
+
let bakedEnvelope = false;
|
|
16056
|
+
let tailSeconds = 0;
|
|
16057
|
+
if (chain) {
|
|
16058
|
+
tailSeconds = chainTailSeconds(chain, automation ?? void 0);
|
|
16059
|
+
const fxResult = await applyAudioFxChain(
|
|
16060
|
+
audioSrcPath,
|
|
16061
|
+
chain,
|
|
16062
|
+
join14(workDir, `${element.id}-fx.wav`),
|
|
16063
|
+
{
|
|
16064
|
+
trackId: element.id,
|
|
16065
|
+
signal: effectiveSignal,
|
|
16066
|
+
...automation ? { automation } : {},
|
|
16067
|
+
...envelope ? { envelope } : {},
|
|
16068
|
+
...gainBeforeFx ? { inputGain: clipGain(element.volume ?? 1, tweened) } : {}
|
|
15970
16069
|
}
|
|
15971
16070
|
);
|
|
15972
|
-
|
|
16071
|
+
audioSrcPath = fxResult.path;
|
|
16072
|
+
bakedEnvelope = fxResult.envelopeBaked;
|
|
15973
16073
|
}
|
|
15974
|
-
|
|
15975
|
-
|
|
15976
|
-
|
|
15977
|
-
|
|
15978
|
-
|
|
15979
|
-
|
|
15980
|
-
"prepare",
|
|
15981
|
-
element.mediaStart,
|
|
15982
|
-
element.end - element.start,
|
|
15983
|
-
element.playbackRate,
|
|
15984
|
-
effectiveSignal,
|
|
15985
|
-
config
|
|
15986
|
-
);
|
|
15987
|
-
if (!prepResult.success) {
|
|
15988
|
-
failures.push(
|
|
15989
|
-
prepResult.failure ? { ...prepResult.failure, elementId: element.id } : {
|
|
15990
|
-
stage: "prepare",
|
|
15991
|
-
reason: "ffmpeg_failed",
|
|
15992
|
-
owner: "system",
|
|
15993
|
-
retryable: false,
|
|
15994
|
-
elementId: element.id,
|
|
15995
|
-
detail: boundedDetail(`Audio prepare failed for element ${element.id}`)
|
|
15996
|
-
}
|
|
16074
|
+
if (envelope && !bakedEnvelope) {
|
|
16075
|
+
bakedEnvelope = applyVolumeEnvelopeToWav(
|
|
16076
|
+
audioSrcPath,
|
|
16077
|
+
envelope.keyframes,
|
|
16078
|
+
envelope.trackStart,
|
|
16079
|
+
envelope.baseVolume
|
|
15997
16080
|
);
|
|
15998
|
-
return;
|
|
15999
16081
|
}
|
|
16000
|
-
|
|
16001
|
-
|
|
16002
|
-
|
|
16003
|
-
|
|
16004
|
-
|
|
16005
|
-
|
|
16006
|
-
|
|
16007
|
-
|
|
16008
|
-
|
|
16009
|
-
|
|
16010
|
-
|
|
16011
|
-
|
|
16012
|
-
|
|
16013
|
-
|
|
16014
|
-
|
|
16015
|
-
|
|
16016
|
-
|
|
16017
|
-
|
|
16018
|
-
|
|
16019
|
-
|
|
16020
|
-
|
|
16021
|
-
|
|
16022
|
-
|
|
16023
|
-
|
|
16024
|
-
|
|
16025
|
-
|
|
16026
|
-
|
|
16027
|
-
{
|
|
16028
|
-
trackId: element.id,
|
|
16029
|
-
signal: effectiveSignal,
|
|
16030
|
-
...automation ? { automation } : {},
|
|
16031
|
-
...envelope ? { envelope } : {},
|
|
16032
|
-
...gainBeforeFx ? { inputGain: clipGain(element.volume ?? 1, tweened) } : {}
|
|
16033
|
-
}
|
|
16034
|
-
);
|
|
16035
|
-
audioSrcPath = fxResult.path;
|
|
16036
|
-
bakedEnvelope = fxResult.envelopeBaked;
|
|
16037
|
-
}
|
|
16038
|
-
if (envelope && !bakedEnvelope) {
|
|
16039
|
-
bakedEnvelope = applyVolumeEnvelopeToWav(
|
|
16040
|
-
audioSrcPath,
|
|
16041
|
-
envelope.keyframes,
|
|
16042
|
-
envelope.trackStart,
|
|
16043
|
-
envelope.baseVolume
|
|
16044
|
-
);
|
|
16082
|
+
const track = {
|
|
16083
|
+
id: element.id,
|
|
16084
|
+
srcPath: audioSrcPath,
|
|
16085
|
+
start: element.start,
|
|
16086
|
+
end: element.end,
|
|
16087
|
+
mediaStart: element.mediaStart,
|
|
16088
|
+
duration: element.end - element.start,
|
|
16089
|
+
// Gain is already in the samples when baked, so mix at unity.
|
|
16090
|
+
volume: bakedEnvelope || gainBeforeFx && !tweened ? 1 : element.volume ?? 1,
|
|
16091
|
+
volumeKeyframes: bakedEnvelope ? void 0 : envelopeKeyframes ?? void 0,
|
|
16092
|
+
...element.fadeIn ? { fadeIn: element.fadeIn } : {},
|
|
16093
|
+
...element.fadeOut ? { fadeOut: element.fadeOut } : {},
|
|
16094
|
+
...tailSeconds > 0 ? { tailSeconds } : {}
|
|
16095
|
+
};
|
|
16096
|
+
preparedTracks[index] = track;
|
|
16097
|
+
} catch (err) {
|
|
16098
|
+
if (err instanceof AudioFxRenderError) throw err;
|
|
16099
|
+
failures.push({
|
|
16100
|
+
stage: "internal",
|
|
16101
|
+
reason: "internal",
|
|
16102
|
+
owner: "system",
|
|
16103
|
+
retryable: false,
|
|
16104
|
+
elementId: element.id,
|
|
16105
|
+
detail: boundedDetail(
|
|
16106
|
+
`Audio processing failed for element ${element.id}: ${err instanceof Error ? err.message : String(err)}`
|
|
16107
|
+
)
|
|
16108
|
+
});
|
|
16045
16109
|
}
|
|
16046
|
-
|
|
16047
|
-
|
|
16048
|
-
srcPath: audioSrcPath,
|
|
16049
|
-
start: element.start,
|
|
16050
|
-
end: element.end,
|
|
16051
|
-
mediaStart: element.mediaStart,
|
|
16052
|
-
duration: element.end - element.start,
|
|
16053
|
-
// Gain is already in the samples when baked, so mix at unity.
|
|
16054
|
-
volume: bakedEnvelope || gainBeforeFx && !tweened ? 1 : element.volume ?? 1,
|
|
16055
|
-
volumeKeyframes: bakedEnvelope ? void 0 : envelopeKeyframes ?? void 0,
|
|
16056
|
-
...element.fadeIn ? { fadeIn: element.fadeIn } : {},
|
|
16057
|
-
...element.fadeOut ? { fadeOut: element.fadeOut } : {},
|
|
16058
|
-
...tailSeconds > 0 ? { tailSeconds } : {}
|
|
16059
|
-
};
|
|
16060
|
-
preparedTracks[index] = track;
|
|
16061
|
-
} catch (err) {
|
|
16062
|
-
if (err instanceof AudioFxRenderError) throw err;
|
|
16063
|
-
failures.push({
|
|
16064
|
-
stage: "internal",
|
|
16065
|
-
reason: "internal",
|
|
16066
|
-
owner: "system",
|
|
16067
|
-
retryable: false,
|
|
16068
|
-
elementId: element.id,
|
|
16069
|
-
detail: boundedDetail(
|
|
16070
|
-
`Audio processing failed for element ${element.id}: ${err instanceof Error ? err.message : String(err)}`
|
|
16071
|
-
)
|
|
16072
|
-
});
|
|
16073
|
-
}
|
|
16074
|
-
})
|
|
16110
|
+
}, effectiveSignal)
|
|
16111
|
+
)
|
|
16075
16112
|
).catch((err) => {
|
|
16076
16113
|
internalController.abort();
|
|
16077
16114
|
try {
|
|
@@ -16254,7 +16291,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
|
|
|
16254
16291
|
}
|
|
16255
16292
|
|
|
16256
16293
|
// ../engine/src/services/parallelCoordinator.ts
|
|
16257
|
-
import { cpus as
|
|
16294
|
+
import { cpus as cpus3, freemem } from "os";
|
|
16258
16295
|
import { existsSync as existsSync12, mkdirSync as mkdirSync8, readdirSync as readdirSync6 } from "fs";
|
|
16259
16296
|
import { copyFile, readFile as readFile2, rename } from "fs/promises";
|
|
16260
16297
|
import { join as join16 } from "path";
|
|
@@ -16369,7 +16406,7 @@ var MIN_WORKERS = 1;
|
|
|
16369
16406
|
var MAX_WORKER_DIAGNOSTIC_LINES = 8;
|
|
16370
16407
|
var ABSOLUTE_MAX_WORKERS = 24;
|
|
16371
16408
|
function defaultSafeMaxWorkers() {
|
|
16372
|
-
return Math.max(6, Math.min(16, Math.floor(
|
|
16409
|
+
return Math.max(6, Math.min(16, Math.floor(cpus3().length / 8)));
|
|
16373
16410
|
}
|
|
16374
16411
|
var MIN_FRAMES_PER_WORKER = 30;
|
|
16375
16412
|
function shouldDisableBrowserPoolForParallelWorker({
|
|
@@ -16409,7 +16446,7 @@ function formatWorkerFailure(result) {
|
|
|
16409
16446
|
return `${base}; diagnostics: ${diagnostics}`;
|
|
16410
16447
|
}
|
|
16411
16448
|
function computeWorkerSizing(totalFrames, requested, config) {
|
|
16412
|
-
const cpuCount =
|
|
16449
|
+
const cpuCount = cpus3().length;
|
|
16413
16450
|
const totalMemoryMb = getSystemTotalMb();
|
|
16414
16451
|
const heapLimitMb = Math.round(getHeapStatistics().heap_size_limit / (1024 * 1024));
|
|
16415
16452
|
const heapBasedWorkers = Math.max(
|
|
@@ -16964,7 +17001,7 @@ async function mergeWorkerFrames(workDir, tasks, outputDir) {
|
|
|
16964
17001
|
}
|
|
16965
17002
|
function getSystemResources() {
|
|
16966
17003
|
return {
|
|
16967
|
-
cpuCores:
|
|
17004
|
+
cpuCores: cpus3().length,
|
|
16968
17005
|
totalMemoryMB: getSystemTotalMb(),
|
|
16969
17006
|
freeMemoryMB: Math.round(freemem() / (1024 * 1024)),
|
|
16970
17007
|
recommendedWorkers: calculateOptimalWorkers(1e3)
|
|
@@ -6,26 +6,26 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
parakeetRunner
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UQMPHIOA.js";
|
|
10
10
|
import {
|
|
11
11
|
DecodeCancelled,
|
|
12
12
|
prepareSherpaWav,
|
|
13
13
|
sherpaUnsupportedReason,
|
|
14
14
|
transcribeWithSherpa
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7DJCW4YE.js";
|
|
16
16
|
import {
|
|
17
17
|
initialModelForLanguage,
|
|
18
18
|
transcribe
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-3B35XAD2.js";
|
|
20
20
|
import {
|
|
21
21
|
createRenderCancellationScope,
|
|
22
22
|
stoppedByCancelSignal
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-AGUVIOZR.js";
|
|
24
24
|
import {
|
|
25
25
|
DEFAULT_MODEL,
|
|
26
26
|
findWhisper,
|
|
27
27
|
isWhisperUnavailable
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-6TBDO6H6.js";
|
|
29
29
|
import {
|
|
30
30
|
formatSrt,
|
|
31
31
|
formatVtt,
|