hyperframes 0.8.147 → 0.8.149
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-5CNUY3EW.js → add-MG53577L.js} +18 -18
- package/dist/{animatedGifPrep-ZID2XJRQ.js → animatedGifPrep-HV4ZFVPV.js} +5 -5
- package/dist/api.d.ts +209 -0
- package/dist/api.js +75 -0
- package/dist/{asset-TFEENZ7K.js → asset-3GIBXLLL.js} +3 -3
- package/dist/{assetCataloger-GX4B55VB.js → assetCataloger-JJQ4JW2P.js} +2 -2
- package/dist/{auth-EJVZW6C3.js → auth-XQMT727H.js} +4 -4
- package/dist/{autoUpdate-MBNEZ2U4.js → autoUpdate-CREZJGMU.js} +2 -2
- package/dist/{backgroundChecks-DNW5NPTY.js → backgroundChecks-K3S5QKR3.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-T7S2CGJE.js → batchRender-42AKNX73.js} +6 -6
- package/dist/{beats-STXBGN6Z.js → beats-Y7IKETUS.js} +21 -21
- package/dist/{benchmark-AC6IGEQP.js → benchmark-22SAXSO5.js} +18 -18
- package/dist/{browser-FB5AK32T.js → browser-ABNISCC3.js} +14 -13
- package/dist/{bundleWithLocalizedFonts-HSCWGCFO.js → bundleWithLocalizedFonts-OE5ZI4JE.js} +5 -5
- package/dist/{capture-VEIVUHWB.js → capture-DBNHO4WJ.js} +2 -2
- package/dist/{capture-I24MXH3Y.js → capture-HQG5W42I.js} +19 -19
- package/dist/{catalog-JRC4VTTI.js → catalog-KICZFIDX.js} +34 -34
- package/dist/{catch-up-NTCK7Z3G.js → catch-up-ZCQUCI45.js} +13 -13
- package/dist/{check-7M7W4LPN.js → check-TGXIICEF.js} +48 -48
- package/dist/{checkBrowser-2YRVCAYB.js → checkBrowser-3N23I56J.js} +36 -36
- package/dist/{chunk-A72OAGNB.js → chunk-2HWB4TCI.js} +1 -1
- package/dist/chunk-3WD4JNMU.js +3795 -0
- package/dist/{chunk-XOJDBRNF.js → chunk-4S4VUXW3.js} +1 -1
- package/dist/{chunk-JBQJKC23.js → chunk-62RUQJ5J.js} +1 -1
- package/dist/{chunk-A6S35NYA.js → chunk-7IEGPJ4P.js} +1 -1
- package/dist/{chunk-BAKPN2D2.js → chunk-AHBYQRGI.js} +1 -1
- package/dist/{chunk-H7B6JSHI.js → chunk-AY2BONTF.js} +1 -1
- package/dist/{chunk-A4Q7W4LV.js → chunk-B3XLIBFL.js} +4 -2
- package/dist/{chunk-ZVZSFDW3.js → chunk-BNYRD7PQ.js} +2 -2
- package/dist/{chunk-DYWSCPCR.js → chunk-CNPJHUOX.js} +17 -17
- package/dist/{chunk-B45OFFOQ.js → chunk-CT6ZQRLD.js} +6 -8
- package/dist/chunk-CYFFYK2F.js +56 -0
- package/dist/{chunk-KVGDFUVO.js → chunk-CZQLCBWY.js} +26 -13
- package/dist/{chunk-6IIGT7BX.js → chunk-DNZMBQTH.js} +1 -1
- package/dist/{chunk-SYUGVPYH.js → chunk-DUUFDLC4.js} +1 -1
- package/dist/{chunk-3YUFN37G.js → chunk-GESJSXFH.js} +1 -1
- package/dist/chunk-HU2SPFNG.js +103 -0
- package/dist/{chunk-4OA4LDTU.js → chunk-IYLHJV34.js} +1 -1
- package/dist/{chunk-KBB4RG6F.js → chunk-JZIEZCQM.js} +9 -2
- package/dist/{chunk-XVIYZU3D.js → chunk-K35E45SI.js} +1 -1
- package/dist/{chunk-EGO6Z24R.js → chunk-K44HCHZN.js} +3 -3
- package/dist/{chunk-4YVMMRHR.js → chunk-K4RIT6PX.js} +2 -2
- package/dist/chunk-KGPLIH7B.js +127 -0
- package/dist/{chunk-B4P5VDFQ.js → chunk-KMAAOHLO.js} +1 -1
- package/dist/{chunk-MOL32UKR.js → chunk-KMJLHHBF.js} +1 -1
- package/dist/{chunk-3HSWLZ6S.js → chunk-KQHJKJ3V.js} +1 -1
- package/dist/{chunk-2IDHEEAN.js → chunk-KUTT3JXL.js} +88 -28
- package/dist/{chunk-3BETQ4XI.js → chunk-L274XRWA.js} +81 -8
- package/dist/{chunk-3PPO64IB.js → chunk-LACFOFWX.js} +10 -10
- package/dist/chunk-LCILS4AF.js +329 -0
- package/dist/{chunk-6BSIQJPW.js → chunk-LTJDUBSQ.js} +1 -1
- package/dist/{chunk-66SAATRI.js → chunk-M5B42RL5.js} +9 -9
- package/dist/{chunk-6WD636E5.js → chunk-MI6U3OIN.js} +2 -2
- package/dist/{chunk-YCGU3UNU.js → chunk-MXB6CWVH.js} +1 -1
- package/dist/{chunk-Z5C4LEAD.js → chunk-NKM53WMI.js} +11 -11
- package/dist/{chunk-QTTDKWSM.js → chunk-OMBSUO4T.js} +2 -2
- package/dist/{chunk-AL2YEVOT.js → chunk-P7NTODQE.js} +3 -3
- package/dist/{chunk-BHVFTYSI.js → chunk-PO2SDVQA.js} +4 -1
- package/dist/{chunk-DDNS2674.js → chunk-PR7QQBSC.js} +1 -1
- package/dist/{chunk-FDL4HV44.js → chunk-Q2Y5OZCY.js} +2 -2
- package/dist/{chunk-P6HELLPU.js → chunk-QIJLIULK.js} +2 -2
- package/dist/{chunk-5OKZLMQK.js → chunk-RMIFSBRV.js} +1 -1
- package/dist/{chunk-AFIATIKS.js → chunk-SFUBSJFP.js} +1 -1
- package/dist/{chunk-LE7T4ML7.js → chunk-SP6XL3NP.js} +1 -1
- package/dist/{chunk-SEABQTBP.js → chunk-TPIG7ZBX.js} +9 -9
- package/dist/{chunk-POKK6XXU.js → chunk-U7SASZC5.js} +15 -15
- package/dist/{chunk-JF5L5SQ6.js → chunk-VC7JBNPS.js} +72 -107
- package/dist/{chunk-N53FLAMZ.js → chunk-VGCEMOQA.js} +10 -10
- package/dist/{normalize-U3SL5VG3.js → chunk-VHZ6DL3M.js} +3 -3
- package/dist/chunk-VX4AL2FQ.js +26 -0
- package/dist/{chunk-3BYMCR4O.js → chunk-VXM4BH23.js} +23 -12
- package/dist/{chunk-ZLL72U3I.js → chunk-WX7VCRM7.js} +2 -2
- package/dist/{chunk-KPJMBC4K.js → chunk-XHBX7QN6.js} +4 -4
- package/dist/{chunk-BYSBRF24.js → chunk-XPQSL5VS.js} +5 -120
- package/dist/{chunk-55RZG5SQ.js → chunk-Y475GD4L.js} +4 -4
- package/dist/{chunk-ZQXNL5DL.js → chunk-YDRX42P3.js} +6 -6
- package/dist/{chunk-4SFGME7K.js → chunk-YJDB4FLT.js} +1 -1
- package/dist/{chunk-QATWIE4K.js → chunk-YU2QRNWN.js} +2 -2
- package/dist/{chunk-BPUFVVSH.js → chunk-ZK3BQXHC.js} +1 -1
- package/dist/{chunk-QHRPB2JQ.js → chunk-ZKDKFJCK.js} +13 -13
- package/dist/{clean-3RY3Y2GX.js → clean-6QP7VAV4.js} +32 -31
- package/dist/cli.js +55 -55
- package/dist/{cloud-MLPBFCVE.js → cloud-5TME5ROM.js} +4 -4
- package/dist/{cloudrun-NQF5KFQI.js → cloudrun-F5VVCVF5.js} +6 -6
- package/dist/{compare-6EZX2754.js → compare-XPY2EXX6.js} +35 -35
- package/dist/{compiler-ACCPOZMQ.js → compiler-NPD3MYMO.js} +2 -2
- package/dist/{component-F5PQHP6A.js → component-OPVL3PUX.js} +4 -4
- package/dist/{compositions-AUHWSI2H.js → compositions-WSEOI454.js} +19 -19
- package/dist/{delete-VUF4SHHJ.js → delete-SLMH57VH.js} +11 -11
- package/dist/{dist-GPDOV3IQ.js → dist-CUIR3GFX.js} +2 -2
- package/dist/{doctor-3XHCA5JM.js → doctor-QZW3EKIH.js} +20 -19
- package/dist/{events-FKOIB3R3.js → events-6C3ZG7LS.js} +8 -8
- package/dist/{events-TIU72LZM.js → events-FIFWFRGC.js} +6 -6
- package/dist/{feedback-V6VATYBE.js → feedback-VKXM7YJ5.js} +24 -24
- package/dist/{ffmpeg-5V4FP3R6.js → ffmpeg-TZB5WAYE.js} +3 -2
- package/dist/{figma-YBJM2VGE.js → figma-3UYNADNA.js} +3 -3
- package/dist/fontLocalizeCli.js +10 -10
- package/dist/{get-3YVCGZBX.js → get-VH7VMRVX.js} +11 -11
- package/dist/{gpuPolicy-ZOUG66M7.js → gpuPolicy-M2JZGGVW.js} +5 -5
- package/dist/{grade-compare-MYXIRKQI.js → grade-compare-OSC2YQWN.js} +40 -39
- package/dist/{help-WFZ2SUUR.js → help-DCBFEZPT.js} +3 -3
- package/dist/{history-HWPRJFR5.js → history-XYJMQE26.js} +15 -15
- package/dist/hyperframe-runtime.js +62 -62
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +62 -62
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-WJDTQ4OZ.js → info-YEHGENAH.js} +17 -17
- package/dist/{init-EXHDN7RO.js → init-64SML7PY.js} +52 -51
- package/dist/{inspect-EAOLZOMQ.js → inspect-GFOQKRJI.js} +32 -32
- package/dist/{installer-LZ4X5TZZ.js → installer-Q4MMZKLA.js} +4 -4
- package/dist/{keyframes-FSZYNEDN.js → keyframes-ORYFWKBZ.js} +16 -16
- package/dist/{lambda-3GAKHMC3.js → lambda-DRMOJGTC.js} +8 -8
- package/dist/{layout-M2TQ2CIX.js → layout-ZEQBE6UQ.js} +32 -32
- package/dist/{lint-7C5UPTNQ.js → lint-67KGFY63.js} +19 -19
- package/dist/{list-GU5KBZ73.js → list-T6OU5ARJ.js} +11 -11
- package/dist/{login-ZL2NYBIZ.js → login-2PXIGDP7.js} +9 -9
- package/dist/{logout-B4KS4A7S.js → logout-DKJANASY.js} +3 -3
- package/dist/{manager-5ORDVWJB.js → manager-ES2UFT4X.js} +6 -4
- package/dist/{manager-BPSR6D3V.js → manager-GWU5J6RJ.js} +3 -2
- package/dist/{media-treatment-QC3TAHVU.js → media-treatment-NAAHID6M.js} +27 -26
- package/dist/{models-A54I4QR5.js → models-P6XB6RWK.js} +19 -17
- package/dist/{motionShot-ZXPK562F.js → motionShot-7MHRIV6V.js} +13 -13
- package/dist/normalize-4UDISLPL.js +24 -0
- package/dist/{normalize-audio-CAP3DAE6.js → normalize-audio-LWNFYR2F.js} +15 -15
- package/dist/{open-GUSBNMDB.js → open-DAP5C7UD.js} +13 -13
- package/dist/{parakeetRunner-GCCH72CO.js → parakeetRunner-3ZVFPOD4.js} +17 -27
- package/dist/{pipeline-SCJ2MWYH.js → pipeline-V4YJCPUX.js} +9 -9
- package/dist/{play-FP2QLMGM.js → play-UDCESJO3.js} +35 -35
- package/dist/{preflight-ONF5AJNO.js → preflight-JOD4OXGC.js} +5 -4
- package/dist/{present-H5SA4APW.js → present-DXTHBH3F.js} +26 -26
- package/dist/{preview-ATPVKA6K.js → preview-YHXKRXKB.js} +39 -37
- package/dist/{producer-VBYUC27R.js → producer-343ENLAM.js} +1 -1
- package/dist/{projectConfig-SBRMQZGG.js → projectConfig-YXKU3CTB.js} +6 -6
- package/dist/{publication-5BQICRZO.js → publication-ODXP3JI7.js} +2 -2
- package/dist/{publish-XDUZA3E3.js → publish-UEFBFGV3.js} +22 -22
- package/dist/{refresh-PVHBEABE.js → refresh-MGCVWX56.js} +3 -3
- package/dist/{remove-background-GA6F7JZW.js → remove-background-FMV6IDOH.js} +38 -34
- package/dist/{render-XCYXFZTL.js → render-N7QGX6RJ.js} +30 -30
- package/dist/{render-PCFO45RK.js → render-SYC4RPGT.js} +6 -6
- package/dist/{render-KUVZFNQD.js → render-ZTXNPRGF.js} +61 -60
- package/dist/{render-batch-7R2NRNVJ.js → render-batch-SZRPCRUJ.js} +6 -6
- package/dist/renderSetupWorker.js +4 -3
- package/dist/{resolver-C4FPX72I.js → resolver-7MYXNEAX.js} +4 -4
- package/dist/{sherpa-IQY52XU6.js → sherpa-M4Z2Q5Y2.js} +15 -14
- package/dist/sherpaWorker.js +3 -1
- package/dist/{skills-JSSAEKUW.js → skills-NEHNSHZK.js} +15 -15
- package/dist/{skillsUpdateCheck-XE5E2K2F.js → skillsUpdateCheck-O77QR72A.js} +3 -3
- package/dist/{snapshot-QMQOE2DD.js → snapshot-GDVXFBVY.js} +54 -53
- package/dist/{src-R55QLGWI.js → src-PTIV7IVV.js} +6 -6
- package/dist/{src-2GMPFYHL.js → src-VMTHSARJ.js} +6 -4
- package/dist/{staticProjectServer-YH2RHYKW.js → staticProjectServer-3D2NXQ6W.js} +14 -14
- package/dist/{status-PTKNQD2E.js → status-NBRMGL7D.js} +5 -5
- package/dist/studio/assets/{hyperframes-player-_eMxRXF_.js → hyperframes-player-C-2YwYre.js} +1 -1
- package/dist/studio/assets/{index-bXzd7tvF.js → index-ByJU5J6n.js} +115 -115
- package/dist/studio/assets/{index-CEq9KmY2.js → index-BybGk67U.js} +1 -1
- package/dist/studio/assets/{index-6okhHdnH.js → index-Cfs2r3fz.js} +1 -1
- package/dist/studio/assets/{index-CVd4O6eH.css → index-DkQKsFxx.css} +1 -1
- package/dist/studio/index.html +2 -2
- package/dist/{studio-api-T2TS2CHL.js → studio-api-XIBDLRHB.js} +7 -7
- package/dist/{studioServer-Q4MT44LT.js → studioServer-QIQK47UN.js} +70 -69
- package/dist/{synthesize-UCI4X5O7.js → synthesize-22B7L5GX.js} +6 -6
- package/dist/{telemetry-V5JYZDS4.js → telemetry-565KDZUW.js} +8 -8
- package/dist/{timeline-KTCTOKF5.js → timeline-E6XB7I6W.js} +24 -24
- package/dist/{tokens-ZHREZPK6.js → tokens-3ZAJENSE.js} +3 -3
- package/dist/transcribe-WODP3T77.js +332 -0
- package/dist/{transcribe-CRAV4FU3.js → transcribe-XWQQCCBG.js} +13 -12
- package/dist/{tts-B6AHFQEO.js → tts-QSAQZVEZ.js} +3 -3
- package/dist/{updateCheck-E7RMSK3E.js → updateCheck-QPYU4GRL.js} +2 -2
- package/dist/{upgrade-27PFTDCV.js → upgrade-2FJ5ZEN6.js} +5 -5
- package/dist/{urlDownloader-EAF6PLUP.js → urlDownloader-352AY25I.js} +4 -4
- package/dist/{validate-OKNFDBMG.js → validate-SP2VGNEI.js} +25 -25
- package/dist/{video-IEVS4FIH.js → video-RVNPFEA6.js} +8 -8
- package/package.json +8 -1
- package/dist/chunk-6IHWCZ3W.js +0 -54
- package/dist/chunk-SQLK7SJL.js +0 -88
- package/dist/chunk-Z6FLHIDV.js +0 -3795
- package/dist/manager-RFZNG5YT.js +0 -30
- package/dist/renderCancellation-NIXEWRAO.js +0 -43
- package/dist/transcribe-4QDEWCE6.js +0 -466
- package/dist/{chunk-DKSDVDXG.js → chunk-NAMGMP3R.js} +3 -3
- package/dist/{policies-4FEXMXPK.js → policies-DCSIM4AB.js} +3 -3
- package/dist/{screenshotCapture-3JXXUZND.js → screenshotCapture-TEUIWXWN.js} +3 -3
- package/dist/{telemetry-W5AKPI4R.js → telemetry-CQYHCCPL.js} +3 -3
|
@@ -6,24 +6,24 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
serveStaticProjectHtml
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
resolveProject
|
|
12
|
-
} from "./chunk-AFIATIKS.js";
|
|
9
|
+
} from "./chunk-K44HCHZN.js";
|
|
13
10
|
import {
|
|
14
11
|
AUDIT_SEEK_OPTIONS,
|
|
15
12
|
installPageFunctionGuard,
|
|
16
13
|
seekCompositionTimeline,
|
|
17
14
|
waitForCompositionFonts,
|
|
18
15
|
waitForRuntimeReady
|
|
19
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TPIG7ZBX.js";
|
|
20
17
|
import {
|
|
21
18
|
launchManagedBrowser,
|
|
22
19
|
resolveManagedGpuMode
|
|
23
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-4S4VUXW3.js";
|
|
24
21
|
import {
|
|
25
22
|
resolveDiagnosticNavigationTimeoutMs
|
|
26
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-KQHJKJ3V.js";
|
|
24
|
+
import {
|
|
25
|
+
resolveProject
|
|
26
|
+
} from "./chunk-SFUBSJFP.js";
|
|
27
27
|
import {
|
|
28
28
|
defineCommand
|
|
29
29
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -31,16 +31,16 @@ import {
|
|
|
31
31
|
failCommand,
|
|
32
32
|
setCommandExitCode
|
|
33
33
|
} from "./chunk-PBN6GBJE.js";
|
|
34
|
+
import {
|
|
35
|
+
c
|
|
36
|
+
} from "./chunk-ZTZA4UWZ.js";
|
|
34
37
|
import {
|
|
35
38
|
printDeprecationNotice,
|
|
36
39
|
withMeta
|
|
37
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-GESJSXFH.js";
|
|
38
41
|
import {
|
|
39
42
|
normalizeErrorMessage
|
|
40
43
|
} from "./chunk-KNU5COPB.js";
|
|
41
|
-
import {
|
|
42
|
-
c
|
|
43
|
-
} from "./chunk-ZTZA4UWZ.js";
|
|
44
44
|
|
|
45
45
|
// src/commands/layout.ts
|
|
46
46
|
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
|
|
@@ -707,7 +707,7 @@ async function collectTweenBoundaries(page) {
|
|
|
707
707
|
});
|
|
708
708
|
}
|
|
709
709
|
async function bundleProjectHtml(projectDir) {
|
|
710
|
-
const { bundleToSingleHtml } = await import("./compiler-
|
|
710
|
+
const { bundleToSingleHtml } = await import("./compiler-NPD3MYMO.js");
|
|
711
711
|
return bundleToSingleHtml(projectDir);
|
|
712
712
|
}
|
|
713
713
|
async function alignViewportToComposition(page, url) {
|
|
@@ -727,15 +727,15 @@ async function alignViewportToComposition(page, url) {
|
|
|
727
727
|
});
|
|
728
728
|
}
|
|
729
729
|
async function runLayoutAudit(projectDir, opts) {
|
|
730
|
-
const { ensureBrowser } = await import("./manager-
|
|
730
|
+
const { ensureBrowser } = await import("./manager-GWU5J6RJ.js");
|
|
731
731
|
const puppeteer = await import("puppeteer-core");
|
|
732
|
-
const { buildChromeArgs } = await import("./src-
|
|
732
|
+
const { buildChromeArgs } = await import("./src-VMTHSARJ.js");
|
|
733
733
|
const {
|
|
734
734
|
assertWebGpuAdapterAvailable,
|
|
735
735
|
compositionRequiresWebGpu,
|
|
736
736
|
resolveLocalBrowserGpuMode,
|
|
737
737
|
resolveLocalWebGpu
|
|
738
|
-
} = await import("./gpuPolicy-
|
|
738
|
+
} = await import("./gpuPolicy-M2JZGGVW.js");
|
|
739
739
|
const html = await bundleProjectHtml(projectDir);
|
|
740
740
|
const server = await serveStaticProjectHtml(
|
|
741
741
|
projectDir,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
renderFrameIdForRenderId,
|
|
27
27
|
resolveAuthoredTimingWindow,
|
|
28
28
|
toFps
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-AHBYQRGI.js";
|
|
30
30
|
import {
|
|
31
31
|
AUDIO_GROUP_RENDER_ID_ATTR,
|
|
32
32
|
COLOR_GRADING_SOURCE_HIDDEN_ATTR,
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
shiftRateLane,
|
|
56
56
|
sourceTimeAt,
|
|
57
57
|
timeAtSourceTime
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-3WD4JNMU.js";
|
|
59
59
|
import {
|
|
60
60
|
clampAudioGain,
|
|
61
61
|
isAudibleVideoElement
|
|
@@ -8363,6 +8363,7 @@ async function extractMediaMetadata(filePath) {
|
|
|
8363
8363
|
durationSeconds: containerDuration,
|
|
8364
8364
|
videoStreamDurationSeconds: effectiveStreamDuration,
|
|
8365
8365
|
videoStreamStartSeconds: streamStart,
|
|
8366
|
+
videoStreamLeadSeconds: streamLeadSeconds(output, videoStream),
|
|
8366
8367
|
width: videoStream.width || stillImage()?.width || 0,
|
|
8367
8368
|
height: videoStream.height || stillImage()?.height || 0,
|
|
8368
8369
|
fps,
|
|
@@ -8467,13 +8468,28 @@ async function extractAudioMetadata(filePath, options) {
|
|
|
8467
8468
|
sampleRate,
|
|
8468
8469
|
channels: audioStream.channels || 2,
|
|
8469
8470
|
audioCodec,
|
|
8470
|
-
bitrate: output.format.bit_rate ? parseInt(output.format.bit_rate) : void 0
|
|
8471
|
+
bitrate: output.format.bit_rate ? parseInt(output.format.bit_rate) : void 0,
|
|
8472
|
+
latestStreamLeadSeconds: latestStreamLeadSeconds(output)
|
|
8471
8473
|
};
|
|
8472
8474
|
})();
|
|
8473
8475
|
if (options?.signal) return probePromise;
|
|
8474
8476
|
writeMetadataCache(audioMetadataCache, filePath, identity, probePromise);
|
|
8475
8477
|
return probePromise;
|
|
8476
8478
|
}
|
|
8479
|
+
function audioVideoStreamStarts(output) {
|
|
8480
|
+
return (output?.streams ?? []).filter(
|
|
8481
|
+
(s) => (s.codec_type === "audio" || s.codec_type === "video") && s.disposition?.attached_pic !== 1
|
|
8482
|
+
).map((s) => parseFloat(s.start_time ?? "")).filter(Number.isFinite);
|
|
8483
|
+
}
|
|
8484
|
+
function streamLeadSeconds(output, stream) {
|
|
8485
|
+
const starts = audioVideoStreamStarts(output);
|
|
8486
|
+
const start = parseFloat(stream.start_time ?? "");
|
|
8487
|
+
return Number.isFinite(start) && starts.length > 0 ? Math.max(0, start - Math.min(...starts)) : 0;
|
|
8488
|
+
}
|
|
8489
|
+
function latestStreamLeadSeconds(output) {
|
|
8490
|
+
const starts = audioVideoStreamStarts(output);
|
|
8491
|
+
return starts.length > 0 ? Math.max(...starts) - Math.min(...starts) : 0;
|
|
8492
|
+
}
|
|
8477
8493
|
function audioStartSeconds(stream, format) {
|
|
8478
8494
|
const start = parseFloat(stream.start_time ?? format.start_time ?? "");
|
|
8479
8495
|
return Number.isFinite(start) ? start : 0;
|
|
@@ -11941,9 +11957,9 @@ async function extractVideoFramesRange(videoPath, videoId, startTime, duration,
|
|
|
11941
11957
|
if (framePaths.size > 0 && duration > 0 && !options.finalFrameOnly && !options.frameRanges) {
|
|
11942
11958
|
const expectedAtFps = extractionFrameCountForDuration(duration, normalizedFps, metadata.isVFR);
|
|
11943
11959
|
if (expectedAtFps > 0 && framePaths.size <= expectedAtFps * 0.6) {
|
|
11944
|
-
const
|
|
11945
|
-
if (
|
|
11946
|
-
metadata.videoStreamDurationSeconds =
|
|
11960
|
+
const correctedStreamDuration = startTime + framePaths.size / fps - (metadata.videoStreamLeadSeconds ?? 0);
|
|
11961
|
+
if (correctedStreamDuration < metadata.videoStreamDurationSeconds) {
|
|
11962
|
+
metadata.videoStreamDurationSeconds = correctedStreamDuration;
|
|
11947
11963
|
}
|
|
11948
11964
|
}
|
|
11949
11965
|
}
|
|
@@ -11984,7 +12000,7 @@ function resolveSegmentDuration(requested, mediaStart, sourceDuration) {
|
|
|
11984
12000
|
return sourceRemaining > 0 ? sourceRemaining : sourceDuration;
|
|
11985
12001
|
}
|
|
11986
12002
|
function resolvePlayableVideoDuration(metadata) {
|
|
11987
|
-
return Number.isFinite(metadata.videoStreamDurationSeconds) && metadata.videoStreamDurationSeconds > 0 ? metadata.videoStreamDurationSeconds : metadata.durationSeconds;
|
|
12003
|
+
return Number.isFinite(metadata.videoStreamDurationSeconds) && metadata.videoStreamDurationSeconds > 0 ? (metadata.videoStreamLeadSeconds ?? 0) + metadata.videoStreamDurationSeconds : metadata.durationSeconds;
|
|
11988
12004
|
}
|
|
11989
12005
|
function canHoldFinalFramePastEof(video) {
|
|
11990
12006
|
const timelineDuration = video.end - video.start;
|
|
@@ -12098,10 +12114,11 @@ function resolveTimelineExtractionWindow(video, resolvedDuration, timelineEnd, s
|
|
|
12098
12114
|
async function resolveFinalFrameExtractionWindow(videoPath, video, metadata, window2, signal) {
|
|
12099
12115
|
if (!window2.ensureFinalFrame) return window2;
|
|
12100
12116
|
const playableDuration = resolvePlayableVideoDuration(metadata);
|
|
12101
|
-
const
|
|
12117
|
+
const videoStreamLead = metadata.videoStreamLeadSeconds ?? 0;
|
|
12118
|
+
const finalFrameTimestamp = videoStreamLead + await extractFinalVideoFrameTimestamp(
|
|
12102
12119
|
videoPath,
|
|
12103
12120
|
{
|
|
12104
|
-
videoStreamDurationSeconds: playableDuration,
|
|
12121
|
+
videoStreamDurationSeconds: playableDuration - videoStreamLead,
|
|
12105
12122
|
videoStreamStartSeconds: metadata.videoStreamStartSeconds
|
|
12106
12123
|
},
|
|
12107
12124
|
signal
|
|
@@ -12914,6 +12931,10 @@ async function extractAllVideoFrames(videos, baseDir, options, signal, config, c
|
|
|
12914
12931
|
phaseBreakdown: breakdown
|
|
12915
12932
|
};
|
|
12916
12933
|
}
|
|
12934
|
+
var BROWSER_SHOWS_UPCOMING_FIRST_FRAME_WITHIN_SECONDS = 1;
|
|
12935
|
+
function isVideoHiddenBeforeStreamStart(videoStreamLeadSeconds, mediaTime) {
|
|
12936
|
+
return (videoStreamLeadSeconds ?? 0) - mediaTime >= BROWSER_SHOWS_UPCOMING_FIRST_FRAME_WITHIN_SECONDS - 1e-6;
|
|
12937
|
+
}
|
|
12917
12938
|
function getFrameIndexAtTime(extracted, globalTime, videoStart, loop = false, mediaStart = 0, holdLastFrame = false, playbackRate = 1) {
|
|
12918
12939
|
let localTime = Math.max(0, globalTime - videoStart);
|
|
12919
12940
|
const normalizedPlaybackRate = normalizeRateSpec(playbackRate);
|
|
@@ -12931,6 +12952,12 @@ function getFrameIndexAtTime(extracted, globalTime, videoStart, loop = false, me
|
|
|
12931
12952
|
}
|
|
12932
12953
|
const frameIndex = Math.floor(sourceTime * extracted.fps + 1e-9);
|
|
12933
12954
|
if (frameIndex < 0 || extracted.totalFrames <= 0) return null;
|
|
12955
|
+
if (isVideoHiddenBeforeStreamStart(
|
|
12956
|
+
extracted.metadata.videoStreamLeadSeconds,
|
|
12957
|
+
mediaStart + sourceTime
|
|
12958
|
+
)) {
|
|
12959
|
+
return null;
|
|
12960
|
+
}
|
|
12934
12961
|
if (frameIndex >= extracted.totalFrames) {
|
|
12935
12962
|
return loop || holdLastFrame ? extracted.totalFrames - 1 : null;
|
|
12936
12963
|
}
|
|
@@ -14269,11 +14296,11 @@ function buildAtempoFilter(playbackRate) {
|
|
|
14269
14296
|
}
|
|
14270
14297
|
var RAMP_SLICE_SECONDS = 0.25;
|
|
14271
14298
|
var MAX_RAMP_SLICES = 240;
|
|
14272
|
-
function buildRampFilterComplex(lane, duration, tailFilter) {
|
|
14299
|
+
function buildRampFilterComplex(lane, duration, headFilter, tailFilter) {
|
|
14273
14300
|
const slices = Math.min(MAX_RAMP_SLICES, Math.max(1, Math.ceil(duration / RAMP_SLICE_SECONDS)));
|
|
14274
14301
|
const step = duration / slices;
|
|
14275
14302
|
const split = Array.from({ length: slices }, (_, i) => `[s${i}]`).join("");
|
|
14276
|
-
const parts = [`[0:a]asplit=${slices}${split}`];
|
|
14303
|
+
const parts = [`[0:a]${headFilter ? `${headFilter},` : ""}asplit=${slices}${split}`];
|
|
14277
14304
|
for (let i = 0; i < slices; i += 1) {
|
|
14278
14305
|
const from = sourceTimeAt(lane, i * step);
|
|
14279
14306
|
const to = sourceTimeAt(lane, (i + 1) * step);
|
|
@@ -14293,24 +14320,16 @@ function buildRampFilterComplex(lane, duration, tailFilter) {
|
|
|
14293
14320
|
if (tailFilter) parts.push(`[cat]${tailFilter}[out]`);
|
|
14294
14321
|
return parts.join(";");
|
|
14295
14322
|
}
|
|
14296
|
-
function preparedAudioOutputArgs(
|
|
14297
|
-
|
|
14298
|
-
|
|
14299
|
-
|
|
14300
|
-
|
|
14301
|
-
|
|
14302
|
-
|
|
14303
|
-
|
|
14304
|
-
|
|
14305
|
-
|
|
14306
|
-
const graph = buildRampFilterComplex(playbackRate, duration, filters.join(",") || null);
|
|
14307
|
-
return ["-filter_complex", graph, "-map", "[out]", ...outputArgs];
|
|
14308
|
-
}
|
|
14309
|
-
const atempo = buildAtempoFilter(playbackRate);
|
|
14310
|
-
if (atempo) filters.push(atempo);
|
|
14311
|
-
if (filters.length > 0) outputArgs.push("-af", filters.join(","));
|
|
14312
|
-
return outputArgs;
|
|
14313
|
-
});
|
|
14323
|
+
function preparedAudioOutputArgs(metadata, playbackRate, duration, headFilter) {
|
|
14324
|
+
const channelFilter = metadata?.channels === 1 ? STEREO_CHANNEL_FILTER : null;
|
|
14325
|
+
const outputArgs = channelFilter ? [] : ["-ac", "2"];
|
|
14326
|
+
if (typeof playbackRate === "object") {
|
|
14327
|
+
const graph = buildRampFilterComplex(playbackRate, duration, headFilter, channelFilter);
|
|
14328
|
+
return ["-filter_complex", graph, "-map", "[out]", ...outputArgs];
|
|
14329
|
+
}
|
|
14330
|
+
const filters = [headFilter, channelFilter, buildAtempoFilter(playbackRate)].filter(Boolean);
|
|
14331
|
+
if (filters.length > 0) outputArgs.push("-af", filters.join(","));
|
|
14332
|
+
return outputArgs;
|
|
14314
14333
|
}
|
|
14315
14334
|
function escapeExpressionCommas(expression) {
|
|
14316
14335
|
return expression.replace(/\\/g, "\\\\").replace(/,/g, "\\,");
|
|
@@ -14321,14 +14340,6 @@ function legacyFilterScriptOptionIsUnsupported(stderr) {
|
|
|
14321
14340
|
var MAX_VOLUME_SEGMENTS = 32;
|
|
14322
14341
|
var VOLUME_SIMPLIFY_EPSILON = 5e-3;
|
|
14323
14342
|
var STEREO_CHANNEL_FILTER = "pan=stereo|FL=FL+FC|FR=FR+FC";
|
|
14324
|
-
async function stereoOutputArgs(srcPath) {
|
|
14325
|
-
try {
|
|
14326
|
-
const { channels } = await extractAudioMetadata(srcPath);
|
|
14327
|
-
if (channels === 1) return ["-af", STEREO_CHANNEL_FILTER];
|
|
14328
|
-
} catch {
|
|
14329
|
-
}
|
|
14330
|
-
return ["-ac", "2"];
|
|
14331
|
-
}
|
|
14332
14343
|
function simplifyVolumeKeyframes(keyframes) {
|
|
14333
14344
|
if (keyframes.length < 3) return keyframes;
|
|
14334
14345
|
const keep = new Array(keyframes.length).fill(false);
|
|
@@ -14592,71 +14603,24 @@ function parseAudioElements(html) {
|
|
|
14592
14603
|
}
|
|
14593
14604
|
return elements;
|
|
14594
14605
|
}
|
|
14595
|
-
async function
|
|
14596
|
-
const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
|
|
14597
|
-
const outputDir = dirname6(outputPath);
|
|
14598
|
-
if (!existsSync10(outputDir)) mkdirSync7(outputDir, { recursive: true });
|
|
14599
|
-
const playbackRate = normalizeRateSpec(options?.playbackRate);
|
|
14600
|
-
const args = [];
|
|
14601
|
-
if (options?.startTime !== void 0) args.push("-ss", String(options.startTime));
|
|
14602
|
-
if (options?.duration !== void 0) {
|
|
14603
|
-
args.push("-t", String(sourceTimeAt(playbackRate, options.duration)));
|
|
14604
|
-
}
|
|
14605
|
-
args.push("-i", videoPath);
|
|
14606
|
-
const outputArgs = await preparedAudioOutputArgs(videoPath, playbackRate, options?.duration);
|
|
14607
|
-
args.push("-vn", "-acodec", "pcm_s16le", "-ar", "48000", ...outputArgs);
|
|
14608
|
-
if (playbackRate !== 1 && options?.duration !== void 0) {
|
|
14609
|
-
args.push("-t", String(options.duration));
|
|
14610
|
-
}
|
|
14611
|
-
args.push("-y", outputPath);
|
|
14612
|
-
const result = await runFfmpeg(args, { signal, timeout: ffmpegProcessTimeout });
|
|
14613
|
-
if (signal?.aborted) {
|
|
14614
|
-
const failure = {
|
|
14615
|
-
stage: "cancelled",
|
|
14616
|
-
reason: "cancelled",
|
|
14617
|
-
owner: "user",
|
|
14618
|
-
retryable: false,
|
|
14619
|
-
detail: "Audio extract cancelled"
|
|
14620
|
-
};
|
|
14621
|
-
return {
|
|
14622
|
-
success: false,
|
|
14623
|
-
outputPath,
|
|
14624
|
-
durationMs: result.durationMs,
|
|
14625
|
-
error: failure.detail,
|
|
14626
|
-
failure
|
|
14627
|
-
};
|
|
14628
|
-
}
|
|
14629
|
-
if (!result.success) {
|
|
14630
|
-
const failure = ffmpegFailure("extract", result);
|
|
14631
|
-
return {
|
|
14632
|
-
success: false,
|
|
14633
|
-
outputPath,
|
|
14634
|
-
durationMs: result.durationMs,
|
|
14635
|
-
error: failure.detail,
|
|
14636
|
-
failure
|
|
14637
|
-
};
|
|
14638
|
-
}
|
|
14639
|
-
return { success: true, outputPath, durationMs: result.durationMs };
|
|
14640
|
-
}
|
|
14641
|
-
async function prepareAudioTrack(srcPath, outputPath, mediaStart, duration, playbackRate = 1, signal, config) {
|
|
14606
|
+
async function extractAudioSegment(srcPath, outputPath, stage, mediaStart, duration, playbackRate = 1, signal, config) {
|
|
14642
14607
|
const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
|
|
14643
14608
|
const outputDir = dirname6(outputPath);
|
|
14644
14609
|
if (!existsSync10(outputDir)) mkdirSync7(outputDir, { recursive: true });
|
|
14645
14610
|
const normalizedPlaybackRate = normalizeRateSpec(playbackRate);
|
|
14646
|
-
const
|
|
14647
|
-
const
|
|
14648
|
-
|
|
14649
|
-
|
|
14650
|
-
|
|
14651
|
-
|
|
14652
|
-
|
|
14653
|
-
|
|
14654
|
-
|
|
14655
|
-
|
|
14656
|
-
|
|
14657
|
-
|
|
14658
|
-
|
|
14659
|
-
];
|
|
14611
|
+
const sourceDuration = sourceTimeAt(normalizedPlaybackRate, duration);
|
|
14612
|
+
const metadata = await extractAudioMetadata(srcPath).catch(() => null);
|
|
14613
|
+
const inputSeek = mediaStart >= (metadata?.latestStreamLeadSeconds ?? 0);
|
|
14614
|
+
const start = formatFilterNumber(mediaStart);
|
|
14615
|
+
const timestampTrim = inputSeek ? null : `atrim=start=${start}:end=${formatFilterNumber(mediaStart + sourceDuration)},asetpts=PTS-${start}/TB,aresample=async=1:first_pts=0`;
|
|
14616
|
+
const outputArgs = preparedAudioOutputArgs(
|
|
14617
|
+
metadata,
|
|
14618
|
+
normalizedPlaybackRate,
|
|
14619
|
+
duration,
|
|
14620
|
+
timestampTrim
|
|
14621
|
+
);
|
|
14622
|
+
const args = inputSeek ? ["-ss", String(mediaStart), "-t", String(sourceDuration), "-i", srcPath] : ["-i", srcPath];
|
|
14623
|
+
args.push("-vn", "-acodec", "pcm_s16le", "-ar", "48000", ...outputArgs);
|
|
14660
14624
|
if (normalizedPlaybackRate !== 1) args.push("-t", String(duration));
|
|
14661
14625
|
args.push("-y", outputPath);
|
|
14662
14626
|
const result = await runFfmpeg(args, { signal, timeout: ffmpegProcessTimeout });
|
|
@@ -14666,7 +14630,7 @@ async function prepareAudioTrack(srcPath, outputPath, mediaStart, duration, play
|
|
|
14666
14630
|
reason: "cancelled",
|
|
14667
14631
|
owner: "user",
|
|
14668
14632
|
retryable: false,
|
|
14669
|
-
detail:
|
|
14633
|
+
detail: `Audio ${stage} cancelled`
|
|
14670
14634
|
};
|
|
14671
14635
|
return {
|
|
14672
14636
|
success: false,
|
|
@@ -14676,7 +14640,7 @@ async function prepareAudioTrack(srcPath, outputPath, mediaStart, duration, play
|
|
|
14676
14640
|
failure: failure2
|
|
14677
14641
|
};
|
|
14678
14642
|
}
|
|
14679
|
-
const failure = !result.success ? ffmpegFailure(
|
|
14643
|
+
const failure = !result.success ? ffmpegFailure(stage, result) : void 0;
|
|
14680
14644
|
return {
|
|
14681
14645
|
success: result.success,
|
|
14682
14646
|
outputPath,
|
|
@@ -15018,14 +14982,13 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
|
|
|
15018
14982
|
let audioSrcPath = srcPath;
|
|
15019
14983
|
if (element.type === "video") {
|
|
15020
14984
|
const extractedPath = join13(workDir, `${element.id}-extracted.wav`);
|
|
15021
|
-
const extractResult = await
|
|
14985
|
+
const extractResult = await extractAudioSegment(
|
|
15022
14986
|
srcPath,
|
|
15023
14987
|
extractedPath,
|
|
15024
|
-
|
|
15025
|
-
|
|
15026
|
-
|
|
15027
|
-
|
|
15028
|
-
},
|
|
14988
|
+
"extract",
|
|
14989
|
+
element.mediaStart,
|
|
14990
|
+
element.end - element.start,
|
|
14991
|
+
element.playbackRate,
|
|
15029
14992
|
effectiveSignal,
|
|
15030
14993
|
config
|
|
15031
14994
|
);
|
|
@@ -15045,9 +15008,10 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
|
|
|
15045
15008
|
audioSrcPath = extractedPath;
|
|
15046
15009
|
} else {
|
|
15047
15010
|
const trimmedPath = join13(workDir, `${element.id}-trimmed.wav`);
|
|
15048
|
-
const prepResult = await
|
|
15011
|
+
const prepResult = await extractAudioSegment(
|
|
15049
15012
|
srcPath,
|
|
15050
15013
|
trimmedPath,
|
|
15014
|
+
"prepare",
|
|
15051
15015
|
element.mediaStart,
|
|
15052
15016
|
element.end - element.start,
|
|
15053
15017
|
element.playbackRate,
|
|
@@ -16627,6 +16591,7 @@ export {
|
|
|
16627
16591
|
resolveVideoExtractionWindow,
|
|
16628
16592
|
resolveVideoExtractionDuration,
|
|
16629
16593
|
extractAllVideoFrames,
|
|
16594
|
+
isVideoHiddenBeforeStreamStart,
|
|
16630
16595
|
getFrameAtTime,
|
|
16631
16596
|
analyzeClipMediaFit,
|
|
16632
16597
|
FrameLookupTable,
|
|
@@ -7,38 +7,41 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
RegistryCompatibilityError,
|
|
9
9
|
gateRegistryItemsCompatibility
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LTJDUBSQ.js";
|
|
11
11
|
import {
|
|
12
12
|
DEFAULT_PROJECT_CONFIG,
|
|
13
13
|
createProjectConfig,
|
|
14
14
|
loadProjectConfig,
|
|
15
15
|
projectConfigPath,
|
|
16
16
|
recordProjectRegistryItems
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SP6XL3NP.js";
|
|
18
18
|
import {
|
|
19
19
|
resolveItemWithDependencies,
|
|
20
20
|
resolveItemsByTag
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-PR7QQBSC.js";
|
|
22
22
|
import {
|
|
23
23
|
InvalidVariableValuesError,
|
|
24
24
|
prepareItem,
|
|
25
25
|
publishItem
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-Q2Y5OZCY.js";
|
|
27
27
|
import {
|
|
28
28
|
DEFAULT_REGISTRY_URL
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-K35E45SI.js";
|
|
30
30
|
import {
|
|
31
31
|
trackRegistryItemAdded
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-Y475GD4L.js";
|
|
33
33
|
import {
|
|
34
34
|
defineCommand
|
|
35
35
|
} from "./chunk-S3S4TGEH.js";
|
|
36
36
|
import {
|
|
37
37
|
failCommand
|
|
38
38
|
} from "./chunk-PBN6GBJE.js";
|
|
39
|
+
import {
|
|
40
|
+
c
|
|
41
|
+
} from "./chunk-ZTZA4UWZ.js";
|
|
39
42
|
import {
|
|
40
43
|
ITEM_TYPE_DIRS
|
|
41
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-AHBYQRGI.js";
|
|
42
45
|
import {
|
|
43
46
|
isProjectRootMissing,
|
|
44
47
|
realpath
|
|
@@ -46,9 +49,6 @@ import {
|
|
|
46
49
|
import {
|
|
47
50
|
parseHTML
|
|
48
51
|
} from "./chunk-SDYDNHEE.js";
|
|
49
|
-
import {
|
|
50
|
-
c
|
|
51
|
-
} from "./chunk-ZTZA4UWZ.js";
|
|
52
52
|
|
|
53
53
|
// src/commands/add.ts
|
|
54
54
|
import { existsSync, readFileSync } from "fs";
|
|
@@ -7,7 +7,6 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
parseHTML
|
|
9
9
|
} from "./chunk-SDYDNHEE.js";
|
|
10
|
-
import "./chunk-M2WBOQ2Q.js";
|
|
11
10
|
|
|
12
11
|
// src/whisper/normalize.ts
|
|
13
12
|
import { readFileSync, readdirSync, writeFileSync } from "fs";
|
|
@@ -330,11 +329,12 @@ function patchCaptionHtml(dir, words) {
|
|
|
330
329
|
}
|
|
331
330
|
}
|
|
332
331
|
}
|
|
332
|
+
|
|
333
333
|
export {
|
|
334
334
|
detectFormat,
|
|
335
|
+
wordsToCues,
|
|
335
336
|
formatSrt,
|
|
336
337
|
formatVtt,
|
|
337
338
|
loadTranscript,
|
|
338
|
-
patchCaptionHtml
|
|
339
|
-
wordsToCues
|
|
339
|
+
patchCaptionHtml
|
|
340
340
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { createRequire as __hf_createRequire } from "node:module";
|
|
2
|
+
import { fileURLToPath as __hf_fileURLToPath } from "node:url";
|
|
3
|
+
import { dirname as __hf_dirname } from "node:path";
|
|
4
|
+
var require = __hf_createRequire(import.meta.url);
|
|
5
|
+
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = __hf_dirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
sherpaParakeetInstalled,
|
|
9
|
+
sherpaUnsupportedReason
|
|
10
|
+
} from "./chunk-CT6ZQRLD.js";
|
|
11
|
+
import {
|
|
12
|
+
findParakeet
|
|
13
|
+
} from "./chunk-JZIEZCQM.js";
|
|
14
|
+
|
|
15
|
+
// src/whisper/parakeetRunner.ts
|
|
16
|
+
function parakeetRunner({
|
|
17
|
+
unsupported = sherpaUnsupportedReason(),
|
|
18
|
+
skipSherpa = false
|
|
19
|
+
} = {}) {
|
|
20
|
+
if (!skipSherpa && !unsupported && sherpaParakeetInstalled()) return "sherpa";
|
|
21
|
+
return findParakeet() ? "parakeet-mlx" : null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
parakeetRunner
|
|
26
|
+
};
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
EncoderInterruptedError,
|
|
17
17
|
encoderFailureError,
|
|
18
18
|
prepareAnimatedGifInputs
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-K4RIT6PX.js";
|
|
20
20
|
import {
|
|
21
21
|
createStudioPositionSeekReapplyScript
|
|
22
22
|
} from "./chunk-EOOEC32M.js";
|
|
@@ -105,6 +105,7 @@ import {
|
|
|
105
105
|
isNotMediaPayload,
|
|
106
106
|
isTransientBrowserError,
|
|
107
107
|
isVideoFrameFormat,
|
|
108
|
+
isVideoHiddenBeforeStreamStart,
|
|
108
109
|
isVideoPastTimelineEnd,
|
|
109
110
|
mergeWorkerFrames,
|
|
110
111
|
muxVideoWithAudio,
|
|
@@ -145,7 +146,7 @@ import {
|
|
|
145
146
|
validateEngineConfigSnapshot,
|
|
146
147
|
verifyDiskDrawElementSamples,
|
|
147
148
|
writeCapturedFrame
|
|
148
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-VC7JBNPS.js";
|
|
149
150
|
import {
|
|
150
151
|
assignBundledRuntimeCompositionIds,
|
|
151
152
|
buildVariablesByCompScript,
|
|
@@ -158,7 +159,7 @@ import {
|
|
|
158
159
|
isTemplateEntry,
|
|
159
160
|
parsesAsScript,
|
|
160
161
|
prepareFlattenedInnerRoot
|
|
161
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-62RUQJ5J.js";
|
|
162
163
|
import {
|
|
163
164
|
LOW_MEMORY_TOTAL_MB_THRESHOLD,
|
|
164
165
|
getCgroupMemoryLimitMb,
|
|
@@ -179,7 +180,7 @@ import {
|
|
|
179
180
|
resolveAbsoluteMediaStartSeconds,
|
|
180
181
|
resolveAuthoredTimingWindow,
|
|
181
182
|
toFps
|
|
182
|
-
} from "./chunk-
|
|
183
|
+
} from "./chunk-AHBYQRGI.js";
|
|
183
184
|
import {
|
|
184
185
|
COMPOSITION_SOURCE_URL,
|
|
185
186
|
HF_COLOR_GRADING_ATTR,
|
|
@@ -206,7 +207,7 @@ import {
|
|
|
206
207
|
shouldClampResolvedMediaDuration,
|
|
207
208
|
sourceTimeAt,
|
|
208
209
|
styleElementsFor
|
|
209
|
-
} from "./chunk-
|
|
210
|
+
} from "./chunk-3WD4JNMU.js";
|
|
210
211
|
import {
|
|
211
212
|
MAX_AUDIO_GAIN
|
|
212
213
|
} from "./chunk-YA62XGXS.js";
|
|
@@ -2216,6 +2217,8 @@ function blitHdrVideoLayer(canvas, el, time, fps, hdrVideoFrameSources, hdrStart
|
|
|
2216
2217
|
frameSource.loop
|
|
2217
2218
|
);
|
|
2218
2219
|
if (effectiveIndex === null) return;
|
|
2220
|
+
const mediaTime = (frameSource.mediaStart ?? 0) + effectiveIndex / fps;
|
|
2221
|
+
if (isVideoHiddenBeforeStreamStart(frameSource.videoStreamLeadSeconds, mediaTime)) return;
|
|
2219
2222
|
const frameOffset = effectiveIndex * frameSource.frameSize;
|
|
2220
2223
|
try {
|
|
2221
2224
|
if (hdrPerf) hdrPerf.hdrVideoLayerBlits += 1;
|
|
@@ -2824,7 +2827,10 @@ async function extractHdrVideoFrames(args) {
|
|
|
2824
2827
|
initialWindow,
|
|
2825
2828
|
abortSignal
|
|
2826
2829
|
);
|
|
2827
|
-
extractionWindows.set(videoId,
|
|
2830
|
+
extractionWindows.set(videoId, {
|
|
2831
|
+
window: window2,
|
|
2832
|
+
videoStreamLeadSeconds: metadata.videoStreamLeadSeconds
|
|
2833
|
+
});
|
|
2828
2834
|
prep.hdrVideoStartTimes.set(videoId, window2.compositionStart);
|
|
2829
2835
|
plannedVideos.push({
|
|
2830
2836
|
durationSeconds: window2.durationSeconds,
|
|
@@ -2843,14 +2849,16 @@ async function extractHdrVideoFrames(args) {
|
|
|
2843
2849
|
try {
|
|
2844
2850
|
for (const [videoId, srcPath] of prep.hdrVideoSrcPaths) {
|
|
2845
2851
|
const video = composition.videos.find((v) => v.id === videoId);
|
|
2846
|
-
const
|
|
2847
|
-
if (!video || !
|
|
2852
|
+
const planned = extractionWindows.get(videoId);
|
|
2853
|
+
if (!video || !planned) continue;
|
|
2854
|
+
const { window: window2 } = planned;
|
|
2848
2855
|
mkdirSync2(framesDir, { recursive: true });
|
|
2849
2856
|
const frameDir = mkdtempSync2(join7(framesDir, `hdr_${tempDirSafePrefix(videoId)}-`));
|
|
2850
2857
|
createdFrameDirs.add(frameDir);
|
|
2851
2858
|
const dims = prep.hdrExtractionDims.get(videoId) ?? { width, height };
|
|
2852
2859
|
const rawPath = join7(frameDir, "frames.rgb48le");
|
|
2853
|
-
const
|
|
2860
|
+
const extractionMediaStart = window2.extractionMediaStart ?? window2.mediaStart;
|
|
2861
|
+
const extractionStart = String(extractionMediaStart);
|
|
2854
2862
|
const ffmpegArgs = [];
|
|
2855
2863
|
if (window2.finalFrameOnly) {
|
|
2856
2864
|
ffmpegArgs.push("-i", srcPath, "-ss", extractionStart, "-frames:v", "1");
|
|
@@ -2910,7 +2918,9 @@ async function extractHdrVideoFrames(args) {
|
|
|
2910
2918
|
frameSize,
|
|
2911
2919
|
frameCount,
|
|
2912
2920
|
scratch: Buffer.allocUnsafe(frameSize),
|
|
2913
|
-
loop: video.loop
|
|
2921
|
+
loop: video.loop,
|
|
2922
|
+
mediaStart: extractionMediaStart,
|
|
2923
|
+
videoStreamLeadSeconds: planned.videoStreamLeadSeconds
|
|
2914
2924
|
});
|
|
2915
2925
|
handedOff = true;
|
|
2916
2926
|
} finally {
|
|
@@ -14310,7 +14320,7 @@ function startServer(options = {}) {
|
|
|
14310
14320
|
});
|
|
14311
14321
|
async function shutdown(signal) {
|
|
14312
14322
|
log.info(`Received ${signal}, shutting down`);
|
|
14313
|
-
const { drainBrowserPool } = await import("./src-
|
|
14323
|
+
const { drainBrowserPool } = await import("./src-VMTHSARJ.js");
|
|
14314
14324
|
await drainBrowserPool().catch(() => {
|
|
14315
14325
|
});
|
|
14316
14326
|
const handle = await Promise.race([
|
|
@@ -14804,6 +14814,7 @@ function readVideoMetadata(value, field) {
|
|
|
14804
14814
|
// overwhelmingly common start-at-zero domain. Preserve that compatibility
|
|
14805
14815
|
// while carrying non-zero edit-list/transport timestamps in new plans.
|
|
14806
14816
|
videoStreamStartSeconds: record.videoStreamStartSeconds === void 0 ? 0 : readFiniteNumber(record.videoStreamStartSeconds, `${field}.videoStreamStartSeconds`),
|
|
14817
|
+
videoStreamLeadSeconds: record.videoStreamLeadSeconds === void 0 ? 0 : readFiniteNumber(record.videoStreamLeadSeconds, `${field}.videoStreamLeadSeconds`),
|
|
14807
14818
|
width: readPositiveInteger(record.width, `${field}.width`),
|
|
14808
14819
|
height: readPositiveInteger(record.height, `${field}.height`),
|
|
14809
14820
|
fps: readFiniteNumber(record.fps, `${field}.fps`),
|
|
@@ -15495,7 +15506,7 @@ async function buildLocalExecutionPlan(projectDir, config, executionPlanDir, opt
|
|
|
15495
15506
|
if (probeResult.fileServer) closeFileServerSafely(probeResult.fileServer, "plan", log);
|
|
15496
15507
|
if (probeResult.probeSession) {
|
|
15497
15508
|
try {
|
|
15498
|
-
const { closeCaptureSession: closeCaptureSession2 } = await import("./src-
|
|
15509
|
+
const { closeCaptureSession: closeCaptureSession2 } = await import("./src-VMTHSARJ.js");
|
|
15499
15510
|
await closeCaptureSession2(probeResult.probeSession);
|
|
15500
15511
|
} catch (err) {
|
|
15501
15512
|
log.warn("[plan] probe session close failed", {
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
typeDirPath,
|
|
21
21
|
updateRecord,
|
|
22
22
|
withFigmaErrors
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-RMIFSBRV.js";
|
|
24
24
|
import {
|
|
25
25
|
defineCommand
|
|
26
26
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -229,7 +229,7 @@ var asset_default = defineCommand({
|
|
|
229
229
|
rendered > 0 ? `(${results.length} nodes, ${rendered} rendered in 1 figma request)` : `(${results.length} nodes, all reused from cache \u2014 no figma request)`
|
|
230
230
|
);
|
|
231
231
|
}
|
|
232
|
-
const { trackFigmaImport } = await import("./telemetry-
|
|
232
|
+
const { trackFigmaImport } = await import("./telemetry-565KDZUW.js");
|
|
233
233
|
trackFigmaImport({
|
|
234
234
|
phase: "asset",
|
|
235
235
|
reused: results.every((r) => r.reused),
|
|
@@ -13,16 +13,16 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
failCommand
|
|
15
15
|
} from "./chunk-PBN6GBJE.js";
|
|
16
|
+
import {
|
|
17
|
+
c
|
|
18
|
+
} from "./chunk-ZTZA4UWZ.js";
|
|
16
19
|
import {
|
|
17
20
|
formatVariableValidationIssue,
|
|
18
21
|
validateVariables
|
|
19
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-AHBYQRGI.js";
|
|
20
23
|
import {
|
|
21
24
|
extractCompositionMetadata
|
|
22
25
|
} from "./chunk-LFNQDTSH.js";
|
|
23
|
-
import {
|
|
24
|
-
c
|
|
25
|
-
} from "./chunk-ZTZA4UWZ.js";
|
|
26
26
|
|
|
27
27
|
// src/utils/variables.ts
|
|
28
28
|
import { readFileSync } from "fs";
|