hyperframes 0.8.154 → 0.8.156
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-46UBS7QL.js → add-U35DO2JR.js} +14 -13
- package/dist/{animatedGifPrep-IBLDIJXC.js → animatedGifPrep-MRGFHBVF.js} +6 -5
- package/dist/api.js +15 -14
- package/dist/{asset-GLTZ7OFE.js → asset-HS4Q6LS2.js} +2 -2
- package/dist/{assetCataloger-Y3OELLLW.js → assetCataloger-SRTQYA6J.js} +2 -2
- package/dist/{auth-WGXEQVBW.js → auth-HS6GAILF.js} +2 -2
- package/dist/{autoUpdate-N5FGARI2.js → autoUpdate-MRQ4ULBI.js} +2 -2
- package/dist/{backgroundChecks-UCVN2QVH.js → backgroundChecks-K2ZMA43S.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-6TD4XSIP.js → batchRender-CMVCRSWP.js} +3 -3
- package/dist/{beats-OMAT37Z5.js → beats-JYECNCTZ.js} +13 -12
- package/dist/{benchmark-ANFMTXOS.js → benchmark-JGMKJSPN.js} +11 -10
- package/dist/{browser-AC5JAJXI.js → browser-63WITJVS.js} +6 -5
- package/dist/{bundleWithLocalizedFonts-QX5HV7LC.js → bundleWithLocalizedFonts-5SLYBFXL.js} +2 -2
- package/dist/{capture-MTHXUEC2.js → capture-7MFOIE4K.js} +9 -8
- package/dist/{capture-R7QSBEPW.js → capture-T6QSEGKM.js} +2 -2
- package/dist/{catalog-JMTV6N5Q.js → catalog-KVE5KJJT.js} +14 -13
- package/dist/{catch-up-2YOIZO5Z.js → catch-up-E3WYWSDY.js} +7 -6
- package/dist/{check-EWAMZTRU.js → check-QRP5WCP2.js} +34 -32
- package/dist/{checkBrowser-7BJSPWVG.js → checkBrowser-5XFA6PXF.js} +31 -29
- package/dist/{chunk-V6UUZGP6.js → chunk-2K5YII2L.js} +1 -1
- package/dist/{chunk-ZDEEHQ2Y.js → chunk-3THJEW7G.js} +1 -1
- package/dist/{chunk-Z6CSYA7U.js → chunk-444O62RL.js} +1 -1
- package/dist/{chunk-GXPD7J53.js → chunk-56AEM2EL.js} +39 -18
- package/dist/{chunk-XBSPQ52S.js → chunk-7FFGZC2X.js} +5 -5
- package/dist/{chunk-OOZWUL7V.js → chunk-7K3CHJS3.js} +9 -9
- package/dist/{chunk-PVGDU7SE.js → chunk-7U27WUMQ.js} +1 -1
- package/dist/{chunk-L72IK4M5.js → chunk-C7WALYAY.js} +1 -1
- package/dist/{chunk-UT6P4K3C.js → chunk-COBIO7VC.js} +1 -1
- package/dist/{chunk-VJCX5NKE.js → chunk-DDK6E66K.js} +1 -1
- package/dist/{chunk-5OKZRXLT.js → chunk-DDSQBREC.js} +2 -2
- package/dist/{chunk-MTHQNLC4.js → chunk-DRNTIYT3.js} +3 -3
- package/dist/{chunk-WQMTHPTK.js → chunk-DSX7R5M7.js} +1 -1
- package/dist/{chunk-HGAOO43L.js → chunk-FIL6QPZT.js} +2 -2
- package/dist/{chunk-2LLDM7EU.js → chunk-GVJ4LG62.js} +2 -2
- package/dist/{chunk-M42RUIQO.js → chunk-HBKKW3NL.js} +6 -6
- package/dist/{chunk-32BQ5TTN.js → chunk-HG6H2ICP.js} +2 -2
- package/dist/{chunk-NKYGMXH2.js → chunk-HVQQN4NG.js} +1 -1
- package/dist/{chunk-5ZGSN5YK.js → chunk-IOBKVP27.js} +1 -1
- package/dist/{chunk-BG3NFNJF.js → chunk-JJERZGVE.js} +1 -1
- package/dist/{chunk-PXOFFSO3.js → chunk-JKCKXGIC.js} +1 -1
- package/dist/chunk-KLIKCX6Q.js +63 -0
- package/dist/{chunk-5DD45SJZ.js → chunk-KMSS5TOQ.js} +1 -1
- package/dist/{chunk-RCWSM7IQ.js → chunk-LJHF4SKT.js} +2 -2
- package/dist/{chunk-XQYLUY2F.js → chunk-LZ2PZIVS.js} +1 -1
- package/dist/{chunk-OSASJLU4.js → chunk-M4CRDGC4.js} +1 -1
- package/dist/{chunk-OIONMNWN.js → chunk-MBE4SEL7.js} +5 -5
- package/dist/{chunk-IPL77QF6.js → chunk-NV2JPSI4.js} +1 -1
- package/dist/chunk-OBXWIVYN.js +87 -0
- package/dist/{chunk-GV7I3ZSQ.js → chunk-OE4WEQMH.js} +1 -1
- package/dist/{chunk-WNCGJFTZ.js → chunk-OOCONATR.js} +3 -3
- package/dist/{chunk-YYMJEQ4D.js → chunk-Q7FDYQR4.js} +1 -1
- package/dist/{chunk-YG2Y55KF.js → chunk-QJEHLWM4.js} +1 -1
- package/dist/{chunk-DAKXCEE3.js → chunk-QOP5D3UM.js} +2 -2
- package/dist/{chunk-ML7TWMOG.js → chunk-RXTEP3NB.js} +2 -2
- package/dist/{chunk-M5SUCNGI.js → chunk-SCMNFRL5.js} +9 -9
- package/dist/{chunk-4MLYMDQ4.js → chunk-SCOXM5LP.js} +3 -3
- package/dist/{chunk-J5LEAKUA.js → chunk-SCXATNSP.js} +3 -3
- package/dist/{chunk-TXWPPBIW.js → chunk-SNMMFFKZ.js} +1 -1
- package/dist/{chunk-KC2Y6T4K.js → chunk-SO44ETGW.js} +2 -2
- package/dist/{chunk-AA67UBB2.js → chunk-TLUGPEW4.js} +5 -5
- package/dist/{chunk-6ELTRDMB.js → chunk-VCCOO2TO.js} +5 -5
- package/dist/{chunk-NFXP3WIG.js → chunk-VK5JRYJL.js} +12 -6
- package/dist/{chunk-KFBEMIMD.js → chunk-VPOEKLZL.js} +1 -1
- package/dist/{chunk-WUUOFMHU.js → chunk-VY23BB2D.js} +2 -2
- package/dist/{chunk-Z6DUUIZZ.js → chunk-WLYSVHZE.js} +2 -2
- package/dist/chunk-XT6MXC7A.js +6 -0
- package/dist/{chunk-ZDQH4K5E.js → chunk-XXTOOXZ7.js} +2 -2
- package/dist/{chunk-TVBRW5VB.js → chunk-YGLM2DHX.js} +1 -1
- package/dist/{chunk-2XEBNYG5.js → chunk-YLSSI4XB.js} +1 -1
- package/dist/{chunk-SACJPO3O.js → chunk-YNFJWJHW.js} +7 -7
- package/dist/{chunk-2F6LWCSF.js → chunk-YUTUYCGK.js} +140 -207
- package/dist/{chunk-R6WCSVCE.js → chunk-YZEHYWOH.js} +1 -1
- package/dist/{clean-42FUKXXZ.js → clean-4HTCYML6.js} +17 -15
- package/dist/cli.js +52 -52
- package/dist/{cloud-FIELJ5XR.js → cloud-HFBG33UU.js} +4 -4
- package/dist/{cloudrun-OUGI5NN4.js → cloudrun-QK56WQY3.js} +3 -3
- package/dist/{compare-6U4HCXIA.js → compare-4RYN3LLC.js} +26 -24
- package/dist/{compiler-WHUQZITN.js → compiler-JPA25IUF.js} +2 -2
- package/dist/{component-O72LNVJ6.js → component-7ARXR4KZ.js} +3 -3
- package/dist/{compositions-2AD2FPUW.js → compositions-DNBHEIGP.js} +12 -11
- package/dist/{delete-6L4ISXBN.js → delete-4XYV72EU.js} +2 -2
- package/dist/{dist-NUSNSGME.js → dist-SKUIM4QJ.js} +2 -2
- package/dist/{doctor-J7I5BNOO.js → doctor-5PHSH7IK.js} +12 -11
- package/dist/{events-CPDLAJHK.js → events-FOGRN2KV.js} +5 -4
- package/dist/{events-V4XDOOWJ.js → events-GQCOQY5E.js} +6 -5
- package/dist/{feedback-D4XXMW2S.js → feedback-6T6ZJOTM.js} +9 -8
- package/dist/{ffmpeg-MJFMBBSF.js → ffmpeg-VJXXLKI6.js} +3 -2
- package/dist/{figma-TZEJ3CGU.js → figma-PZLGUS6C.js} +3 -3
- package/dist/fontLocalizeCli.js +9 -7
- package/dist/{get-TX5Q3HZN.js → get-XUNYSY2Z.js} +2 -2
- package/dist/{gpuPolicy-7SIPG5BM.js → gpuPolicy-SWCZJRZR.js} +6 -5
- package/dist/{grade-compare-PUL3ROQ2.js → grade-compare-S27N2NRU.js} +27 -25
- package/dist/{help-35WXO5ZG.js → help-4HZ75YVH.js} +1 -1
- package/dist/{history-KQR73V36.js → history-NENOG3BT.js} +9 -8
- package/dist/hyperframe-runtime.js +35 -35
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +35 -35
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-KR2BYBSK.js → info-IDEUAYJZ.js} +10 -9
- package/dist/{init-LKCGZMPN.js → init-KWGZEC7F.js} +28 -27
- package/dist/{inspect-HQ6UJSTU.js → inspect-3WLT3EHZ.js} +27 -25
- package/dist/{installer-QCHUXV6E.js → installer-I3SLBB7G.js} +4 -4
- package/dist/{keyframes-5CMO5LP7.js → keyframes-7HPN5DKO.js} +9 -8
- package/dist/{lambda-Q5FTNY4J.js → lambda-MJH6U52V.js} +4 -4
- package/dist/{layout-YVV6VMQH.js → layout-ZEW4RZRP.js} +27 -25
- package/dist/{lint-6OVFMUKL.js → lint-3TNKI4PK.js} +9 -8
- package/dist/{list-SIR427WB.js → list-BJR2IXU4.js} +2 -2
- package/dist/{login-LVUMH7FN.js → login-EA27W5T2.js} +4 -4
- package/dist/{manager-X44GKUEL.js → manager-3EUU5UX6.js} +4 -3
- package/dist/{media-treatment-QQWH6FE4.js → media-treatment-3JZFCG6I.js} +12 -11
- package/dist/{models-CRYHY4KH.js → models-IRFIJOIW.js} +10 -9
- package/dist/{motionShot-DUAOT5ZP.js → motionShot-S4M7QSW3.js} +12 -11
- package/dist/{normalize-audio-JABWBEAY.js → normalize-audio-IOY3NRHJ.js} +7 -6
- package/dist/{open-BJV5BHNC.js → open-SCBC3NF5.js} +7 -6
- package/dist/{parakeetRunner-AFUTDANA.js → parakeetRunner-FGTIYDG7.js} +12 -11
- package/dist/{pipeline-3TQHAQOJ.js → pipeline-JEFEWIZ3.js} +8 -7
- package/dist/{play-YFTZXUFZ.js → play-4TCSBDHO.js} +20 -18
- package/dist/{preflight-JYOX64YP.js → preflight-OIHM57E7.js} +5 -4
- package/dist/{present-GXRTOXJB.js → present-S6UBG5VI.js} +16 -14
- package/dist/{preview-EDLAPS6D.js → preview-HBDXDJCV.js} +18 -17
- package/dist/{producer-HE23BPEU.js → producer-KSAUIT6F.js} +1 -1
- package/dist/{projectConfig-EX35BZLA.js → projectConfig-CNAK65RI.js} +6 -6
- package/dist/{publication-OUGS3P7W.js → publication-AUWZFGJI.js} +2 -2
- package/dist/{publish-UUFZR6QT.js → publish-EMNP3VCC.js} +7 -7
- package/dist/{remove-background-P5M42CA5.js → remove-background-GICM6TE5.js} +9 -8
- package/dist/{render-RAZDITXX.js → render-DMHQZMV4.js} +25 -24
- package/dist/{render-LUAMJOON.js → render-PHEQSRHV.js} +11 -10
- package/dist/{render-AWFQGD4T.js → render-WMRNH7HO.js} +3 -3
- package/dist/{render-batch-6UN3HT5A.js → render-batch-OUTHTWN5.js} +3 -3
- package/dist/{resolver-O6ZENVYP.js → resolver-NTB6HOZC.js} +4 -4
- package/dist/{sherpa-RWHRDO53.js → sherpa-3YJNJ6TF.js} +11 -10
- package/dist/{skills-6QLIIV4T.js → skills-MKEJGL35.js} +8 -7
- package/dist/{skillsUpdateCheck-AO7L77FU.js → skillsUpdateCheck-RTLARPPP.js} +3 -3
- package/dist/{snapshot-ZGQTC2KE.js → snapshot-KMLGFZWY.js} +30 -28
- package/dist/{src-KKS6QEHB.js → src-4HB343JW.js} +8 -6
- package/dist/{src-YMUDUVXQ.js → src-HJ2NF55P.js} +5 -4
- package/dist/{staticProjectServer-NA2UE47H.js → staticProjectServer-4XX72J23.js} +13 -12
- package/dist/{status-NBRMGL7D.js → status-BMXWFO4L.js} +3 -2
- package/dist/studio/assets/{hyperframes-player-adFY_rvU.js → hyperframes-player-u2w3bDWo.js} +1 -1
- package/dist/studio/assets/{index-g5aCEF-7.js → index-BG28fXIT.js} +1 -1
- package/dist/studio/assets/{index-Djs4U7Oa.js → index-D8B6eEBj.js} +4 -4
- package/dist/studio/assets/{index-CKiMhYE1.js → index-WD9j53l5.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-4PDW26L5.js → studio-api-LPHMA57T.js} +7 -6
- package/dist/{studioServer-GXQ6IMAZ.js → studioServer-P7GSE74X.js} +46 -40
- package/dist/{system-OXRG57F2.js → system-QRHPVRPP.js} +3 -2
- package/dist/{telemetry-JIC7WB64.js → telemetry-576VTLGI.js} +6 -5
- package/dist/{timeline-5M2WY2NL.js → timeline-BO7LJJ24.js} +16 -14
- package/dist/{tokens-WZMTZSB5.js → tokens-TCYANQDA.js} +2 -2
- package/dist/{transcribe-E5E7GR35.js → transcribe-6HLMGCL2.js} +17 -16
- package/dist/{transcribe-56WECC4Y.js → transcribe-6PTFIBO6.js} +10 -9
- package/dist/{updateCheck-WURPUXPL.js → updateCheck-ZLYIZPPQ.js} +2 -2
- package/dist/{upgrade-KUNE7RXE.js → upgrade-DZHQE2PV.js} +2 -2
- package/dist/{urlDownloader-FGSJGUM7.js → urlDownloader-PJTOCTJA.js} +5 -4
- package/dist/{validate-P6NUUTBK.js → validate-3I45WC7I.js} +21 -19
- package/dist/{video-DOFSWSSR.js → video-AQFXGGKN.js} +6 -5
- package/package.json +1 -1
- package/dist/chunk-AMKC3AXA.js +0 -25
|
@@ -9,6 +9,10 @@ import {
|
|
|
9
9
|
getSystemTotalMb,
|
|
10
10
|
isLowMemorySystem
|
|
11
11
|
} from "./chunk-JYVGYKXG.js";
|
|
12
|
+
import {
|
|
13
|
+
describeWslGpuAccess,
|
|
14
|
+
detectWsl
|
|
15
|
+
} from "./chunk-OBXWIVYN.js";
|
|
12
16
|
import {
|
|
13
17
|
MEDIA_VISUAL_STYLE_PROPERTIES,
|
|
14
18
|
RENDER_FRAME_ID_PREFIX,
|
|
@@ -26,7 +30,7 @@ import {
|
|
|
26
30
|
renderFrameIdForRenderId,
|
|
27
31
|
resolveAuthoredTimingWindow,
|
|
28
32
|
toFps
|
|
29
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-3THJEW7G.js";
|
|
30
34
|
import {
|
|
31
35
|
AUDIO_GROUP_RENDER_ID_ATTR,
|
|
32
36
|
COLOR_GRADING_SOURCE_HIDDEN_ATTR,
|
|
@@ -55,7 +59,7 @@ import {
|
|
|
55
59
|
shiftRateLane,
|
|
56
60
|
sourceTimeAt,
|
|
57
61
|
timeAtSourceTime
|
|
58
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-OE4WEQMH.js";
|
|
59
63
|
import {
|
|
60
64
|
clampAudioGain,
|
|
61
65
|
isAudibleVideoElement
|
|
@@ -558,7 +562,7 @@ function applyConcreteGpuScreenshotClamp(currentForceScreenshot, resolvedGpuMode
|
|
|
558
562
|
|
|
559
563
|
// ../engine/src/utils/sdrCaptureColor.ts
|
|
560
564
|
var SDR_RGB_TO_BT709_FILTER = "scale=out_color_matrix=bt709:out_range=tv:flags=neighbor";
|
|
561
|
-
var SDR_CAPTURE_TO_BT709_FILTER = `scale=in_color_matrix=bt601:in_range=pc:flags=neighbor,format=gbrp,${SDR_RGB_TO_BT709_FILTER}`;
|
|
565
|
+
var SDR_CAPTURE_TO_BT709_FILTER = `scale=in_color_matrix=bt601:in_range=pc:flags=neighbor+accurate_rnd,format=gbrp,${SDR_RGB_TO_BT709_FILTER}`;
|
|
562
566
|
var SDR_RGB_TO_TAGGED_BT709_FILTER = `${SDR_RGB_TO_BT709_FILTER},setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709:range=tv`;
|
|
563
567
|
|
|
564
568
|
// ../parsers/dist/htmlAttributeSpans.js
|
|
@@ -1022,6 +1026,43 @@ function resolveHeadlessShellPath(config) {
|
|
|
1022
1026
|
join2(home, ".cache", "hyperframes", "chrome", "chrome-headless-shell")
|
|
1023
1027
|
) ?? findCachedHeadlessShell(join2(home, ".cache", "puppeteer", "chrome-headless-shell"));
|
|
1024
1028
|
}
|
|
1029
|
+
function resolveFullChromePath() {
|
|
1030
|
+
const baseDir = join2(homedir(), ".cache", "puppeteer", "chrome");
|
|
1031
|
+
let versions;
|
|
1032
|
+
try {
|
|
1033
|
+
versions = readdirSync(baseDir).sort(compareBrowserVersionsDescending);
|
|
1034
|
+
} catch {
|
|
1035
|
+
return void 0;
|
|
1036
|
+
}
|
|
1037
|
+
for (const version of versions) {
|
|
1038
|
+
const candidates = [
|
|
1039
|
+
join2(
|
|
1040
|
+
baseDir,
|
|
1041
|
+
version,
|
|
1042
|
+
"chrome-mac-arm64",
|
|
1043
|
+
"Google Chrome for Testing.app",
|
|
1044
|
+
"Contents",
|
|
1045
|
+
"MacOS",
|
|
1046
|
+
"Google Chrome for Testing"
|
|
1047
|
+
),
|
|
1048
|
+
join2(
|
|
1049
|
+
baseDir,
|
|
1050
|
+
version,
|
|
1051
|
+
"chrome-mac-x64",
|
|
1052
|
+
"Google Chrome for Testing.app",
|
|
1053
|
+
"Contents",
|
|
1054
|
+
"MacOS",
|
|
1055
|
+
"Google Chrome for Testing"
|
|
1056
|
+
),
|
|
1057
|
+
join2(baseDir, version, "chrome-linux64", "chrome"),
|
|
1058
|
+
join2(baseDir, version, "chrome-win64", "chrome.exe")
|
|
1059
|
+
];
|
|
1060
|
+
for (const binary of candidates) {
|
|
1061
|
+
if (existsSync(binary)) return binary;
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
return void 0;
|
|
1065
|
+
}
|
|
1025
1066
|
var ENABLE_BROWSER_POOL = DEFAULT_CONFIG.enableBrowserPool;
|
|
1026
1067
|
var BEGINFRAME_ONLY_FLAGS = /* @__PURE__ */ new Set([
|
|
1027
1068
|
"--deterministic-mode",
|
|
@@ -1200,51 +1241,83 @@ function formatProbeFailure(err) {
|
|
|
1200
1241
|
return `probe failed (${err instanceof Error ? err.message : String(err)})`;
|
|
1201
1242
|
}
|
|
1202
1243
|
async function probeAutoBrowserGpuMode(options) {
|
|
1203
|
-
const platform = options.platform ?? process.platform;
|
|
1204
|
-
const browserTimeout = options.browserTimeout ?? DEFAULT_CONFIG.browserTimeout;
|
|
1205
1244
|
const executablePath = options.chromePath ?? resolveHeadlessShellPath({});
|
|
1206
1245
|
const ppt = await getPuppeteerOrNull();
|
|
1207
1246
|
if (ppt === null) {
|
|
1208
1247
|
logResolvedBrowserGpuMode("software", "puppeteer unavailable");
|
|
1209
1248
|
return { mode: "software", cause: "probe-error" };
|
|
1210
1249
|
}
|
|
1250
|
+
const probed = await probeWebGlMode(ppt, executablePath, options);
|
|
1251
|
+
if (probed.mode === "hardware" || !detectWsl(options.wslHost)) return probed;
|
|
1252
|
+
return probeWslFullChrome(ppt, executablePath, options, probed);
|
|
1253
|
+
}
|
|
1254
|
+
async function probeWslFullChrome(ppt, shellPath, options, shellOutcome) {
|
|
1255
|
+
const fullChrome = (options.findFullChrome ?? resolveFullChromePath)();
|
|
1256
|
+
let route = { state: "missing" };
|
|
1257
|
+
if (fullChrome) {
|
|
1258
|
+
const viaFullChrome = fullChrome === shellPath ? shellOutcome : await probeWebGlMode(ppt, fullChrome, options, "full Chrome: ");
|
|
1259
|
+
if (viaFullChrome.mode === "hardware") return { mode: "hardware", browserPath: fullChrome };
|
|
1260
|
+
route = { state: viaFullChrome.cause ?? "no-gpu", path: fullChrome };
|
|
1261
|
+
}
|
|
1262
|
+
return { ...shellOutcome, wslAccess: describeWslGpuAccess(options.wslHost, route) ?? void 0 };
|
|
1263
|
+
}
|
|
1264
|
+
async function probeWebGlMode(ppt, executablePath, options, label = "") {
|
|
1211
1265
|
try {
|
|
1212
1266
|
const info = await probeHardwareWebGlInfo(ppt, {
|
|
1213
|
-
args: getHardwareGpuProbeArgs(platform),
|
|
1214
|
-
browserTimeout,
|
|
1267
|
+
args: getHardwareGpuProbeArgs(options.platform ?? process.platform),
|
|
1268
|
+
browserTimeout: options.browserTimeout ?? DEFAULT_CONFIG.browserTimeout,
|
|
1215
1269
|
executablePath,
|
|
1216
1270
|
probeLifecycle: options.probeLifecycle
|
|
1217
1271
|
});
|
|
1218
1272
|
const resolved = resolveWebGlProbeMode(info);
|
|
1219
|
-
logResolvedBrowserGpuMode(resolved, describeWebGlProbe(info));
|
|
1273
|
+
logResolvedBrowserGpuMode(resolved, label + describeWebGlProbe(info));
|
|
1220
1274
|
return resolved === "hardware" ? { mode: "hardware" } : { mode: "software", cause: "no-gpu" };
|
|
1221
1275
|
} catch (err) {
|
|
1222
|
-
logResolvedBrowserGpuMode("software", formatProbeFailure(err));
|
|
1276
|
+
logResolvedBrowserGpuMode("software", label + formatProbeFailure(err));
|
|
1223
1277
|
return { mode: "software", cause: "probe-error" };
|
|
1224
1278
|
}
|
|
1225
1279
|
}
|
|
1280
|
+
async function resolveCaptureBrowserPath(resolvedMode, config) {
|
|
1281
|
+
const probed = resolvedMode === "hardware" ? await _autoBrowserGpuModeCache : void 0;
|
|
1282
|
+
return probed?.browserPath ?? resolveHeadlessShellPath(config);
|
|
1283
|
+
}
|
|
1226
1284
|
function resolveBrowserGpuMode(mode, options = {}) {
|
|
1227
1285
|
if (mode === "software") return Promise.resolve(mode);
|
|
1228
1286
|
_autoBrowserGpuModeCache ??= probeAutoBrowserGpuMode(options);
|
|
1229
|
-
if (mode === "auto")
|
|
1287
|
+
if (mode === "auto") {
|
|
1288
|
+
return _autoBrowserGpuModeCache.then((probed) => {
|
|
1289
|
+
if (probed.mode === "software" && probed.wslAccess && !_wslSoftwareNoteLogged) {
|
|
1290
|
+
_wslSoftwareNoteLogged = true;
|
|
1291
|
+
console.error(buildWslSoftwareNote(probed));
|
|
1292
|
+
}
|
|
1293
|
+
return probed.mode;
|
|
1294
|
+
});
|
|
1295
|
+
}
|
|
1230
1296
|
return _autoBrowserGpuModeCache.then((probed) => {
|
|
1231
1297
|
if (probed.mode === "software" && !_unverifiedHardwareGpuWarned) {
|
|
1232
1298
|
_unverifiedHardwareGpuWarned = true;
|
|
1233
|
-
console.warn(
|
|
1234
|
-
buildUnverifiedHardwareGpuWarning(options.platform ?? process.platform, probed.cause)
|
|
1235
|
-
);
|
|
1299
|
+
console.warn(buildUnverifiedHardwareGpuWarning(options.platform ?? process.platform, probed));
|
|
1236
1300
|
}
|
|
1237
1301
|
return "hardware";
|
|
1238
1302
|
});
|
|
1239
1303
|
}
|
|
1240
1304
|
var _unverifiedHardwareGpuWarned = false;
|
|
1241
|
-
|
|
1305
|
+
var _wslSoftwareNoteLogged = false;
|
|
1306
|
+
function buildWslSoftwareNote({ cause, wslAccess = [] }) {
|
|
1307
|
+
const check = cause === "probe-error" ? "the GPU check could not finish (see the probe line above)" : "the GPU check found no hardware GPU";
|
|
1308
|
+
return [
|
|
1309
|
+
`[hyperframes] WSL: ${check}, so this render uses software WebGL (SwiftShader) and runs at CPU speed.`,
|
|
1310
|
+
...wslAccess,
|
|
1311
|
+
" Pass --no-browser-gpu to skip the GPU check and render in software."
|
|
1312
|
+
].join("\n");
|
|
1313
|
+
}
|
|
1314
|
+
function buildUnverifiedHardwareGpuWarning(platform, { cause, wslAccess }) {
|
|
1242
1315
|
if (cause === "probe-error") {
|
|
1243
|
-
return "[hyperframes] browserGpuMode=hardware was requested, but the GPU probe could not run, so hardware acceleration is UNVERIFIED. If Chrome falls back to software WebGL the capture will run at CPU speed. Honouring the explicit request anyway.\n This is a probe failure, not evidence of a missing GPU: see the `browserGpuMode probe \u2192 software (probe failed ...)` line above for the underlying error, which usually means Chrome could not launch (bad HYPERFRAMES_BROWSER_PATH, missing shared libraries, or a denied sandbox) rather than a GPU problem.\n Run `hyperframes doctor` to check the Chrome install.";
|
|
1316
|
+
return "[hyperframes] browserGpuMode=hardware was requested, but the GPU probe could not run, so hardware acceleration is UNVERIFIED. If Chrome falls back to software WebGL the capture will run at CPU speed. Honouring the explicit request anyway.\n This is a probe failure, not evidence of a missing GPU: see the `browserGpuMode probe \u2192 software (probe failed ...)` line above for the underlying error, which usually means Chrome could not launch (bad HYPERFRAMES_BROWSER_PATH, missing shared libraries, or a denied sandbox) rather than a GPU problem.\n Run `hyperframes doctor` to check the Chrome install." + (wslAccess ? ["", " Under WSL, a GPU path that is slow to start or unreachable can also cause it:"].concat(wslAccess).join("\n") : "");
|
|
1244
1317
|
}
|
|
1245
|
-
const remediation = platform === "linux" ? "Inside Docker, the container needs GPU passthrough: `--gpus all` with the NVIDIA Container Toolkit installed, or `--device /dev/dri` for Mesa/AMD/Intel. The image also needs the matching userspace driver + libEGL. Verify with `hyperframes render --browser-gpu` and watch for this warning disappearing." : "Check that the host exposes a GPU to this process and that the graphics drivers are installed.";
|
|
1318
|
+
const remediation = wslAccess?.join("\n") ?? (platform === "linux" ? " Inside Docker, the container needs GPU passthrough: `--gpus all` with the NVIDIA Container Toolkit installed, or `--device /dev/dri` for Mesa/AMD/Intel. The image also needs the matching userspace driver + libEGL. Verify with `hyperframes render --browser-gpu` and watch for this warning disappearing." : " Check that the host exposes a GPU to this process and that the graphics drivers are installed.");
|
|
1246
1319
|
return `[hyperframes] browserGpuMode=hardware was requested, but the WebGL probe found no hardware GPU, so Chrome will silently fall back to software WebGL and the capture will run at CPU speed. Honouring the explicit request anyway.
|
|
1247
|
-
|
|
1320
|
+
${remediation}
|
|
1248
1321
|
Pass --no-browser-gpu to select deterministic SwiftShader instead of waiting on a hardware path that is not there.`;
|
|
1249
1322
|
}
|
|
1250
1323
|
function logResolvedBrowserGpuMode(resolved, reason) {
|
|
@@ -5242,14 +5315,16 @@ async function createCaptureSession(serverUrl, outputDir, options, onBeforeCaptu
|
|
|
5242
5315
|
resolvedGpuMode,
|
|
5243
5316
|
config
|
|
5244
5317
|
);
|
|
5245
|
-
const
|
|
5318
|
+
const browserPath = await resolveCaptureBrowserPath(resolvedGpuMode, config);
|
|
5319
|
+
const wslFullChromeHasNoBeginFrame = browserPath !== headlessShell;
|
|
5320
|
+
const preMode = headlessShell && !wslFullChromeHasNoBeginFrame && isLinux && !effectiveForceScreenshot && !supersampling && !drawElementTransparent ? "beginframe" : "screenshot";
|
|
5246
5321
|
const requiresWebGpu = options.requiresWebGpu ?? await fetch(`${serverUrl}/index.html`, { signal: AbortSignal.timeout(5e3) }).then((res) => res.text()).then(compositionRequiresWebGpu).catch(() => false);
|
|
5247
5322
|
const gpuConfig = { ...config, browserGpuMode: resolvedGpuMode };
|
|
5248
5323
|
const chromeArgs = buildChromeArgs(
|
|
5249
5324
|
{ width: options.width, height: options.height, captureMode: preMode, requiresWebGpu },
|
|
5250
5325
|
gpuConfig
|
|
5251
5326
|
);
|
|
5252
|
-
const browserLease = await acquireBrowser(chromeArgs, config);
|
|
5327
|
+
const browserLease = await acquireBrowser(chromeArgs, { ...config, chromePath: browserPath });
|
|
5253
5328
|
return constructCaptureSessionWithRollback({
|
|
5254
5329
|
browserLease,
|
|
5255
5330
|
serverUrl,
|
|
@@ -8008,35 +8083,6 @@ async function runFfmpeg(args, opts) {
|
|
|
8008
8083
|
});
|
|
8009
8084
|
return toResult(await managed.wait());
|
|
8010
8085
|
}
|
|
8011
|
-
async function runFfmpegPipeline(producerArgs, consumerArgs, opts) {
|
|
8012
|
-
if (opts?.signal?.aborted) return { ...ABORTED_BEFORE_START };
|
|
8013
|
-
const deadlineAtMs = Date.now() + (opts?.timeout ?? DEFAULT_TIMEOUT);
|
|
8014
|
-
const producer = spawnFfmpeg(producerArgs);
|
|
8015
|
-
const consumer = spawnFfmpeg(consumerArgs);
|
|
8016
|
-
consumer.stdin?.on("error", () => {
|
|
8017
|
-
});
|
|
8018
|
-
for (const event of ["close", "error"]) {
|
|
8019
|
-
consumer.once(event, () => producer.stdout?.destroy());
|
|
8020
|
-
producer.once(event, () => consumer.stdin?.end());
|
|
8021
|
-
}
|
|
8022
|
-
if (consumer.stdin) producer.stdout?.pipe(consumer.stdin);
|
|
8023
|
-
const settleOrder = [];
|
|
8024
|
-
const outcomes = await Promise.all(
|
|
8025
|
-
[producer, consumer].map(
|
|
8026
|
-
(child) => new ManagedChildProcess(child, {
|
|
8027
|
-
signal: opts?.signal,
|
|
8028
|
-
deadlineAtMs,
|
|
8029
|
-
onStderr: opts?.onStderr
|
|
8030
|
-
}).wait().then((outcome) => {
|
|
8031
|
-
settleOrder.push(outcome);
|
|
8032
|
-
return outcome;
|
|
8033
|
-
})
|
|
8034
|
-
)
|
|
8035
|
-
);
|
|
8036
|
-
const reported = settleOrder.find((outcome) => !succeeded(outcome)) ?? outcomes[1];
|
|
8037
|
-
const stderr = [...outcomes.filter((outcome) => outcome !== reported), reported].map((outcome) => outcome.stderr).join("");
|
|
8038
|
-
return toResult(reported, stderr);
|
|
8039
|
-
}
|
|
8040
8086
|
|
|
8041
8087
|
// ../engine/src/utils/ffprobe.ts
|
|
8042
8088
|
import { spawn as spawn3 } from "child_process";
|
|
@@ -11171,7 +11217,7 @@ function framePathsFromDirectory(outputDir, format, allowGaps = false) {
|
|
|
11171
11217
|
// ../engine/src/services/extractionCache.ts
|
|
11172
11218
|
var COMPLETE_SENTINEL = ".hf-complete";
|
|
11173
11219
|
var GC_MARKER = ".hf-last-gc";
|
|
11174
|
-
var SCHEMA_PREFIX = "hfcache-
|
|
11220
|
+
var SCHEMA_PREFIX = "hfcache-v7-";
|
|
11175
11221
|
var KEY_HEX_CHARS = 16;
|
|
11176
11222
|
async function readContentSha256(path, signal) {
|
|
11177
11223
|
try {
|
|
@@ -11447,7 +11493,7 @@ var SDR_TO_HDR_COLORSPACE_FILTER = "colorspace=all=bt2020:iall=bt709:range=tv";
|
|
|
11447
11493
|
var HDR_TO_SDR_ZSCALE_TRANSFORM_KEY = "hdr2sdr-hable-srgb";
|
|
11448
11494
|
var HDR_TO_SDR_VIDEOTOOLBOX_TRANSFORM_KEY = "hdr2sdr-videotoolbox-hdr";
|
|
11449
11495
|
var SDR_CANVAS_PASSTHROUGH_FILTER = "setparams=color_primaries=bt709:color_trc=iec61966-2-1";
|
|
11450
|
-
var SDR_JPEG_AS_BT601_FULL_RANGE_FILTER = "scale=flags=neighbor,format=gbrp,scale=out_color_matrix=bt601:out_range=pc:flags=neighbor,format=yuv420p";
|
|
11496
|
+
var SDR_JPEG_AS_BT601_FULL_RANGE_FILTER = "scale=flags=neighbor+accurate_rnd,format=gbrp,scale=out_color_matrix=bt601:out_range=pc:flags=neighbor,format=yuv420p";
|
|
11451
11497
|
var warnedMissingZscale = false;
|
|
11452
11498
|
async function toneMapsWithZscale() {
|
|
11453
11499
|
return process.platform !== "darwin" || isFfmpegFilterAvailable("zscale");
|
|
@@ -11786,55 +11832,6 @@ function chromeGuessForUntaggedMatrix(metadata) {
|
|
|
11786
11832
|
const hd = metadata.height >= 720 && !CHROME_BT601_UNTAGGED_CODECS.has(metadata.videoCodec);
|
|
11787
11833
|
return [`setparams=colorspace=${hd ? "bt709" : "smpte170m"}`];
|
|
11788
11834
|
}
|
|
11789
|
-
var NUT_RAW_PIXEL_FORMATS = /* @__PURE__ */ new Set([
|
|
11790
|
-
"yuv420p",
|
|
11791
|
-
"yuvj420p",
|
|
11792
|
-
"yuv422p",
|
|
11793
|
-
"yuvj422p",
|
|
11794
|
-
"yuv444p",
|
|
11795
|
-
"yuvj444p",
|
|
11796
|
-
"yuva420p",
|
|
11797
|
-
"yuva444p",
|
|
11798
|
-
"yuv440p",
|
|
11799
|
-
"yuv411p",
|
|
11800
|
-
"yuv410p",
|
|
11801
|
-
"yuva422p",
|
|
11802
|
-
"yuv420p10le",
|
|
11803
|
-
"yuv422p10le",
|
|
11804
|
-
"yuv444p10le",
|
|
11805
|
-
"yuva420p10le",
|
|
11806
|
-
"yuva444p10le",
|
|
11807
|
-
"yuv420p12le",
|
|
11808
|
-
"nv12",
|
|
11809
|
-
"nv21",
|
|
11810
|
-
"yuyv422",
|
|
11811
|
-
"uyvy422",
|
|
11812
|
-
"gray",
|
|
11813
|
-
"gray10le",
|
|
11814
|
-
"ya8",
|
|
11815
|
-
"gbrp",
|
|
11816
|
-
"gbrap",
|
|
11817
|
-
"gbrp10le",
|
|
11818
|
-
"gbrp12le",
|
|
11819
|
-
"gbrap10le",
|
|
11820
|
-
"rgb24",
|
|
11821
|
-
"bgr24",
|
|
11822
|
-
"rgba",
|
|
11823
|
-
"bgra",
|
|
11824
|
-
"argb",
|
|
11825
|
-
"abgr",
|
|
11826
|
-
"rgb48le",
|
|
11827
|
-
"rgba64le"
|
|
11828
|
-
]);
|
|
11829
|
-
function restoreSourceColourFilter(metadata) {
|
|
11830
|
-
const tags = [
|
|
11831
|
-
["range", metadata.colorRange],
|
|
11832
|
-
["colorspace", metadata.colorSpace?.colorSpace],
|
|
11833
|
-
["color_primaries", metadata.colorSpace?.colorPrimaries],
|
|
11834
|
-
["color_trc", metadata.colorSpace?.colorTransfer]
|
|
11835
|
-
].filter(([, value]) => value && value !== "unknown" && value !== "reserved");
|
|
11836
|
-
return tags.length > 0 ? [`setparams=${tags.map(([key, value]) => `${key}=${value}`).join(":")}`] : [];
|
|
11837
|
-
}
|
|
11838
11835
|
var EXTRACTION_SEGMENT_SECONDS = 120;
|
|
11839
11836
|
var EXTRACTION_SLOTS = Math.max(1, Math.floor(cpus().length / 2));
|
|
11840
11837
|
var inExtractionSlot = createConcurrencyLimit(EXTRACTION_SLOTS);
|
|
@@ -11941,8 +11938,8 @@ async function extractVideoFramesRange(videoPath, videoId, startTime, duration,
|
|
|
11941
11938
|
const isMacOS = process.platform === "darwin";
|
|
11942
11939
|
const toneMappedToSdr = options.toneMapHdrToSdr === true && isHdr && await toneMapsWithZscale();
|
|
11943
11940
|
const decodeWithVideoToolbox = isHdr && isMacOS && !toneMappedToSdr;
|
|
11944
|
-
const
|
|
11945
|
-
if (options.frameRanges && !
|
|
11941
|
+
const sampleAtOutputFps = !options.finalFrameOnly;
|
|
11942
|
+
if (options.frameRanges && (!sampleAtOutputFps || metadata.isVFR)) {
|
|
11946
11943
|
throw new Error("frameRanges extraction needs a constant-frame-rate source");
|
|
11947
11944
|
}
|
|
11948
11945
|
const args = [];
|
|
@@ -11956,14 +11953,14 @@ async function extractVideoFramesRange(videoPath, videoId, startTime, duration,
|
|
|
11956
11953
|
if (options.finalFrameOnly) {
|
|
11957
11954
|
args.push("-i", videoPath, "-ss", String(startTime), "-frames:v", "1");
|
|
11958
11955
|
} else {
|
|
11959
|
-
if (
|
|
11956
|
+
if (sampleAtOutputFps) args.push("-noaccurate_seek");
|
|
11960
11957
|
args.push("-ss", String(startTime), "-i", videoPath, "-t", String(duration));
|
|
11961
11958
|
}
|
|
11962
11959
|
const vfFilters = [];
|
|
11963
11960
|
if (decodeWithVideoToolbox) {
|
|
11964
11961
|
vfFilters.push("format=nv12");
|
|
11965
11962
|
}
|
|
11966
|
-
if (
|
|
11963
|
+
if (sampleAtOutputFps) {
|
|
11967
11964
|
vfFilters.push(
|
|
11968
11965
|
"settb=intb/2",
|
|
11969
11966
|
"setpts=PTS-lte(TB\\,0.001)",
|
|
@@ -11988,48 +11985,25 @@ async function extractVideoFramesRange(videoPath, videoId, startTime, duration,
|
|
|
11988
11985
|
if (format === "png") encodeArgs.push("-compression_level", "1");
|
|
11989
11986
|
encodeArgs.push("-y", outputPattern);
|
|
11990
11987
|
const runOptions = { signal, timeout: ffmpegProcessTimeout };
|
|
11991
|
-
const
|
|
11992
|
-
|
|
11993
|
-
|
|
11994
|
-
|
|
11995
|
-
|
|
11996
|
-
|
|
11997
|
-
|
|
11998
|
-
|
|
11999
|
-
|
|
12000
|
-
|
|
12001
|
-
|
|
12002
|
-
|
|
12003
|
-
|
|
12004
|
-
|
|
12005
|
-
|
|
12006
|
-
|
|
12007
|
-
|
|
12008
|
-
|
|
12009
|
-
|
|
12010
|
-
),
|
|
12011
|
-
signal
|
|
12012
|
-
);
|
|
12013
|
-
} else {
|
|
12014
|
-
const filterArgs = vfFilters.length > 0 ? ["-vf", vfFilters.join(",")] : [];
|
|
12015
|
-
const segmentFrames = Math.round(EXTRACTION_SEGMENT_SECONDS * fps);
|
|
12016
|
-
const totalFrames = extractionFrameCountForDuration(duration, normalizedFps, false);
|
|
12017
|
-
processResult = sampleCfrAtOutputFps && (options.frameRanges || totalFrames > segmentFrames) ? await runSegmentedExtraction({
|
|
12018
|
-
decodeArgs,
|
|
12019
|
-
filterAndEncodeArgs: [...filterArgs, ...encodeArgs],
|
|
12020
|
-
videoPath,
|
|
12021
|
-
startTime,
|
|
12022
|
-
fps,
|
|
12023
|
-
segments: splitFrameRanges(
|
|
12024
|
-
options.frameRanges ?? [{ firstFrame: 0, frames: totalFrames }],
|
|
12025
|
-
segmentFrames
|
|
12026
|
-
),
|
|
12027
|
-
runOptions
|
|
12028
|
-
}) : await inExtractionSlot(
|
|
12029
|
-
() => runFfmpeg([...args, ...filterArgs, ...encodeArgs], runOptions),
|
|
12030
|
-
signal
|
|
12031
|
-
);
|
|
12032
|
-
}
|
|
11988
|
+
const filterArgs = vfFilters.length > 0 ? ["-vf", vfFilters.join(",")] : [];
|
|
11989
|
+
const segmentFrames = Math.round(EXTRACTION_SEGMENT_SECONDS * fps);
|
|
11990
|
+
const totalFrames = extractionFrameCountForDuration(duration, normalizedFps, metadata.isVFR);
|
|
11991
|
+
const boundVfrFrameCount = metadata.isVFR && totalFrames > 0;
|
|
11992
|
+
const processResult = sampleAtOutputFps && (options.frameRanges || boundVfrFrameCount || totalFrames > segmentFrames) ? await runSegmentedExtraction({
|
|
11993
|
+
decodeArgs,
|
|
11994
|
+
filterAndEncodeArgs: [...filterArgs, ...encodeArgs],
|
|
11995
|
+
videoPath,
|
|
11996
|
+
startTime,
|
|
11997
|
+
fps,
|
|
11998
|
+
segments: splitFrameRanges(
|
|
11999
|
+
options.frameRanges ?? [{ firstFrame: 0, frames: totalFrames }],
|
|
12000
|
+
segmentFrames
|
|
12001
|
+
),
|
|
12002
|
+
runOptions
|
|
12003
|
+
}) : await inExtractionSlot(
|
|
12004
|
+
() => runFfmpeg([...args, ...filterArgs, ...encodeArgs], runOptions),
|
|
12005
|
+
signal
|
|
12006
|
+
);
|
|
12033
12007
|
if (processResult.failureReason === "external_interruption") {
|
|
12034
12008
|
throw new VideoSourceExtractionError(
|
|
12035
12009
|
"external_interruption",
|
|
@@ -14776,10 +14750,11 @@ function buildFadeFilters(track) {
|
|
|
14776
14750
|
}
|
|
14777
14751
|
return stages.length ? `,${stages.join(",")}` : "";
|
|
14778
14752
|
}
|
|
14779
|
-
function buildTrackInputFilter(track, index, volumeFilter, totalDuration) {
|
|
14753
|
+
function buildTrackInputFilter(track, index, volumeFilter, totalDuration, padToDuration = true) {
|
|
14780
14754
|
const delayMs = Math.round(track.start * 1e3);
|
|
14781
14755
|
const trimDuration = track.end - track.start + (track.tailSeconds ?? 0);
|
|
14782
|
-
|
|
14756
|
+
const filters = `[${index}:a]atrim=0:${formatFilterNumber(trimDuration)},${volumeFilter}${buildFadeFilters(track)},adelay=${delayMs}|${delayMs}`;
|
|
14757
|
+
return `${filters}${padToDuration ? `,apad,asetpts=N/SR/TB,atrim=0:${formatFilterNumber(totalDuration)}` : ""}[a${index}]`;
|
|
14783
14758
|
}
|
|
14784
14759
|
function missingSourceMessage(elementId, src, baseDir, resolvedPath) {
|
|
14785
14760
|
const relativePath = relative(baseDir, resolvedPath).replace(/\\/g, "/");
|
|
@@ -15056,26 +15031,26 @@ async function mixAudioTracks(tracks, outputPath, totalDuration, signal, config,
|
|
|
15056
15031
|
}
|
|
15057
15032
|
const outputDir = dirname6(outputPath);
|
|
15058
15033
|
if (!existsSync10(outputDir)) mkdirSync7(outputDir, { recursive: true });
|
|
15059
|
-
const buildFilterComplex = (ignoreAutomation) => {
|
|
15034
|
+
const buildFilterComplex = (ignoreAutomation, useNormalize2) => {
|
|
15060
15035
|
const filterParts = [];
|
|
15061
15036
|
tracks.forEach((track, i) => {
|
|
15062
15037
|
const volumeFilter = buildVolumeExpression(track, ignoreAutomation);
|
|
15063
|
-
filterParts.push(buildTrackInputFilter(track, i, volumeFilter, totalDuration));
|
|
15038
|
+
filterParts.push(buildTrackInputFilter(track, i, volumeFilter, totalDuration, !useNormalize2));
|
|
15064
15039
|
});
|
|
15065
15040
|
const mixInputs = tracks.map((_, i) => `[a${i}]`).join("");
|
|
15066
|
-
const mixFilter = `${mixInputs}amix=inputs=${tracks.length}:duration=longest:dropout_transition=0[mixed]`;
|
|
15067
|
-
const
|
|
15068
|
-
const postMixGainFilter = `[mixed]volume=${formatFilterNumber(
|
|
15041
|
+
const mixFilter = `${mixInputs}amix=inputs=${tracks.length}:duration=longest:dropout_transition=0${useNormalize2 ? ":normalize=0" : ""}[mixed]`;
|
|
15042
|
+
const gain = masterOutputGain * (useNormalize2 ? 1 : tracks.length);
|
|
15043
|
+
const postMixGainFilter = useNormalize2 ? `[mixed]volume=${formatFilterNumber(gain)},apad,asetpts=N/SR/TB,atrim=0:${formatFilterNumber(totalDuration)}[out]` : `[mixed]volume=${formatFilterNumber(gain)}[out]`;
|
|
15069
15044
|
return [...filterParts, mixFilter, postMixGainFilter].join(";");
|
|
15070
15045
|
};
|
|
15071
|
-
const runMix = async (ignoreAutomation) => {
|
|
15046
|
+
const runMix = async (ignoreAutomation, useNormalize2) => {
|
|
15072
15047
|
const inputs = [];
|
|
15073
15048
|
tracks.forEach((track) => inputs.push("-i", track.srcPath));
|
|
15074
15049
|
const scriptDir = mkdtempSync6(join13(outputDir, ".filter-complex-"));
|
|
15075
15050
|
const scriptPath = join13(scriptDir, "graph.txt");
|
|
15076
15051
|
const fd = openSync4(scriptPath, "wx", 384);
|
|
15077
15052
|
try {
|
|
15078
|
-
writeFileSync6(fd, buildFilterComplex(ignoreAutomation));
|
|
15053
|
+
writeFileSync6(fd, buildFilterComplex(ignoreAutomation, useNormalize2));
|
|
15079
15054
|
} finally {
|
|
15080
15055
|
closeSync4(fd);
|
|
15081
15056
|
}
|
|
@@ -15103,11 +15078,16 @@ async function mixAudioTracks(tracks, outputPath, totalDuration, signal, config,
|
|
|
15103
15078
|
rmSync7(scriptDir, { recursive: true, force: true });
|
|
15104
15079
|
}
|
|
15105
15080
|
};
|
|
15106
|
-
let
|
|
15081
|
+
let useNormalize = true;
|
|
15082
|
+
let result = await runMix(false, useNormalize);
|
|
15083
|
+
if (!result.success && result.failureReason !== "external_interruption" && !signal?.aborted && groupNormalizeOptionUnsupported(result.stderr)) {
|
|
15084
|
+
useNormalize = false;
|
|
15085
|
+
result = await runMix(false, useNormalize);
|
|
15086
|
+
}
|
|
15107
15087
|
let degradedAutomation = false;
|
|
15108
15088
|
const hasAutomation = tracks.some((track) => (track.volumeKeyframes?.length ?? 0) > 0);
|
|
15109
15089
|
if (!result.success && result.failureReason !== "external_interruption" && !signal?.aborted && hasAutomation) {
|
|
15110
|
-
const retry = await runMix(true);
|
|
15090
|
+
const retry = await runMix(true, useNormalize);
|
|
15111
15091
|
if (retry.success) {
|
|
15112
15092
|
result = retry;
|
|
15113
15093
|
degradedAutomation = true;
|
|
@@ -15781,14 +15761,9 @@ function defaultSafeMaxWorkers() {
|
|
|
15781
15761
|
}
|
|
15782
15762
|
var MIN_FRAMES_PER_WORKER = 30;
|
|
15783
15763
|
function shouldDisableBrowserPoolForParallelWorker({
|
|
15784
|
-
parallel
|
|
15785
|
-
platform,
|
|
15786
|
-
deviceScaleFactor,
|
|
15787
|
-
headlessShellPath
|
|
15764
|
+
parallel
|
|
15788
15765
|
}) {
|
|
15789
|
-
return Boolean(
|
|
15790
|
-
parallel && platform === "linux" && headlessShellPath && (deviceScaleFactor ?? 1) <= 1
|
|
15791
|
-
);
|
|
15766
|
+
return Boolean(parallel);
|
|
15792
15767
|
}
|
|
15793
15768
|
function selectWorkerDiagnostics(lines, maxLines = MAX_WORKER_DIAGNOSTIC_LINES) {
|
|
15794
15769
|
return lines.filter(
|
|
@@ -16134,13 +16109,7 @@ async function executeWorkerTask(task, serverUrl, captureOptions, createBeforeCa
|
|
|
16134
16109
|
if (!existsSync11(task.outputDir)) mkdirSync8(task.outputDir, { recursive: true });
|
|
16135
16110
|
let session = null;
|
|
16136
16111
|
let perf;
|
|
16137
|
-
const needsSeparateBrowsers = shouldDisableBrowserPoolForParallelWorker({
|
|
16138
|
-
parallel,
|
|
16139
|
-
platform: process.platform,
|
|
16140
|
-
forceScreenshot: config?.forceScreenshot,
|
|
16141
|
-
deviceScaleFactor: captureOptions.deviceScaleFactor,
|
|
16142
|
-
headlessShellPath: resolveHeadlessShellPath(config)
|
|
16143
|
-
});
|
|
16112
|
+
const needsSeparateBrowsers = shouldDisableBrowserPoolForParallelWorker({ parallel });
|
|
16144
16113
|
const workerConfig = needsSeparateBrowsers ? { ...config, enableBrowserPool: false } : config;
|
|
16145
16114
|
const phaseTimeoutMs = resolveParallelWorkerTimeoutMs(
|
|
16146
16115
|
Boolean(parallel && onFrameBuffer && workerConfig?.useDrawElement)
|
|
@@ -16633,9 +16602,6 @@ function verifyGpuParity(a, b, options = {}) {
|
|
|
16633
16602
|
}
|
|
16634
16603
|
|
|
16635
16604
|
// ../engine/src/services/hdrCapture.ts
|
|
16636
|
-
import { existsSync as existsSync12, readdirSync as readdirSync7 } from "fs";
|
|
16637
|
-
import { join as join17 } from "path";
|
|
16638
|
-
import { homedir as homedir2 } from "os";
|
|
16639
16605
|
var PQ_M1 = 0.1593017578125;
|
|
16640
16606
|
var PQ_M2 = 78.84375;
|
|
16641
16607
|
var PQ_C1 = 0.8359375;
|
|
@@ -16756,39 +16722,6 @@ function float16ToPqRgb(rawBuffer, bytesPerRow, width, height) {
|
|
|
16756
16722
|
}
|
|
16757
16723
|
return output;
|
|
16758
16724
|
}
|
|
16759
|
-
function resolveHeadedChromePath() {
|
|
16760
|
-
const baseDir = join17(homedir2(), ".cache", "puppeteer", "chrome");
|
|
16761
|
-
if (!existsSync12(baseDir)) return void 0;
|
|
16762
|
-
const versions = readdirSync7(baseDir).sort().reverse();
|
|
16763
|
-
for (const version of versions) {
|
|
16764
|
-
const candidates = [
|
|
16765
|
-
join17(
|
|
16766
|
-
baseDir,
|
|
16767
|
-
version,
|
|
16768
|
-
"chrome-mac-arm64",
|
|
16769
|
-
"Google Chrome for Testing.app",
|
|
16770
|
-
"Contents",
|
|
16771
|
-
"MacOS",
|
|
16772
|
-
"Google Chrome for Testing"
|
|
16773
|
-
),
|
|
16774
|
-
join17(
|
|
16775
|
-
baseDir,
|
|
16776
|
-
version,
|
|
16777
|
-
"chrome-mac-x64",
|
|
16778
|
-
"Google Chrome for Testing.app",
|
|
16779
|
-
"Contents",
|
|
16780
|
-
"MacOS",
|
|
16781
|
-
"Google Chrome for Testing"
|
|
16782
|
-
),
|
|
16783
|
-
join17(baseDir, version, "chrome-linux64", "chrome"),
|
|
16784
|
-
join17(baseDir, version, "chrome-win64", "chrome.exe")
|
|
16785
|
-
];
|
|
16786
|
-
for (const binary of candidates) {
|
|
16787
|
-
if (existsSync12(binary)) return binary;
|
|
16788
|
-
}
|
|
16789
|
-
}
|
|
16790
|
-
return void 0;
|
|
16791
|
-
}
|
|
16792
16725
|
async function launchHdrBrowser(width, height) {
|
|
16793
16726
|
let ppt;
|
|
16794
16727
|
try {
|
|
@@ -16803,7 +16736,7 @@ async function launchHdrBrowser(width, height) {
|
|
|
16803
16736
|
ppt = mod.default;
|
|
16804
16737
|
}
|
|
16805
16738
|
if (!ppt) throw new Error("Neither puppeteer nor puppeteer-core found");
|
|
16806
|
-
const chromePath =
|
|
16739
|
+
const chromePath = resolveFullChromePath();
|
|
16807
16740
|
if (!chromePath) {
|
|
16808
16741
|
throw new Error(
|
|
16809
16742
|
"[HDR] No Chrome binary found. Install: npx @puppeteer/browsers install chrome@stable"
|
|
@@ -6,14 +6,14 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
redactHome
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HBKKW3NL.js";
|
|
10
10
|
import "./chunk-Z27A7NUB.js";
|
|
11
11
|
import "./chunk-5ETJX6WM.js";
|
|
12
12
|
import {
|
|
13
13
|
loadProducer
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-IOBKVP27.js";
|
|
15
|
+
import "./chunk-VK5JRYJL.js";
|
|
16
|
+
import "./chunk-DSX7R5M7.js";
|
|
17
17
|
import "./chunk-C6TPGUWD.js";
|
|
18
18
|
import {
|
|
19
19
|
DEFAULT_HISTORY_ROOT,
|
|
@@ -23,14 +23,14 @@ import {
|
|
|
23
23
|
import {
|
|
24
24
|
CACHE_DIR_NAME,
|
|
25
25
|
cleanupProxyCache
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-7U27WUMQ.js";
|
|
27
27
|
import "./chunk-FFDC5OWV.js";
|
|
28
28
|
import {
|
|
29
29
|
formatBytes
|
|
30
30
|
} from "./chunk-K2FLNJVB.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-VY23BB2D.js";
|
|
32
32
|
import "./chunk-5CS4T6C6.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-7FFGZC2X.js";
|
|
34
34
|
import {
|
|
35
35
|
defineCommand
|
|
36
36
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -40,33 +40,35 @@ import {
|
|
|
40
40
|
import {
|
|
41
41
|
c
|
|
42
42
|
} from "./chunk-ZTZA4UWZ.js";
|
|
43
|
+
import "./chunk-KLIKCX6Q.js";
|
|
43
44
|
import "./chunk-EOOEC32M.js";
|
|
44
45
|
import "./chunk-TJSTGSAW.js";
|
|
45
46
|
import "./chunk-LBT4AMSF.js";
|
|
46
47
|
import {
|
|
47
48
|
withMeta
|
|
48
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-COBIO7VC.js";
|
|
49
50
|
import "./chunk-K4WIOZFP.js";
|
|
50
51
|
import "./chunk-XUXGIA7H.js";
|
|
51
52
|
import "./chunk-WERLJGIC.js";
|
|
52
53
|
import "./chunk-ISN5GRYI.js";
|
|
53
|
-
import "./chunk-
|
|
54
|
+
import "./chunk-SO44ETGW.js";
|
|
54
55
|
import "./chunk-3DKN5WKL.js";
|
|
55
56
|
import "./chunk-EOVYQ3IG.js";
|
|
56
57
|
import "./chunk-6BEFEWFB.js";
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
58
|
+
import "./chunk-SCOXM5LP.js";
|
|
59
|
+
import "./chunk-XT6MXC7A.js";
|
|
59
60
|
import {
|
|
60
61
|
EXTRACT_CACHE_MIN_AGE_MS,
|
|
61
62
|
directorySizeBytes,
|
|
62
63
|
gcExtractionCache,
|
|
63
64
|
resolveExtractCacheDir
|
|
64
|
-
} from "./chunk-
|
|
65
|
-
import "./chunk-
|
|
65
|
+
} from "./chunk-YUTUYCGK.js";
|
|
66
|
+
import "./chunk-2K5YII2L.js";
|
|
66
67
|
import "./chunk-NE55C6S5.js";
|
|
67
68
|
import "./chunk-JYVGYKXG.js";
|
|
68
|
-
import "./chunk-
|
|
69
|
-
import "./chunk-
|
|
69
|
+
import "./chunk-OBXWIVYN.js";
|
|
70
|
+
import "./chunk-3THJEW7G.js";
|
|
71
|
+
import "./chunk-OE4WEQMH.js";
|
|
70
72
|
import "./chunk-VC76R6W2.js";
|
|
71
73
|
import "./chunk-UJKQWGFF.js";
|
|
72
74
|
import "./chunk-VYKPBRCB.js";
|