hyperframes 0.8.177 → 0.8.178
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-YVP5YBNV.js → add-C4GN5ZDP.js} +12 -12
- package/dist/{animatedGifPrep-6SPYXSHE.js → animatedGifPrep-S6XXOOXK.js} +7 -7
- package/dist/api.js +15 -15
- package/dist/{asset-CZHAZMDR.js → asset-WTZ44Q7G.js} +2 -2
- package/dist/{assetCataloger-5GGNQC3Y.js → assetCataloger-MSAMR77T.js} +7 -7
- package/dist/{audio-F37HJPGZ.js → audio-ZSWOKO3D.js} +13 -13
- package/dist/{auth-CADZEUXD.js → auth-EUSWPXME.js} +1 -1
- package/dist/{autoUpdate-46XNDX2V.js → autoUpdate-WWXRJ2W7.js} +2 -2
- package/dist/{backgroundChecks-UWDSDJHJ.js → backgroundChecks-B2IJHAP6.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-KXXTVNPB.js → batchRender-OOQYGH5A.js} +4 -4
- package/dist/{beats-COVC2QGG.js → beats-OJT75KQY.js} +5 -5
- package/dist/{benchmark-HDPPG2FE.js → benchmark-EZTB4ITW.js} +9 -9
- package/dist/{browser-JEIXZKJN.js → browser-DNHBS5C7.js} +9 -8
- package/dist/{bundleWithLocalizedFonts-PMRGOQWD.js → bundleWithLocalizedFonts-GJAML42J.js} +2 -2
- package/dist/{capture-QVW6JPTF.js → capture-YRS6SZ6B.js} +11 -11
- package/dist/{capture-YMF7J55W.js → capture-ZBGAJYVH.js} +2 -2
- package/dist/{captureCompositionFrame-QUYL3DEX.js → captureCompositionFrame-Z33NWUED.js} +11 -11
- package/dist/{catalog-DTB6S66P.js → catalog-YF23PXV2.js} +12 -12
- package/dist/{catch-up-Y4KO7XHK.js → catch-up-YZZDUDRQ.js} +5 -5
- package/dist/{check-3YLTRK6W.js → check-NVGQ5PMF.js} +39 -39
- package/dist/{checkBrowser-LEUOWFNZ.js → checkBrowser-JX22QQDH.js} +35 -35
- package/dist/{chunk-42T7OP4O.js → chunk-32GKQ73S.js} +1 -1
- package/dist/{chunk-PIH4P2G6.js → chunk-3EJYUZHW.js} +16 -14
- package/dist/{chunk-L6XT6GSV.js → chunk-52L2L46Q.js} +1 -1
- package/dist/chunk-537IYAEE.js +80 -0
- package/dist/{chunk-BEX7K4WO.js → chunk-5PK3RLSB.js} +2 -2
- package/dist/{chunk-GVIH4ZQY.js → chunk-5RS2FIZU.js} +1 -1
- package/dist/{chunk-2YT3SCXL.js → chunk-62OXHKLS.js} +2 -2
- package/dist/{chunk-T76PLPD6.js → chunk-634HSJ3J.js} +2 -1
- package/dist/{chunk-JWUKHXM6.js → chunk-74Z2T3YM.js} +1 -1
- package/dist/{chunk-457OAAL2.js → chunk-7IAVKLNC.js} +1 -1
- package/dist/{chunk-L3LJVYXS.js → chunk-A2BB2XQU.js} +2 -2
- package/dist/{chunk-DQY6WTF7.js → chunk-A3RUVTGB.js} +1 -1
- package/dist/{chunk-OYEDHVSI.js → chunk-AFKVI7FJ.js} +1 -1
- package/dist/{chunk-VEQ7DKPG.js → chunk-AHS5QYKF.js} +1 -1
- package/dist/{chunk-FFDC5OWV.js → chunk-ALVXFXUG.js} +5 -3
- package/dist/{chunk-XXHHPB6E.js → chunk-AR5MS234.js} +11 -11
- package/dist/{chunk-M3MXTYDE.js → chunk-AYEWZYYC.js} +1 -1
- package/dist/{chunk-TNDNFZOK.js → chunk-BGKZ37BC.js} +2 -2
- package/dist/{chunk-LY2GLSOS.js → chunk-BJJ3QF7T.js} +1 -1
- package/dist/{chunk-GZG3ZZOO.js → chunk-BNGRVR3Y.js} +4 -4
- package/dist/{chunk-MPNVXG3J.js → chunk-C4FH67KI.js} +2 -2
- package/dist/{chunk-MG66UO4N.js → chunk-CJRGV2JW.js} +1 -1
- package/dist/{chunk-P3MMF2JQ.js → chunk-DKGZR7QA.js} +1 -1
- package/dist/{chunk-XRKMITSS.js → chunk-E24HSMZV.js} +12 -51
- package/dist/{chunk-MNEC244Z.js → chunk-EBKIF46T.js} +2 -2
- package/dist/{chunk-BQTCQ6VN.js → chunk-EINNFZAW.js} +3 -3
- package/dist/{chunk-EOOEC32M.js → chunk-EVMY7IPL.js} +22 -0
- package/dist/{chunk-PL4WM5XE.js → chunk-FIAQ4J45.js} +2 -2
- package/dist/{chunk-6OV3YGZF.js → chunk-FTWOVWHR.js} +2 -2
- package/dist/{chunk-2CEIKEFU.js → chunk-G3M4BIFN.js} +1 -1
- package/dist/{chunk-BHFIITTD.js → chunk-HFUMZZ4T.js} +5 -5
- package/dist/{chunk-7L4JOVV7.js → chunk-HNMRB77F.js} +1 -1
- package/dist/{chunk-GMJ3ILLW.js → chunk-ICMXC3MI.js} +7 -24
- package/dist/{chunk-LZT3NUTE.js → chunk-IE6O2VXV.js} +1 -1
- package/dist/{chunk-AFSBPASX.js → chunk-J4GE3BCG.js} +5 -5
- package/dist/{chunk-X4PK5ZXP.js → chunk-LO4DHZLH.js} +3 -3
- package/dist/{chunk-YCRX5APY.js → chunk-N66NVE65.js} +1 -1
- package/dist/{chunk-6GMZRHYD.js → chunk-N6S6V2DY.js} +3 -3
- package/dist/{chunk-LEILKM2N.js → chunk-O7PFPCQF.js} +193 -65
- package/dist/{chunk-UEGULMAH.js → chunk-ORM7SJ7K.js} +7 -7
- package/dist/chunk-PLNQW2C6.js +3805 -0
- package/dist/{chunk-JNL3RMDG.js → chunk-PU33GPG4.js} +1 -1
- package/dist/{chunk-W47D3KOB.js → chunk-RHWJKSGH.js} +1 -1
- package/dist/{chunk-B7DJQFAC.js → chunk-RTABHL2G.js} +3 -3
- package/dist/{chunk-K535ASAM.js → chunk-TINAVSGR.js} +1 -1
- package/dist/{chunk-C6TPGUWD.js → chunk-TTVHYD5R.js} +2 -2
- package/dist/{chunk-S3T3TDAB.js → chunk-U2AIXPAQ.js} +2 -2
- package/dist/{chunk-MXFCQCKE.js → chunk-UIXHQ4QG.js} +7 -7
- package/dist/{chunk-QWCXGTOH.js → chunk-UOHQV6AV.js} +24 -12
- package/dist/{chunk-HLBAQBHT.js → chunk-UQEBSY5U.js} +1 -1
- package/dist/{chunk-5ZSLJXQX.js → chunk-UWPUEI5U.js} +2 -2
- package/dist/{chunk-WNQUXBDU.js → chunk-V6WIQWUB.js} +3 -3
- package/dist/{chunk-4YBNQDZM.js → chunk-VCDWVVDV.js} +11 -7
- package/dist/{chunk-YWSXFFO3.js → chunk-VU4JLRNH.js} +156 -76
- package/dist/{chunk-SJFA4CZ3.js → chunk-XBZOYP4D.js} +1 -1
- package/dist/{chunk-X6HYBA4A.js → chunk-XSQWXUK2.js} +1 -1
- package/dist/{chunk-2PNLYDGZ.js → chunk-Y6JLEN3P.js} +10 -10
- package/dist/{chunk-KRKSY2AE.js → chunk-YAPJOCSH.js} +1 -1
- package/dist/{chunk-NWEER3QY.js → chunk-YH7VQAKX.js} +2 -2
- package/dist/{chunk-DZMWNCHM.js → chunk-ZAJO3YCQ.js} +2 -2
- package/dist/{chunk-SSYUONVH.js → chunk-ZAO7FTQM.js} +2 -2
- package/dist/{clean-BDXOJ4PW.js → clean-ODNP4ELD.js} +20 -20
- package/dist/cli.js +53 -53
- package/dist/{cloud-HVG2LUBO.js → cloud-2DACBBEP.js} +4 -4
- package/dist/{cloudrun-P35BPQCO.js → cloudrun-QSVGI2TT.js} +5 -5
- package/dist/{compare-ZXORZDGQ.js → compare-HMMGOM4F.js} +29 -29
- package/dist/{compiler-5TFPJPQQ.js → compiler-CQ6OKYT5.js} +2 -2
- package/dist/{component-AZHVBBVP.js → component-C6OLXSIK.js} +3 -3
- package/dist/{compositions-WFILUFC4.js → compositions-MOGZ4ASK.js} +11 -11
- package/dist/{delete-I34NH2Q4.js → delete-MDAYHORQ.js} +2 -2
- package/dist/{dist-U2HCECNB.js → dist-MHJYD5IZ.js} +6 -4
- package/dist/{doctor-6YID47TF.js → doctor-VEKKYMQT.js} +12 -12
- package/dist/{events-G76VOIBQ.js → events-CSKJXRJU.js} +4 -4
- package/dist/{events-OKT2KO6S.js → events-SKMTX6HF.js} +2 -2
- package/dist/{feedback-EGU7SSXF.js → feedback-64AKUFHZ.js} +7 -7
- package/dist/{ffmpeg-CSJLJAQ3.js → ffmpeg-64E4VH6W.js} +7 -7
- package/dist/{figma-SUJPNBQQ.js → figma-YEY76ZPG.js} +3 -3
- package/dist/fontLocalizeCli.js +10 -10
- package/dist/{get-7MYYFGO7.js → get-YJS76PGZ.js} +2 -2
- package/dist/{gpuPolicy-C6JWEX7F.js → gpuPolicy-IGZOHHMX.js} +7 -7
- package/dist/{grade-compare-P22VRQLA.js → grade-compare-35UEA52Z.js} +30 -30
- package/dist/{help-HL6QBZMC.js → help-I5TCDUVH.js} +1 -1
- package/dist/{history-OG2IXOQA.js → history-7BKIWSP2.js} +10 -10
- package/dist/hyperframe-runtime.js +57 -55
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +57 -55
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-7P77JIWI.js → info-UEPOM2LV.js} +8 -8
- package/dist/{init-JI7QDJV4.js → init-HIB66K2S.js} +27 -27
- package/dist/{inspect-7GSF776P.js → inspect-634XIKDS.js} +30 -30
- package/dist/{installer-NY5E5HCO.js → installer-ADKWK4I4.js} +5 -5
- package/dist/{keyframes-6NM477BA.js → keyframes-7BJX3EVE.js} +7 -7
- package/dist/{lambda-4DNBHUPF.js → lambda-Q4TRSMHZ.js} +6 -6
- package/dist/{layout-IBDEMDYP.js → layout-6DUVSHEB.js} +30 -30
- package/dist/{lint-BGAON4GT.js → lint-UPFD4JQZ.js} +7 -7
- package/dist/{list-PGWNFSLX.js → list-M6OMQXJX.js} +2 -2
- package/dist/{login-IAGLU3R3.js → login-QH6JDXDP.js} +4 -4
- package/dist/{manager-VOGZQSK4.js → manager-B4MSVFMK.js} +8 -8
- package/dist/{manager-HEUPD2YB.js → manager-V2QCCPOJ.js} +4 -3
- package/dist/{media-treatment-Z4N3JEDB.js → media-treatment-SHFTIG4K.js} +13 -13
- package/dist/{models-QUOIJVQI.js → models-USEFHJFY.js} +11 -11
- package/dist/{motionShot-GPNESXTN.js → motionShot-HRM6NMT4.js} +15 -15
- package/dist/{normalize-audio-C264N2QE.js → normalize-audio-EP3HPQZB.js} +8 -8
- package/dist/{open-HB5F4HSD.js → open-HXZEXQ4X.js} +12 -12
- package/dist/{parakeetRunner-2ZQOINZQ.js → parakeetRunner-D5RSHQB2.js} +12 -12
- package/dist/{pipeline-JWGTH2BJ.js → pipeline-BDG52SPL.js} +8 -8
- package/dist/{play-VQ4HA4CC.js → play-LSRQ6R66.js} +21 -21
- package/dist/{preflight-4WTT4D5X.js → preflight-GBPRLIM6.js} +9 -9
- package/dist/{present-HU46P43M.js → present-2VKAE63Q.js} +17 -17
- package/dist/{preview-LNTJ62DX.js → preview-MWH5CHTN.js} +18 -18
- package/dist/{producer-UZZQX6IJ.js → producer-W24FRIN7.js} +1 -1
- package/dist/{projectConfig-HDALEM6S.js → projectConfig-NQQDEDAK.js} +7 -7
- package/dist/{publication-NX4VC7UU.js → publication-7DW4IJPC.js} +3 -3
- package/dist/{publish-AZRRQUXM.js → publish-FJKJ74IF.js} +10 -10
- package/dist/{remove-background-OX5WZTXY.js → remove-background-JBOJAUIM.js} +9 -9
- package/dist/{render-HGT3EGIK.js → render-5TTZDI5N.js} +7 -14
- package/dist/{render-DV76TO7S.js → render-BROS2AIU.js} +9 -9
- package/dist/{render-TPE44TOW.js → render-JCYFNDWT.js} +32 -32
- package/dist/{render-batch-MUCDZ2WF.js → render-batch-FW56ZFGW.js} +8 -17
- package/dist/renderSetupWorker.js +2 -2
- package/dist/{resolver-FLQ42X2Y.js → resolver-UW6NYBJA.js} +5 -5
- package/dist/{sherpa-IBMU4WV6.js → sherpa-GWYCXYEP.js} +11 -11
- package/dist/{skills-M2ANTFD6.js → skills-YNM5SIHQ.js} +6 -6
- package/dist/{skillsUpdateCheck-4WNEKKDW.js → skillsUpdateCheck-FNC6VALY.js} +3 -3
- package/dist/{snapshot-5AKBT5IQ.js → snapshot-6EMEL4O3.js} +33 -33
- package/dist/{src-SGPA7DM7.js → src-VUIKXEFU.js} +9 -9
- package/dist/{src-JGPFLYBL.js → src-XRFOS5LP.js} +6 -6
- package/dist/{staticProjectServer-UVFPQEUZ.js → staticProjectServer-COEAKTGH.js} +17 -17
- package/dist/studio/assets/{hyperframes-player-BulZP0_1.js → hyperframes-player-Dfw61RJK.js} +1 -1
- package/dist/studio/assets/{index-B1Gypobp.js → index-Bi6yVTq9.js} +118 -117
- package/dist/studio/assets/{index-CGncBUsJ.js → index-eTRj5rY2.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-RVIU7JP2.js → studio-api-455XWQPD.js} +11 -11
- package/dist/{studioServer-K22MWDLW.js → studioServer-ZP2LJT7H.js} +52 -67
- package/dist/{telemetry-SUAMGBFK.js → telemetry-HJQ7IO6R.js} +4 -4
- package/dist/{timeline-SGVBFT36.js → timeline-CYW3YKMX.js} +20 -20
- package/dist/{tokens-IFHWY5WC.js → tokens-VOARLAAH.js} +2 -2
- package/dist/{transcribe-KAOCI5CW.js → transcribe-F6UOG57Z.js} +10 -10
- package/dist/{transcribe-GY4JHB7V.js → transcribe-FJGNOR6R.js} +16 -16
- package/dist/{updateCheck-YUNDJDLW.js → updateCheck-IOLCO3XV.js} +2 -2
- package/dist/{upgrade-PL2BFWTO.js → upgrade-BVW67SB7.js} +2 -2
- package/dist/{urlDownloader-FZ5ISJES.js → urlDownloader-QF7EBQC2.js} +6 -6
- package/dist/{validate-2NALRIFW.js → validate-3NHIT4VT.js} +24 -24
- package/dist/{video-7CDAIWYC.js → video-2KGC3RIQ.js} +7 -7
- package/package.json +1 -2
- package/dist/chunk-EEXE43II.js +0 -3805
- package/dist/chunk-TWWSYAKJ.js +0 -24
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
renderFrameIdForRenderId,
|
|
30
30
|
resolveAuthoredTimingWindow,
|
|
31
31
|
toFps
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-AHS5QYKF.js";
|
|
33
33
|
import {
|
|
34
34
|
AUDIO_GROUP_RENDER_ID_ATTR,
|
|
35
35
|
COLOR_GRADING_SOURCE_HIDDEN_ATTR,
|
|
@@ -58,18 +58,22 @@ import {
|
|
|
58
58
|
shiftRateLane,
|
|
59
59
|
sourceTimeAt,
|
|
60
60
|
timeAtSourceTime
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-PLNQW2C6.js";
|
|
62
62
|
import {
|
|
63
63
|
clampAudioGain,
|
|
64
64
|
isAudibleVideoElement
|
|
65
65
|
} from "./chunk-UJKQWGFF.js";
|
|
66
66
|
import {
|
|
67
|
-
redactTelemetryString
|
|
68
|
-
|
|
67
|
+
redactTelemetryString,
|
|
68
|
+
redactUrlQueryStrings
|
|
69
|
+
} from "./chunk-634HSJ3J.js";
|
|
69
70
|
import {
|
|
70
71
|
chromeMajorCeiling,
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
compareBrowserVersionsDescending,
|
|
73
|
+
exceedsChromeCeiling,
|
|
74
|
+
isManagedChromeDir,
|
|
75
|
+
pickSharedShell
|
|
76
|
+
} from "./chunk-537IYAEE.js";
|
|
73
77
|
import {
|
|
74
78
|
isWithinProjectRoot,
|
|
75
79
|
resolveProjectRelativeSrc
|
|
@@ -948,26 +952,6 @@ async function readWebGlInfo(browser) {
|
|
|
948
952
|
};
|
|
949
953
|
});
|
|
950
954
|
}
|
|
951
|
-
function compareBrowserVersionsDescending(left, right) {
|
|
952
|
-
const parse = (value) => {
|
|
953
|
-
const version = value.slice(value.indexOf("-") + 1);
|
|
954
|
-
const segments = [];
|
|
955
|
-
for (const segment of version.split(".")) {
|
|
956
|
-
const parsed = Number.parseInt(segment, 10);
|
|
957
|
-
if (!Number.isFinite(parsed)) break;
|
|
958
|
-
segments.push(parsed);
|
|
959
|
-
}
|
|
960
|
-
return segments;
|
|
961
|
-
};
|
|
962
|
-
const leftSegments = parse(left);
|
|
963
|
-
const rightSegments = parse(right);
|
|
964
|
-
const length = Math.max(leftSegments.length, rightSegments.length);
|
|
965
|
-
for (let index = 0; index < length; index += 1) {
|
|
966
|
-
const difference = (rightSegments[index] ?? 0) - (leftSegments[index] ?? 0);
|
|
967
|
-
if (difference !== 0) return difference;
|
|
968
|
-
}
|
|
969
|
-
return 0;
|
|
970
|
-
}
|
|
971
955
|
var CACHED_HEADLESS_SHELL_EXECUTABLES = {
|
|
972
956
|
"darwin/arm64": ["chrome-headless-shell-mac-arm64", "chrome-headless-shell"],
|
|
973
957
|
"darwin/x64": ["chrome-headless-shell-mac-x64", "chrome-headless-shell"],
|
|
@@ -1002,6 +986,29 @@ function findCachedHeadlessShell(baseDir) {
|
|
|
1002
986
|
}
|
|
1003
987
|
return void 0;
|
|
1004
988
|
}
|
|
989
|
+
function findSharedHeadlessShell(baseDir) {
|
|
990
|
+
const executable = cachedHeadlessShellExecutable();
|
|
991
|
+
if (!executable || !existsSync(baseDir)) return void 0;
|
|
992
|
+
try {
|
|
993
|
+
return pickSharedShell(readdirSync(baseDir), (version) => {
|
|
994
|
+
const binary = join2(baseDir, version, ...executable);
|
|
995
|
+
return isNonEmptyFile(binary) ? binary : void 0;
|
|
996
|
+
});
|
|
997
|
+
} catch {
|
|
998
|
+
return void 0;
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
function findManagedHeadlessShell(baseDir) {
|
|
1002
|
+
const executable = cachedHeadlessShellExecutable();
|
|
1003
|
+
if (!executable || !existsSync(baseDir)) return void 0;
|
|
1004
|
+
try {
|
|
1005
|
+
const version = readdirSync(baseDir).find(isManagedChromeDir);
|
|
1006
|
+
const binary = version && join2(baseDir, version, ...executable);
|
|
1007
|
+
return binary && isNonEmptyFile(binary) ? binary : void 0;
|
|
1008
|
+
} catch {
|
|
1009
|
+
return void 0;
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1005
1012
|
function resolveHeadlessShellPath(config) {
|
|
1006
1013
|
if (config?.chromePath) {
|
|
1007
1014
|
return config.chromePath;
|
|
@@ -1024,10 +1031,9 @@ function resolveHeadlessShellPath(config) {
|
|
|
1024
1031
|
}
|
|
1025
1032
|
return envPath;
|
|
1026
1033
|
}
|
|
1027
|
-
const
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
) ?? findCachedHeadlessShell(join2(home, ".cache", "puppeteer", "chrome-headless-shell"));
|
|
1034
|
+
const ours = join2(homedir(), ".cache", "hyperframes", "chrome", "chrome-headless-shell");
|
|
1035
|
+
const shared = join2(homedir(), ".cache", "puppeteer", "chrome-headless-shell");
|
|
1036
|
+
return findManagedHeadlessShell(ours) ?? findSharedHeadlessShell(shared) ?? findCachedHeadlessShell(ours);
|
|
1031
1037
|
}
|
|
1032
1038
|
function resolveFullChromePath() {
|
|
1033
1039
|
const baseDir = join2(homedir(), ".cache", "puppeteer", "chrome");
|
|
@@ -7595,7 +7601,7 @@ function getCapturePerfSummary(session) {
|
|
|
7595
7601
|
import {
|
|
7596
7602
|
closeSync,
|
|
7597
7603
|
copyFileSync,
|
|
7598
|
-
existsSync as
|
|
7604
|
+
existsSync as existsSync5,
|
|
7599
7605
|
ftruncateSync,
|
|
7600
7606
|
mkdirSync as mkdirSync2,
|
|
7601
7607
|
mkdtempSync,
|
|
@@ -7612,8 +7618,10 @@ import { join as join5, dirname as dirname2, extname } from "path";
|
|
|
7612
7618
|
import { spawn } from "child_process";
|
|
7613
7619
|
|
|
7614
7620
|
// ../engine/src/utils/managedChildProcess.ts
|
|
7621
|
+
import { StringDecoder } from "string_decoder";
|
|
7615
7622
|
var DEFAULT_TERMINATION_GRACE_MS = 2e3;
|
|
7616
7623
|
var DEFAULT_STDERR_MAX_BYTES = 64 * 1024;
|
|
7624
|
+
var RAW_STDERR_SLACK_FACTOR = 2;
|
|
7617
7625
|
var ManagedChildProcess = class {
|
|
7618
7626
|
constructor(child, options = {}) {
|
|
7619
7627
|
this.child = child;
|
|
@@ -7638,7 +7646,9 @@ var ManagedChildProcess = class {
|
|
|
7638
7646
|
outcomePromise;
|
|
7639
7647
|
resolveOutcome;
|
|
7640
7648
|
requestedReason = null;
|
|
7641
|
-
|
|
7649
|
+
rawStderrTail = "";
|
|
7650
|
+
rawStderrTailCut = false;
|
|
7651
|
+
stderrDecoder = new StringDecoder("utf8");
|
|
7642
7652
|
spawned = false;
|
|
7643
7653
|
settled = false;
|
|
7644
7654
|
deadlineTimer = null;
|
|
@@ -7661,13 +7671,18 @@ var ManagedChildProcess = class {
|
|
|
7661
7671
|
}
|
|
7662
7672
|
onStderr = (data) => {
|
|
7663
7673
|
const chunk = Buffer.isBuffer(data) ? data : Buffer.from(data);
|
|
7664
|
-
const
|
|
7665
|
-
this.
|
|
7666
|
-
if (this.
|
|
7667
|
-
this.stderrTail = this.stderrTail.subarray(this.stderrTail.byteLength - maxBytes);
|
|
7668
|
-
}
|
|
7674
|
+
const joined = this.rawStderrTail + this.stderrDecoder.write(chunk);
|
|
7675
|
+
this.rawStderrTail = lastBytes(joined, RAW_STDERR_SLACK_FACTOR * this.maxBytes);
|
|
7676
|
+
if (this.rawStderrTail !== joined) this.rawStderrTailCut = true;
|
|
7669
7677
|
this.options.onStderr?.(chunk.toString());
|
|
7670
7678
|
};
|
|
7679
|
+
get maxBytes() {
|
|
7680
|
+
return this.options.stderrMaxBytes ?? DEFAULT_STDERR_MAX_BYTES;
|
|
7681
|
+
}
|
|
7682
|
+
redactedStderrTail() {
|
|
7683
|
+
const raw = this.rawStderrTailCut ? withoutTokenSeveredByCut(this.rawStderrTail) : this.rawStderrTail;
|
|
7684
|
+
return lastBytes(redactUrlQueryStrings(raw), this.maxBytes);
|
|
7685
|
+
}
|
|
7671
7686
|
onSpawn = () => {
|
|
7672
7687
|
this.spawned = true;
|
|
7673
7688
|
};
|
|
@@ -7676,7 +7691,7 @@ var ManagedChildProcess = class {
|
|
|
7676
7691
|
reason: this.requestedReason ?? "exit",
|
|
7677
7692
|
exitCode,
|
|
7678
7693
|
signal,
|
|
7679
|
-
stderr: this.
|
|
7694
|
+
stderr: this.redactedStderrTail(),
|
|
7680
7695
|
durationMs: this.now() - this.startedAtMs
|
|
7681
7696
|
});
|
|
7682
7697
|
};
|
|
@@ -7686,7 +7701,7 @@ var ManagedChildProcess = class {
|
|
|
7686
7701
|
reason: "spawn_error",
|
|
7687
7702
|
exitCode: null,
|
|
7688
7703
|
signal: null,
|
|
7689
|
-
stderr: this.
|
|
7704
|
+
stderr: this.rawStderrTail.length > 0 ? this.redactedStderrTail() : error.message,
|
|
7690
7705
|
durationMs: this.now() - this.startedAtMs,
|
|
7691
7706
|
error
|
|
7692
7707
|
});
|
|
@@ -7749,6 +7764,13 @@ var ManagedChildProcess = class {
|
|
|
7749
7764
|
this.escalationTimer = null;
|
|
7750
7765
|
}
|
|
7751
7766
|
};
|
|
7767
|
+
function lastBytes(text, maxBytes) {
|
|
7768
|
+
return Buffer.byteLength(text) > maxBytes ? Buffer.from(text).subarray(-maxBytes).toString() : text;
|
|
7769
|
+
}
|
|
7770
|
+
function withoutTokenSeveredByCut(text) {
|
|
7771
|
+
const firstSpace = text.search(/\s/);
|
|
7772
|
+
return firstSpace < 0 ? "" : text.slice(firstSpace);
|
|
7773
|
+
}
|
|
7752
7774
|
|
|
7753
7775
|
// ../engine/src/utils/processTracker.ts
|
|
7754
7776
|
var tracked = /* @__PURE__ */ new Set();
|
|
@@ -8149,8 +8171,42 @@ async function runFfmpeg(args, opts) {
|
|
|
8149
8171
|
// ../engine/src/utils/ffprobe.ts
|
|
8150
8172
|
import { spawn as spawn3 } from "child_process";
|
|
8151
8173
|
import { createReadStream, readFileSync, statSync as statSync2 } from "fs";
|
|
8152
|
-
import { StringDecoder } from "string_decoder";
|
|
8174
|
+
import { StringDecoder as StringDecoder2 } from "string_decoder";
|
|
8153
8175
|
import { basename } from "path";
|
|
8176
|
+
|
|
8177
|
+
// ../engine/src/utils/urlInput.ts
|
|
8178
|
+
import { existsSync as existsSync4 } from "fs";
|
|
8179
|
+
var CA_BUNDLES = [
|
|
8180
|
+
"/etc/pki/tls/certs/ca-bundle.crt",
|
|
8181
|
+
"/etc/ssl/certs/ca-certificates.crt",
|
|
8182
|
+
"/etc/ssl/cert.pem"
|
|
8183
|
+
];
|
|
8184
|
+
var RECONNECT_ARGS = ["-rw_timeout", "30000000", "-reconnect", "1", "-reconnect_delay_max", "2"];
|
|
8185
|
+
function urlInputArgs(input, {
|
|
8186
|
+
tool = "ffmpeg",
|
|
8187
|
+
caBundles = CA_BUNDLES
|
|
8188
|
+
} = {}) {
|
|
8189
|
+
if (!/^https:\/\//i.test(input)) return [];
|
|
8190
|
+
const caFile = caBundles.find((path) => existsSync4(path));
|
|
8191
|
+
if (!caFile) {
|
|
8192
|
+
throw new Error(
|
|
8193
|
+
`[FFmpeg] cannot verify TLS for an https input: no CA bundle at ${caBundles.join(", ")}`
|
|
8194
|
+
);
|
|
8195
|
+
}
|
|
8196
|
+
const networkRetry = tool === "ffmpeg" ? ["-reconnect_on_network_error", "1"] : [];
|
|
8197
|
+
return ["-tls_verify", "1", "-ca_file", caFile, ...RECONNECT_ARGS, ...networkRetry];
|
|
8198
|
+
}
|
|
8199
|
+
function redactUrlQueriesInError(error) {
|
|
8200
|
+
if (!(error instanceof Error)) return error;
|
|
8201
|
+
const fields = error;
|
|
8202
|
+
for (const key of ["message", "stack", ...Object.keys(error)]) {
|
|
8203
|
+
if (typeof fields[key] === "string") fields[key] = redactUrlQueryStrings(fields[key]);
|
|
8204
|
+
}
|
|
8205
|
+
if (error.cause !== error) redactUrlQueriesInError(error.cause);
|
|
8206
|
+
return error;
|
|
8207
|
+
}
|
|
8208
|
+
|
|
8209
|
+
// ../engine/src/utils/ffprobe.ts
|
|
8154
8210
|
var FFPROBE_STDERR_MAX_BYTES = 8 * 1024;
|
|
8155
8211
|
var FFPROBE_STDOUT_MAX_CHARS = 8e6;
|
|
8156
8212
|
var FFPROBE_ERROR_MAX_CHARS = 4 * 1024;
|
|
@@ -8182,7 +8238,15 @@ async function runFfprobe(filePath, argsWithoutInput, signal, stdoutOptions) {
|
|
|
8182
8238
|
throw new Error('[FFmpeg] Refusing to probe "-": stdin is not a supported input path.');
|
|
8183
8239
|
}
|
|
8184
8240
|
const command = getFfprobeBinary();
|
|
8185
|
-
const
|
|
8241
|
+
const args = [
|
|
8242
|
+
"-v",
|
|
8243
|
+
"error",
|
|
8244
|
+
...urlInputArgs(filePath, { tool: "ffprobe" }),
|
|
8245
|
+
...argsWithoutInput,
|
|
8246
|
+
"--",
|
|
8247
|
+
filePath
|
|
8248
|
+
];
|
|
8249
|
+
const proc = spawn3(command, args, {
|
|
8186
8250
|
// Nothing is ever written to the child's stdin; leaving it as a pipe is
|
|
8187
8251
|
// what lets a stdin-reading invocation block indefinitely.
|
|
8188
8252
|
stdio: ["ignore", "pipe", "pipe"],
|
|
@@ -8190,7 +8254,7 @@ async function runFfprobe(filePath, argsWithoutInput, signal, stdoutOptions) {
|
|
|
8190
8254
|
windowsHide: true
|
|
8191
8255
|
});
|
|
8192
8256
|
trackChildProcess(proc);
|
|
8193
|
-
const decoder = new
|
|
8257
|
+
const decoder = new StringDecoder2("utf8");
|
|
8194
8258
|
let stdout = "";
|
|
8195
8259
|
let stdoutTruncated = false;
|
|
8196
8260
|
const stdoutMaxChars = stdoutOptions?.maxChars ?? FFPROBE_STDOUT_MAX_CHARS;
|
|
@@ -8552,7 +8616,8 @@ async function extractMediaMetadata(filePath) {
|
|
|
8552
8616
|
const colorTransfer = videoStream.color_transfer || "";
|
|
8553
8617
|
const colorPrimaries = videoStream.color_primaries || "";
|
|
8554
8618
|
const colorSpaceVal = videoStream.color_space || "";
|
|
8555
|
-
const
|
|
8619
|
+
const isPng = output !== null && isPngImageProbe(output);
|
|
8620
|
+
const cicp = !isPng || colorTransfer && colorPrimaries && colorSpaceVal ? null : stillImage()?.colorSpace;
|
|
8556
8621
|
const merged = {
|
|
8557
8622
|
colorTransfer: colorTransfer || cicp?.colorTransfer || "",
|
|
8558
8623
|
colorPrimaries: colorPrimaries || cicp?.colorPrimaries || "",
|
|
@@ -9160,7 +9225,7 @@ var secondsReader = (onSeconds) => onSeconds && ffmpegStatsReader(({ seconds })
|
|
|
9160
9225
|
async function encodeFramesFromDir(framesDir, framePattern, outputPath, options, signal, config, onFramesEncoded) {
|
|
9161
9226
|
const startTime = Date.now();
|
|
9162
9227
|
const outputDir = dirname2(outputPath);
|
|
9163
|
-
if (!
|
|
9228
|
+
if (!existsSync5(outputDir)) mkdirSync2(outputDir, { recursive: true });
|
|
9164
9229
|
const files = readdirSync2(framesDir).filter((f) => f.match(/\.(jpg|jpeg|png)$/i));
|
|
9165
9230
|
const frameCount = files.length;
|
|
9166
9231
|
if (frameCount === 0) {
|
|
@@ -9211,7 +9276,7 @@ async function encodeFramesFromDir(framesDir, framePattern, outputPath, options,
|
|
|
9211
9276
|
failureReason: isExternalFfmpegInterruption(result) ? "external_interruption" : void 0
|
|
9212
9277
|
};
|
|
9213
9278
|
}
|
|
9214
|
-
const fileSize =
|
|
9279
|
+
const fileSize = existsSync5(outputPath) ? statSync3(outputPath).size : 0;
|
|
9215
9280
|
return {
|
|
9216
9281
|
success: true,
|
|
9217
9282
|
outputPath,
|
|
@@ -9345,7 +9410,7 @@ async function encodeFramesChunkedConcat(framesDir, framePattern, outputPath, op
|
|
|
9345
9410
|
failureReason: concatResult.externalInterruption ? "external_interruption" : void 0
|
|
9346
9411
|
};
|
|
9347
9412
|
}
|
|
9348
|
-
const fileSize =
|
|
9413
|
+
const fileSize = existsSync5(outputPath) ? statSync3(outputPath).size : 0;
|
|
9349
9414
|
return {
|
|
9350
9415
|
success: true,
|
|
9351
9416
|
outputPath,
|
|
@@ -9356,7 +9421,7 @@ async function encodeFramesChunkedConcat(framesDir, framePattern, outputPath, op
|
|
|
9356
9421
|
}
|
|
9357
9422
|
async function muxVideoWithAudio(videoPath, audioPath, outputPath, signal, config, fps, onSecondsWritten) {
|
|
9358
9423
|
const outputDir = dirname2(outputPath);
|
|
9359
|
-
if (!
|
|
9424
|
+
if (!existsSync5(outputDir)) mkdirSync2(outputDir, { recursive: true });
|
|
9360
9425
|
const isWebm = outputPath.endsWith(".webm");
|
|
9361
9426
|
const isMov = outputPath.endsWith(".mov");
|
|
9362
9427
|
const shouldCopyAudio = isWebm ? false : await shouldCopyAacSidecar(audioPath, config);
|
|
@@ -9430,7 +9495,7 @@ async function packageHls(videoPath, audioPath, outputDir, options) {
|
|
|
9430
9495
|
if (outputDir.includes("%")) {
|
|
9431
9496
|
throw new Error(`[chunkEncoder] packageHls outputDir must not contain "%": ${outputDir}`);
|
|
9432
9497
|
}
|
|
9433
|
-
if (!
|
|
9498
|
+
if (!existsSync5(outputDir)) mkdirSync2(outputDir, { recursive: true });
|
|
9434
9499
|
const hasAudio = audioPath !== null;
|
|
9435
9500
|
const args = hasAudio ? ["-i", videoPath, "-i", audioPath, "-map", "0:v:0", "-map", "1:a:0"] : ["-i", videoPath, "-map", "0:v:0"];
|
|
9436
9501
|
args.push(
|
|
@@ -9577,7 +9642,7 @@ function quantizationTableError(buffer, start, end) {
|
|
|
9577
9642
|
// ../engine/src/services/streamingEncoder.ts
|
|
9578
9643
|
import { spawn as spawn4 } from "child_process";
|
|
9579
9644
|
import { once } from "events";
|
|
9580
|
-
import { existsSync as
|
|
9645
|
+
import { existsSync as existsSync6, mkdirSync as mkdirSync3, statSync as statSync4 } from "fs";
|
|
9581
9646
|
import { dirname as dirname3 } from "path";
|
|
9582
9647
|
function createFrameReorderBuffer(startFrame, endFrame) {
|
|
9583
9648
|
let cursor = startFrame;
|
|
@@ -9814,7 +9879,7 @@ function buildStreamingArgs(options, outputPath, gpuEncoder = null) {
|
|
|
9814
9879
|
}
|
|
9815
9880
|
async function spawnStreamingEncoder(outputPath, options, signal, config) {
|
|
9816
9881
|
const outputDir = dirname3(outputPath);
|
|
9817
|
-
if (!
|
|
9882
|
+
if (!existsSync6(outputDir)) mkdirSync3(outputDir, { recursive: true });
|
|
9818
9883
|
let gpuEncoder = null;
|
|
9819
9884
|
if (options.useGpu) {
|
|
9820
9885
|
gpuEncoder = await getCachedGpuEncoder();
|
|
@@ -9945,7 +10010,7 @@ FFmpeg stopped after ${streamingTimeout} ms without consuming a frame.` : "";
|
|
|
9945
10010
|
}) ? "external_interruption" : void 0
|
|
9946
10011
|
};
|
|
9947
10012
|
}
|
|
9948
|
-
const fileSize =
|
|
10013
|
+
const fileSize = existsSync6(outputPath) ? statSync4(outputPath).size : 0;
|
|
9949
10014
|
return { success: true, durationMs, fileSize };
|
|
9950
10015
|
},
|
|
9951
10016
|
getExitStatus: () => exitStatus,
|
|
@@ -10046,7 +10111,7 @@ function isMemberGroupHidden(groupsById, el) {
|
|
|
10046
10111
|
}
|
|
10047
10112
|
|
|
10048
10113
|
// ../engine/src/services/videoFrameExtractor.ts
|
|
10049
|
-
import { copyFileSync as copyFileSync2, existsSync as
|
|
10114
|
+
import { copyFileSync as copyFileSync2, existsSync as existsSync9, linkSync as linkSync2, mkdirSync as mkdirSync6, rmSync as rmSync4 } from "fs";
|
|
10050
10115
|
import { join as join10 } from "path";
|
|
10051
10116
|
import { cpus } from "os";
|
|
10052
10117
|
|
|
@@ -10192,7 +10257,7 @@ import {
|
|
|
10192
10257
|
closeSync as closeSync2,
|
|
10193
10258
|
createReadStream as createReadStream2,
|
|
10194
10259
|
createWriteStream,
|
|
10195
|
-
existsSync as
|
|
10260
|
+
existsSync as existsSync7,
|
|
10196
10261
|
fsyncSync,
|
|
10197
10262
|
linkSync,
|
|
10198
10263
|
mkdtempSync as mkdtempSync3,
|
|
@@ -11144,7 +11209,7 @@ async function downloadToTemp(url, destDir, timeoutMs = 3e5, signal, onTransient
|
|
|
11144
11209
|
if (inFlight) {
|
|
11145
11210
|
return inFlight;
|
|
11146
11211
|
}
|
|
11147
|
-
if (!
|
|
11212
|
+
if (!existsSync7(destDir)) {
|
|
11148
11213
|
mkdirSync4(destDir, { recursive: true });
|
|
11149
11214
|
}
|
|
11150
11215
|
const filename = getFilenameFromUrl(url, validationScope);
|
|
@@ -11221,7 +11286,7 @@ function unwrapTemplate(html) {
|
|
|
11221
11286
|
import { createHash as createHash2, randomUUID as randomUUID3 } from "crypto";
|
|
11222
11287
|
import {
|
|
11223
11288
|
createReadStream as createReadStream3,
|
|
11224
|
-
existsSync as
|
|
11289
|
+
existsSync as existsSync8,
|
|
11225
11290
|
lstatSync as lstatSync2,
|
|
11226
11291
|
mkdirSync as mkdirSync5,
|
|
11227
11292
|
readdirSync as readdirSync5,
|
|
@@ -11333,7 +11398,7 @@ function hasFrameFiles(dir) {
|
|
|
11333
11398
|
function lookupCacheEntry(rootDir, input) {
|
|
11334
11399
|
const keyHash = computeCacheKey(input);
|
|
11335
11400
|
const dir = join9(rootDir, cacheEntryDirName(keyHash));
|
|
11336
|
-
const complete =
|
|
11401
|
+
const complete = existsSync8(join9(dir, COMPLETE_SENTINEL)) && hasFrameFiles(dir);
|
|
11337
11402
|
return { entry: { dir, keyHash }, hit: complete };
|
|
11338
11403
|
}
|
|
11339
11404
|
function partialCacheEntryDir(entry) {
|
|
@@ -11344,7 +11409,7 @@ function isTargetExistsRenameError(err) {
|
|
|
11344
11409
|
return code === "EEXIST" || code === "ENOTEMPTY" || code === "EPERM";
|
|
11345
11410
|
}
|
|
11346
11411
|
function adoptPublishedWinner(entry, partialDir) {
|
|
11347
|
-
if (!
|
|
11412
|
+
if (!existsSync8(join9(entry.dir, COMPLETE_SENTINEL))) return null;
|
|
11348
11413
|
removeDir(partialDir);
|
|
11349
11414
|
return { dir: entry.dir, published: true };
|
|
11350
11415
|
}
|
|
@@ -11889,7 +11954,9 @@ function parseImageElements(html) {
|
|
|
11889
11954
|
return images;
|
|
11890
11955
|
}
|
|
11891
11956
|
async function readFirstFrameColour(videoPath, signal) {
|
|
11892
|
-
const result = await runFfmpeg(firstFrameColourArgs(videoPath), {
|
|
11957
|
+
const result = await runFfmpeg([...urlInputArgs(videoPath), ...firstFrameColourArgs(videoPath)], {
|
|
11958
|
+
signal
|
|
11959
|
+
});
|
|
11893
11960
|
return parseFirstFrameColour(result.stderr);
|
|
11894
11961
|
}
|
|
11895
11962
|
var CHROME_BT601_UNTAGGED_CODECS = /* @__PURE__ */ new Set(["vp9", "av1"]);
|
|
@@ -11975,14 +12042,21 @@ async function runSegmentedExtraction(job) {
|
|
|
11975
12042
|
}
|
|
11976
12043
|
return ran[ran.length - 1];
|
|
11977
12044
|
}
|
|
11978
|
-
async function extractVideoFramesRange(
|
|
12045
|
+
async function extractVideoFramesRange(...args) {
|
|
12046
|
+
try {
|
|
12047
|
+
return await extractVideoFramesRangeUnredacted(...args);
|
|
12048
|
+
} catch (error) {
|
|
12049
|
+
throw redactUrlQueriesInError(error);
|
|
12050
|
+
}
|
|
12051
|
+
}
|
|
12052
|
+
async function extractVideoFramesRangeUnredacted(videoPath, videoId, startTime, duration, options, signal, config, outputDirOverride) {
|
|
11979
12053
|
const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
|
|
11980
12054
|
const { outputDir, quality = 95 } = options;
|
|
11981
12055
|
const normalizedFps = toFps(options.fps);
|
|
11982
12056
|
const fps = fpsToNumber(normalizedFps);
|
|
11983
12057
|
const ffmpegFps = fpsToFfmpegArg(normalizedFps);
|
|
11984
12058
|
const videoOutputDir = outputDirOverride ?? join10(outputDir, videoId);
|
|
11985
|
-
if (!
|
|
12059
|
+
if (!existsSync9(videoOutputDir)) mkdirSync6(videoOutputDir, { recursive: true });
|
|
11986
12060
|
let metadata;
|
|
11987
12061
|
try {
|
|
11988
12062
|
metadata = await extractMediaMetadata(videoPath);
|
|
@@ -12017,7 +12091,7 @@ async function extractVideoFramesRange(videoPath, videoId, startTime, duration,
|
|
|
12017
12091
|
if (options.frameRanges && (!sampleAtOutputFps || metadata.isVFR)) {
|
|
12018
12092
|
throw new Error("frameRanges extraction needs a constant-frame-rate source");
|
|
12019
12093
|
}
|
|
12020
|
-
const args =
|
|
12094
|
+
const args = urlInputArgs(videoPath);
|
|
12021
12095
|
if (decodeWithVideoToolbox) {
|
|
12022
12096
|
args.push("-hwaccel", "videotoolbox");
|
|
12023
12097
|
}
|
|
@@ -12537,6 +12611,11 @@ async function extractAllVideoFrames(videos, baseDir, options, signal, config, c
|
|
|
12537
12611
|
if (!isHttpUrl(videoPath)) {
|
|
12538
12612
|
videoPath = resolveProjectRelativeSrc(video.src, baseDir, compiledDir);
|
|
12539
12613
|
}
|
|
12614
|
+
const remoteUrl = options.urlByAbsentLocalPath?.get(videoPath);
|
|
12615
|
+
if (remoteUrl) {
|
|
12616
|
+
resolvedVideos.push({ video, videoPath: remoteUrl });
|
|
12617
|
+
continue;
|
|
12618
|
+
}
|
|
12540
12619
|
if (isHttpUrl(videoPath)) {
|
|
12541
12620
|
const downloadDir = join10(options.outputDir, DOWNLOAD_SUBDIR);
|
|
12542
12621
|
mkdirSync6(downloadDir, { recursive: true });
|
|
@@ -12549,7 +12628,7 @@ async function extractAllVideoFrames(videos, baseDir, options, signal, config, c
|
|
|
12549
12628
|
{ onTelemetry: writeUrlDownloadTelemetry }
|
|
12550
12629
|
);
|
|
12551
12630
|
}
|
|
12552
|
-
if (!
|
|
12631
|
+
if (!existsSync9(videoPath)) {
|
|
12553
12632
|
if (!warnedSrcs.has(video.src)) {
|
|
12554
12633
|
warnedSrcs.add(video.src);
|
|
12555
12634
|
process.stderr.write(
|
|
@@ -13264,7 +13343,7 @@ var FrameLookupTable = class {
|
|
|
13264
13343
|
cleanup() {
|
|
13265
13344
|
for (const video of this.videos.values()) {
|
|
13266
13345
|
if (video.extracted.ownedByLookup) continue;
|
|
13267
|
-
if (
|
|
13346
|
+
if (existsSync9(video.extracted.outputDir)) {
|
|
13268
13347
|
rmSync4(video.extracted.outputDir, { recursive: true, force: true });
|
|
13269
13348
|
}
|
|
13270
13349
|
}
|
|
@@ -13717,7 +13796,7 @@ async function queryElementStacking(page, nativeHdrIds) {
|
|
|
13717
13796
|
}
|
|
13718
13797
|
|
|
13719
13798
|
// ../engine/src/services/audioMixer.ts
|
|
13720
|
-
import { closeSync as closeSync4, existsSync as
|
|
13799
|
+
import { closeSync as closeSync4, existsSync as existsSync11, mkdirSync as mkdirSync7, mkdtempSync as mkdtempSync7, openSync as openSync4, rmSync as rmSync8, writeFileSync as writeFileSync7 } from "fs";
|
|
13721
13800
|
import { join as join14, dirname as dirname7, isAbsolute, relative } from "path";
|
|
13722
13801
|
|
|
13723
13802
|
// ../engine/src/utils/notMediaPayload.ts
|
|
@@ -14381,7 +14460,7 @@ function chainTailSeconds(chain, automation) {
|
|
|
14381
14460
|
// ../engine/src/services/audioFxRender.ts
|
|
14382
14461
|
import {
|
|
14383
14462
|
closeSync as closeSync3,
|
|
14384
|
-
existsSync as
|
|
14463
|
+
existsSync as existsSync10,
|
|
14385
14464
|
mkdtempSync as mkdtempSync6,
|
|
14386
14465
|
openSync as openSync3,
|
|
14387
14466
|
readFileSync as readFileSync7,
|
|
@@ -14688,7 +14767,7 @@ async function renderInSegments(openPage, inputWav, header, chain, outputWav, op
|
|
|
14688
14767
|
}
|
|
14689
14768
|
async function applyAudioFxChain(inputWav, chain, outputWav, options) {
|
|
14690
14769
|
if (enabledAudioFxNodes(chain).length === 0) return { path: inputWav, envelopeBaked: false };
|
|
14691
|
-
if (!
|
|
14770
|
+
if (!existsSync10(inputWav)) {
|
|
14692
14771
|
throw new AudioFxRenderError(`Audio FX input is missing: ${inputWav}`);
|
|
14693
14772
|
}
|
|
14694
14773
|
const limits = { ...DEFAULT_STREAMING_LIMITS, ...options.streaming };
|
|
@@ -15201,7 +15280,7 @@ function parseAudioElements(html) {
|
|
|
15201
15280
|
async function extractAudioSegment(srcPath, outputPath, stage, mediaStart, duration, playbackRate = 1, signal, config) {
|
|
15202
15281
|
const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
|
|
15203
15282
|
const outputDir = dirname7(outputPath);
|
|
15204
|
-
if (!
|
|
15283
|
+
if (!existsSync11(outputDir)) mkdirSync7(outputDir, { recursive: true });
|
|
15205
15284
|
const normalizedPlaybackRate = normalizeRateSpec(playbackRate);
|
|
15206
15285
|
const sourceDuration = sourceTimeAt(normalizedPlaybackRate, duration);
|
|
15207
15286
|
const metadata = await extractAudioMetadata(srcPath).catch(() => null);
|
|
@@ -15247,7 +15326,7 @@ async function extractAudioSegment(srcPath, outputPath, stage, mediaStart, durat
|
|
|
15247
15326
|
async function generateSilence(outputPath, duration, signal, config) {
|
|
15248
15327
|
const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
|
|
15249
15328
|
const outputDir = dirname7(outputPath);
|
|
15250
|
-
if (!
|
|
15329
|
+
if (!existsSync11(outputDir)) mkdirSync7(outputDir, { recursive: true });
|
|
15251
15330
|
const args = [
|
|
15252
15331
|
"-f",
|
|
15253
15332
|
"lavfi",
|
|
@@ -15301,7 +15380,7 @@ async function mixAudioTracks(tracks, outputPath, totalDuration, signal, config,
|
|
|
15301
15380
|
};
|
|
15302
15381
|
}
|
|
15303
15382
|
const outputDir = dirname7(outputPath);
|
|
15304
|
-
if (!
|
|
15383
|
+
if (!existsSync11(outputDir)) mkdirSync7(outputDir, { recursive: true });
|
|
15305
15384
|
const buildFilterComplex = (ignoreAutomation, useNormalize2) => {
|
|
15306
15385
|
const filterParts = [];
|
|
15307
15386
|
tracks.forEach((track, i) => {
|
|
@@ -15407,7 +15486,7 @@ function groupNormalizeOptionUnsupported(stderr) {
|
|
|
15407
15486
|
async function mixGroupMembers(memberTracks, outputPath, totalDuration, signal, config) {
|
|
15408
15487
|
const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
|
|
15409
15488
|
const outputDir = dirname7(outputPath);
|
|
15410
|
-
if (!
|
|
15489
|
+
if (!existsSync11(outputDir)) mkdirSync7(outputDir, { recursive: true });
|
|
15411
15490
|
const buildInputFilters = (ignoreKeyframes) => memberTracks.map((track, i) => {
|
|
15412
15491
|
const volumeFilter = buildVolumeExpression(track, ignoreKeyframes);
|
|
15413
15492
|
return buildTrackInputFilter(track, i, volumeFilter, totalDuration);
|
|
@@ -15521,7 +15600,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
|
|
|
15521
15600
|
const failures = [];
|
|
15522
15601
|
const groupTracks = /* @__PURE__ */ new Map();
|
|
15523
15602
|
const groupMeta = /* @__PURE__ */ new Map();
|
|
15524
|
-
if (!
|
|
15603
|
+
if (!existsSync11(workDir)) mkdirSync7(workDir, { recursive: true });
|
|
15525
15604
|
const internalController = new AbortController();
|
|
15526
15605
|
const effectiveSignal = internalController.signal;
|
|
15527
15606
|
if (signal) {
|
|
@@ -15545,6 +15624,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
|
|
|
15545
15624
|
let srcPath = element.src;
|
|
15546
15625
|
if (!isHttpUrl(srcPath)) {
|
|
15547
15626
|
srcPath = resolveProjectRelativeSrc(element.src, baseDir, compiledDir);
|
|
15627
|
+
srcPath = config?.urlByAbsentLocalPath?.get(srcPath) ?? srcPath;
|
|
15548
15628
|
}
|
|
15549
15629
|
if (isHttpUrl(srcPath)) {
|
|
15550
15630
|
try {
|
|
@@ -15563,7 +15643,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
|
|
|
15563
15643
|
return;
|
|
15564
15644
|
}
|
|
15565
15645
|
}
|
|
15566
|
-
if (!
|
|
15646
|
+
if (!existsSync11(srcPath)) {
|
|
15567
15647
|
failures.push({
|
|
15568
15648
|
stage: "source",
|
|
15569
15649
|
reason: "source_not_found",
|
|
@@ -15907,7 +15987,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
|
|
|
15907
15987
|
|
|
15908
15988
|
// ../engine/src/services/parallelCoordinator.ts
|
|
15909
15989
|
import { cpus as cpus2, freemem } from "os";
|
|
15910
|
-
import { existsSync as
|
|
15990
|
+
import { existsSync as existsSync12, mkdirSync as mkdirSync8, readdirSync as readdirSync6 } from "fs";
|
|
15911
15991
|
import { copyFile, readFile as readFile2, rename } from "fs/promises";
|
|
15912
15992
|
import { join as join16 } from "path";
|
|
15913
15993
|
import { getHeapStatistics } from "v8";
|
|
@@ -16370,7 +16450,7 @@ async function verifyDiskDrawElementSamples(session, task, streaming) {
|
|
|
16370
16450
|
async function executeWorkerTask(task, serverUrl, captureOptions, createBeforeCaptureHook, signal, onFrameCaptured, onFrameBuffer, config, parallel, onFailure, onWorkerPhase) {
|
|
16371
16451
|
const startTime = Date.now();
|
|
16372
16452
|
let framesCaptured = 0;
|
|
16373
|
-
if (!
|
|
16453
|
+
if (!existsSync12(task.outputDir)) mkdirSync8(task.outputDir, { recursive: true });
|
|
16374
16454
|
let session = null;
|
|
16375
16455
|
let perf;
|
|
16376
16456
|
const needsSeparateBrowsers = shouldDisableBrowserPoolForParallelWorker({ parallel });
|
|
@@ -16589,11 +16669,11 @@ async function executeParallelCapture(serverUrl, workDir, tasks, captureOptions,
|
|
|
16589
16669
|
return results;
|
|
16590
16670
|
}
|
|
16591
16671
|
async function mergeWorkerFrames(workDir, tasks, outputDir) {
|
|
16592
|
-
if (!
|
|
16672
|
+
if (!existsSync12(outputDir)) mkdirSync8(outputDir, { recursive: true });
|
|
16593
16673
|
let totalFrames = 0;
|
|
16594
16674
|
const sortedTasks = [...tasks].sort((a, b) => a.startFrame - b.startFrame);
|
|
16595
16675
|
for (const task of sortedTasks) {
|
|
16596
|
-
if (!
|
|
16676
|
+
if (!existsSync12(task.outputDir)) {
|
|
16597
16677
|
continue;
|
|
16598
16678
|
}
|
|
16599
16679
|
const files = readdirSync6(task.outputDir).filter((f) => f.startsWith("frame_") && (f.endsWith(".jpg") || f.endsWith(".png"))).sort();
|
|
@@ -6,25 +6,25 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
resolveProject
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UQEBSY5U.js";
|
|
10
10
|
import {
|
|
11
11
|
serveStaticProjectHtml
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VCDWVVDV.js";
|
|
13
13
|
import {
|
|
14
14
|
AUDIT_SEEK_OPTIONS,
|
|
15
15
|
installPageFunctionGuard,
|
|
16
16
|
seekCompositionTimeline,
|
|
17
17
|
waitForCompositionFonts,
|
|
18
18
|
waitForRuntimeReady
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ORM7SJ7K.js";
|
|
20
20
|
import {
|
|
21
21
|
gotoWhenSent,
|
|
22
22
|
launchManagedBrowser,
|
|
23
23
|
resolveManagedGpuMode
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-52L2L46Q.js";
|
|
25
25
|
import {
|
|
26
26
|
pageNavigationTimeoutMs
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-LO4DHZLH.js";
|
|
28
28
|
import {
|
|
29
29
|
defineCommand
|
|
30
30
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
import {
|
|
39
39
|
printDeprecationNotice,
|
|
40
40
|
withMeta
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-7IAVKLNC.js";
|
|
42
42
|
import {
|
|
43
43
|
normalizeErrorMessage
|
|
44
44
|
} from "./chunk-KNU5COPB.js";
|
|
@@ -709,7 +709,7 @@ async function collectTweenBoundaries(page) {
|
|
|
709
709
|
});
|
|
710
710
|
}
|
|
711
711
|
async function bundleProjectHtml(projectDir) {
|
|
712
|
-
const { bundleToSingleHtml } = await import("./compiler-
|
|
712
|
+
const { bundleToSingleHtml } = await import("./compiler-CQ6OKYT5.js");
|
|
713
713
|
return bundleToSingleHtml(projectDir);
|
|
714
714
|
}
|
|
715
715
|
async function alignViewportToComposition(page, url) {
|
|
@@ -726,15 +726,15 @@ async function alignViewportToComposition(page, url) {
|
|
|
726
726
|
await gotoWhenSent(page, url, pageNavigationTimeoutMs());
|
|
727
727
|
}
|
|
728
728
|
async function runLayoutAudit(projectDir, opts) {
|
|
729
|
-
const { ensureBrowser } = await import("./manager-
|
|
729
|
+
const { ensureBrowser } = await import("./manager-V2QCCPOJ.js");
|
|
730
730
|
const puppeteer = await import("puppeteer-core");
|
|
731
|
-
const { buildChromeArgs } = await import("./src-
|
|
731
|
+
const { buildChromeArgs } = await import("./src-XRFOS5LP.js");
|
|
732
732
|
const {
|
|
733
733
|
assertWebGpuAdapterAvailable,
|
|
734
734
|
compositionRequiresWebGpu,
|
|
735
735
|
resolveLocalBrowserGpuMode,
|
|
736
736
|
resolveLocalWebGpu
|
|
737
|
-
} = await import("./gpuPolicy-
|
|
737
|
+
} = await import("./gpuPolicy-IGZOHHMX.js");
|
|
738
738
|
const html = await bundleProjectHtml(projectDir);
|
|
739
739
|
const server = await serveStaticProjectHtml(
|
|
740
740
|
projectDir,
|