hyperframes 0.8.225 → 0.8.227
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-ZGNY2AXJ.js → add-XX23UL2L.js} +12 -12
- package/dist/{agentPromptGenerator-GG4FFZH7.js → agentPromptGenerator-IMNWTMHM.js} +7 -7
- package/dist/{animatedGifPrep-NVDUG2CD.js → animatedGifPrep-MPU6T26Y.js} +7 -7
- package/dist/api.d.ts +122 -1
- package/dist/api.js +31 -23
- package/dist/{asset-UC3OQBB3.js → asset-FZSKOSMO.js} +2 -2
- package/dist/{assetCataloger-WQTNJMZU.js → assetCataloger-SITUNOV5.js} +8 -8
- package/dist/{audio-T6RWZHAA.js → audio-T5RHG57J.js} +17 -17
- package/dist/{auth-FSXEGF3B.js → auth-CMGIWJ6S.js} +5 -5
- package/dist/{autoUpdate-LOBHDWAA.js → autoUpdate-NNHBVLHN.js} +2 -2
- package/dist/{backgroundChecks-RBFWIWBP.js → backgroundChecks-HQYOBCV2.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-LDZ6NO2X.js → batchRender-5URYGOLM.js} +3 -3
- package/dist/{beats-WFPPVM6N.js → beats-J7IBNLP4.js} +10 -10
- package/dist/{benchmark-7MYD5S26.js → benchmark-Q2BILDRB.js} +9 -9
- package/dist/{billing-2BJTLFDX.js → billing-WNOAP6KO.js} +4 -4
- package/dist/{browser-6C4IDYQE.js → browser-EERGHDRV.js} +4 -4
- package/dist/{bundleWithLocalizedFonts-ARTT664T.js → bundleWithLocalizedFonts-FKU44QSO.js} +2 -2
- package/dist/{capture-7TFC65RN.js → capture-5W7BR36Q.js} +3 -3
- package/dist/{capture-TWZ5DQHP.js → capture-IRJ7DO45.js} +17 -17
- package/dist/{captureCompositionFrame-EMP6R3F6.js → captureCompositionFrame-R4LFCHHV.js} +14 -13
- package/dist/{catalog-W4RJO4FE.js → catalog-IRFBKRFP.js} +12 -12
- package/dist/{catch-up-OOCJH3O6.js → catch-up-RGQAFA3E.js} +5 -5
- package/dist/{check-BPPHG2CF.js → check-EXLZVGDY.js} +40 -39
- package/dist/{checkAudio-QEGCKX2V.js → checkAudio-K3XKXNEN.js} +10 -10
- package/dist/{checkBrowser-4JDYYAVA.js → checkBrowser-ZOU5XFMN.js} +34 -33
- package/dist/chunk-262C25DQ.js +31 -0
- package/dist/{chunk-3XQQLL3G.js → chunk-27JEDDX5.js} +1 -1
- package/dist/{chunk-AKMY4QVI.js → chunk-2GTFW4MK.js} +9 -1
- package/dist/{chunk-EECV7SDN.js → chunk-2M6LMJ32.js} +1 -1
- package/dist/{chunk-G45NYKSM.js → chunk-3TWAMQF6.js} +3 -3
- package/dist/{chunk-BEMGUGGJ.js → chunk-3ZWUNOTS.js} +1 -1
- package/dist/{chunk-Z7GIHPAZ.js → chunk-53ZOVLGJ.js} +2 -2
- package/dist/{chunk-G6Z47UQP.js → chunk-5ETFQB5F.js} +49 -31
- package/dist/{chunk-ZGQC6IU7.js → chunk-62LATJB6.js} +1 -1
- package/dist/{chunk-KDF67KEB.js → chunk-65LMGFJ5.js} +13 -13
- package/dist/{chunk-SVGHIMPQ.js → chunk-6HPCEV3U.js} +2 -2
- package/dist/{chunk-VLA6UJGH.js → chunk-6NJVSTSY.js} +5 -6
- package/dist/{chunk-VHL26GNQ.js → chunk-6PQXDPKV.js} +2 -2
- package/dist/{chunk-T5KG6H6L.js → chunk-6RSOEYIG.js} +7 -7
- package/dist/{chunk-5HGS5MGD.js → chunk-6TXW6LHH.js} +339 -136
- package/dist/{chunk-IJWDVOIO.js → chunk-7XNMKKXI.js} +2 -2
- package/dist/{chunk-SIYDHVN2.js → chunk-A3UIADPB.js} +1 -1
- package/dist/{chunk-X5BSSPC2.js → chunk-AI6Z7BVD.js} +1 -1
- package/dist/{chunk-BKHBSFEO.js → chunk-AJREH4PX.js} +3 -2
- package/dist/{chunk-GI42ZB52.js → chunk-AQ2C6AQH.js} +1 -1
- package/dist/{chunk-UZ5AWZCA.js → chunk-AXRFHQRS.js} +1 -1
- package/dist/{chunk-WQCVZEXH.js → chunk-BKK57WEL.js} +6 -6
- package/dist/{chunk-5I6XEO4W.js → chunk-BW3CQT3A.js} +3 -25
- package/dist/{chunk-W464PHF3.js → chunk-CQKK7S4I.js} +7 -7
- package/dist/{chunk-2YZD6CAF.js → chunk-E2GNVQSH.js} +10 -3
- package/dist/{chunk-652ERUZD.js → chunk-FD7Z5BDR.js} +2 -2
- package/dist/{chunk-UQWOOANM.js → chunk-FFCQR7AP.js} +2 -2
- package/dist/{chunk-AMQFGICP.js → chunk-GIGZYW5Q.js} +1 -1
- package/dist/{chunk-HT3D5AKG.js → chunk-GR2T3BOX.js} +6 -5
- package/dist/{chunk-LWTT7I7X.js → chunk-HGEFDPRP.js} +1 -1
- package/dist/{chunk-HW6HTTBZ.js → chunk-HNB7DA2F.js} +1 -1
- package/dist/{chunk-R6JPOEDZ.js → chunk-IN2355UQ.js} +1 -1
- package/dist/{chunk-EIIMWDZW.js → chunk-IQFLDX7I.js} +4 -4
- package/dist/{chunk-GE4ABM5K.js → chunk-ISEHEDSN.js} +41 -12
- package/dist/{chunk-RDLJSUI4.js → chunk-IUQCPWHU.js} +17 -11
- package/dist/{chunk-FJ3KUOUZ.js → chunk-IZRC24DI.js} +1 -1
- package/dist/{chunk-LZB5AHFD.js → chunk-JP6C673M.js} +1 -1
- package/dist/{chunk-OZMZFJDW.js → chunk-K6YHKCVX.js} +1 -1
- package/dist/{chunk-CGX4EOGT.js → chunk-K7LS42XC.js} +3 -3
- package/dist/{chunk-7RTPHNOO.js → chunk-KLTD64CP.js} +7 -4
- package/dist/{chunk-E47ZWDMH.js → chunk-KU6VRNJF.js} +1 -1
- package/dist/{chunk-KVBOJJ5R.js → chunk-L2XYH5SQ.js} +1 -1
- package/dist/{chunk-XM5KYLIE.js → chunk-M63U54H7.js} +4 -4
- package/dist/{chunk-4K6AS5TX.js → chunk-MBS45ZKL.js} +313 -149
- package/dist/{chunk-5KADQQ6S.js → chunk-MR7I3L6N.js} +1 -1
- package/dist/{chunk-FPWCICAI.js → chunk-NFUJ35XX.js} +1 -1
- package/dist/{chunk-35NDLXHZ.js → chunk-NQ4MVBNC.js} +10 -10
- package/dist/{chunk-PICDT6ZW.js → chunk-OG3S6SE6.js} +1 -1
- package/dist/{chunk-GZPGTGRV.js → chunk-OJW6TC57.js} +1 -1
- package/dist/{chunk-Z57RQBIA.js → chunk-OVLO32XC.js} +3 -3
- package/dist/{chunk-HMS6UHUW.js → chunk-OWJTWCE6.js} +2 -2
- package/dist/{chunk-M3WOI7BU.js → chunk-PFGBFTNS.js} +1 -1
- package/dist/{chunk-ACUVSKUI.js → chunk-PSRFHITV.js} +13 -13
- package/dist/{chunk-2EH3WQCS.js → chunk-PVLG6IY4.js} +5 -5
- package/dist/chunk-PXH3TD4X.js +760 -0
- package/dist/{chunk-Y5OSQXGZ.js → chunk-Q7S4JN73.js} +5 -5
- package/dist/{chunk-K73PYNON.js → chunk-QSWUM7WR.js} +2 -5
- package/dist/{chunk-EQFDOQTG.js → chunk-RABQDJMA.js} +1 -1
- package/dist/{chunk-ADOBHVHW.js → chunk-RG7WG2BC.js} +2 -2
- package/dist/{chunk-4Z2SU2VC.js → chunk-RVKHNBJI.js} +18 -18
- package/dist/{chunk-BTDKWWND.js → chunk-SANQC4QD.js} +1 -1
- package/dist/chunk-SBQV5FLG.js +5030 -0
- package/dist/{chunk-4VTXUGDR.js → chunk-SPN4SJV7.js} +1 -1
- package/dist/chunk-SQJNSPL5.js +177 -0
- package/dist/{chunk-4A643C3B.js → chunk-SZVMN7L3.js} +7 -7
- package/dist/{chunk-IB7I5IEC.js → chunk-T53C5UTH.js} +1 -1
- package/dist/{chunk-KEDN4LSV.js → chunk-TFJSU4IV.js} +2 -2
- package/dist/{chunk-UBH2R663.js → chunk-TG5RBLCM.js} +2 -2
- package/dist/{chunk-CXVFPIOM.js → chunk-TJ6G325N.js} +1 -1
- package/dist/{chunk-UBXKKXXR.js → chunk-TJPZYMYX.js} +3 -3
- package/dist/{chunk-M4NN4AHH.js → chunk-TMTZ5M4R.js} +9 -9
- package/dist/{chunk-RR5QE7DB.js → chunk-TNPFF5TQ.js} +18 -14
- package/dist/{chunk-AF3EN5XS.js → chunk-UIDZKSF6.js} +1 -1
- package/dist/{chunk-QOYZ3U6G.js → chunk-V4SD6HQ6.js} +2 -3
- package/dist/{chunk-EEBIHQF2.js → chunk-V7BBBD5C.js} +2 -2
- package/dist/{chunk-SXHSNLEC.js → chunk-VHREBR3T.js} +1 -1
- package/dist/chunk-VO55NLTM.js +111 -0
- package/dist/{chunk-IORJ42GY.js → chunk-VUDMPRZN.js} +5 -6
- package/dist/{chunk-3HRQI6LJ.js → chunk-WISN2ACZ.js} +1 -1
- package/dist/{chunk-7HSV5SJ4.js → chunk-XOFJZ3UG.js} +1 -1
- package/dist/{chunk-UCPEABYK.js → chunk-XZULISH5.js} +2 -2
- package/dist/{chunk-3E2BO3L3.js → chunk-YKOHWGUC.js} +1 -1
- package/dist/{chunk-A25SCSOK.js → chunk-YTMWGLEQ.js} +1 -1
- package/dist/{chunk-6IV2N527.js → chunk-ZAE5Q7D5.js} +2 -2
- package/dist/{chunk-O3MGHHJO.js → chunk-ZSZKNGSQ.js} +3 -3
- package/dist/{chunk-NLELDFX7.js → chunk-ZU5GYVRG.js} +3 -3
- package/dist/{clean-XWDDXLRP.js → clean-IXG2MEQ6.js} +18 -18
- package/dist/cli.js +57 -57
- package/dist/{cloud-SETWVGKH.js → cloud-C2SUZ4ML.js} +4 -4
- package/dist/{cloudrun-RHPVVXCR.js → cloudrun-SWS7AI67.js} +4 -4
- package/dist/{compare-FWMFV7A7.js → compare-HKONJNY4.js} +31 -30
- package/dist/{compiler-SKRY6FPA.js → compiler-67X7VCNS.js} +4 -4
- package/dist/{component-HGEIXY3U.js → component-YBGAFPNS.js} +3 -3
- package/dist/{compositions-2TXJLBWE.js → compositions-B5T65NKW.js} +12 -12
- package/dist/{curve-SSFKIA2L.js → curve-QZCRRLBS.js} +11 -11
- package/dist/{cuts-BWXHTOOP.js → cuts-5DIKHPDZ.js} +20 -15
- package/dist/{delete-F5RDWZEJ.js → delete-GHNNYUXL.js} +6 -6
- package/dist/{deploy-OH4SMYTG.js → deploy-IARSTZY6.js} +1 -1
- package/dist/{describeProject-B7H4T5PW.js → describeProject-6DA3FMM2.js} +8 -8
- package/dist/{diff-6JFFTFKR.js → diff-JWNEN6CO.js} +89 -229
- package/dist/{dist-YEYUGCOR.js → dist-AY2X5DPM.js} +2 -2
- package/dist/{dist-24QQO5IL.js → dist-DCP77RWC.js} +2 -2
- package/dist/{doctor-XQCZB5BY.js → doctor-BMUGN4C2.js} +11 -11
- package/dist/{energy-MEMYSTFT.js → energy-DSK2FPBK.js} +12 -12
- package/dist/{events-T7OLH6MW.js → events-6VLVSDSN.js} +4 -4
- package/dist/{events-U6PXJI34.js → events-HD5CYSPO.js} +3 -3
- package/dist/{events-ZU2ATKWK.js → events-KKH2U7U5.js} +14 -14
- package/dist/{extract-25TUTGCA.js → extract-IFMYI2DA.js} +15 -19
- package/dist/{face-KMLYOE5H.js → face-JD2ZVOH3.js} +12 -12
- package/dist/{feedback-FE7GQTBH.js → feedback-LI55MDGG.js} +14 -14
- package/dist/{ffmpeg-CXYPYIZK.js → ffmpeg-A4M2I6R3.js} +7 -7
- package/dist/{figma-QMKU7M7T.js → figma-CNVJZ7BL.js} +3 -3
- package/dist/fontLocalizeCli.js +10 -10
- package/dist/{frames-2NPBO6LB.js → frames-MOAPFEBS.js} +13 -13
- package/dist/{generate-I6E3V7PU.js → generate-ZRQYOJ3I.js} +18 -18
- package/dist/{get-JJWBP5NB.js → get-2RNNB5KC.js} +6 -6
- package/dist/{gpuPolicy-2OMDU74V.js → gpuPolicy-MXPGQGRO.js} +7 -7
- package/dist/{grade-compare-QCA3VIKQ.js → grade-compare-CQHZR7LX.js} +32 -31
- package/dist/{heifImagePrep-P53GG4GF.js → heifImagePrep-PRXKTL2U.js} +8 -8
- package/dist/{help-COSONWFD.js → help-MDT2MEPS.js} +1 -1
- package/dist/{history-CWKF5AXI.js → history-N7H2FN6R.js} +8 -8
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +67 -67
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/{info-SD74Y6V5.js → info-NXYRDRHE.js} +8 -8
- package/dist/{init-XAYQNTVF.js → init-DJ5EJAQI.js} +28 -28
- package/dist/ink-WZSITVIW.js +148 -0
- package/dist/{inspect-Y5IIQBIW.js → inspect-JAXBBYA3.js} +32 -31
- package/dist/{installer-NQA4KXRP.js → installer-N5OHXI5C.js} +4 -4
- package/dist/{keyframes-MNPCJZYU.js → keyframes-TXNYBMOV.js} +8 -8
- package/dist/{lambda-PMI6IDVN.js → lambda-4LVII6VK.js} +11 -11
- package/dist/{layout-6IM6R6LX.js → layout-AS4FJ53O.js} +32 -31
- package/dist/{lint-6VUHVHFF.js → lint-DCAYD4CN.js} +9 -9
- package/dist/{lintProject-6H64SX3V.js → lintProject-54CNQ4HT.js} +2 -2
- package/dist/{list-XXTAS744.js → list-7Z6YRO6I.js} +6 -6
- package/dist/{localPage-2UHUS6LM.js → localPage-FUOBAMSA.js} +7 -7
- package/dist/{login-KM3LPYQ7.js → login-JZ4COLEB.js} +7 -7
- package/dist/{logout-LHTQV2BZ.js → logout-6CEIH4HW.js} +3 -3
- package/dist/{look-3CD3ZSXY.js → look-QELVFTKU.js} +12 -12
- package/dist/{manager-C6GVT3EI.js → manager-ZJPSMHK6.js} +8 -8
- package/dist/{measure-DWZX4YAK.js → measure-2I5VAVHN.js} +12 -11
- package/dist/{media-treatment-IIUPGQIX.js → media-treatment-MDTQ6564.js} +14 -14
- package/dist/{media-use-HLHUEFDK.js → media-use-NFGRWEGA.js} +3 -3
- package/dist/{models-IWHY5V6N.js → models-DKSUFPQ6.js} +11 -11
- package/dist/{motionShot-4NKHFUS7.js → motionShot-BJARRLMN.js} +17 -16
- package/dist/{normalize-audio-M2RS5Q23.js → normalize-audio-EW5JUESE.js} +10 -10
- package/dist/{open-U7CCHUBO.js → open-737GUSFD.js} +13 -13
- package/dist/{parakeetRunner-ZHG3S6GY.js → parakeetRunner-OIVHACYW.js} +12 -12
- package/dist/{pipeline-66JR7EC7.js → pipeline-UTNPWFMF.js} +10 -10
- package/dist/{play-5COR53D2.js → play-ZCYUVL2Y.js} +22 -22
- package/dist/{preflight-OKAO5NPW.js → preflight-HWFWGTIG.js} +8 -8
- package/dist/{present-YKFQC22R.js → present-AO3XZKSL.js} +18 -18
- package/dist/{preview-3YNKJZME.js → preview-ORIRMNIU.js} +20 -20
- package/dist/{probe-QMPDGKU5.js → probe-HYO2KC2E.js} +11 -11
- package/dist/{producer-WBVDP3IV.js → producer-B4VCP4D2.js} +1 -1
- package/dist/{projectConfig-UI4NZDN7.js → projectConfig-HUR4LZME.js} +6 -6
- package/dist/{publication-VPJZQCLA.js → publication-YH74GUD4.js} +2 -2
- package/dist/{publish-7RA2MK2M.js → publish-WIEB5ON4.js} +25 -25
- package/dist/{refresh-AM2ULRRV.js → refresh-MQTO43RB.js} +3 -3
- package/dist/{remove-background-ELC7V7KT.js → remove-background-NHLEPVOM.js} +11 -11
- package/dist/{render-WH7MPRZD.js → render-3WFVN7HO.js} +45 -43
- package/dist/{render-R7E7TTNE.js → render-DQSNIKEG.js} +59 -759
- package/dist/{render-IYV73CG6.js → render-GBJSUM3R.js} +5 -5
- package/dist/{render-batch-IN2ZXPS7.js → render-batch-YZF2XMYL.js} +8 -8
- package/dist/renderSetupWorker.js +2 -2
- package/dist/{resolver-DIXFK5ZR.js → resolver-KGTY7RJU.js} +4 -4
- package/dist/{run-MCVU7AZX.js → run-OJ2GBYKB.js} +4 -4
- package/dist/{sherpa-FP6HX5KK.js → sherpa-B3T3I2PX.js} +11 -11
- package/dist/skills/media-use/audio/scripts/lib/heygen.mjs +3 -9
- package/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +6 -4
- package/dist/skills/media-use/references/heygen.md +2 -1
- package/dist/skills/media-use/scripts/lib/logo-provider.mjs +8 -3
- package/dist/skills/media-use/scripts/lib/logo-provider.test.mjs +14 -0
- package/dist/skills/media-use/scripts/resolve.mjs +11 -5
- package/dist/{skills-JLNDM2KP.js → skills-FATGE2YZ.js} +6 -6
- package/dist/{skillsUpdateCheck-WS5M25TN.js → skillsUpdateCheck-AHDI2POI.js} +3 -3
- package/dist/{snapshot-VPN6GA7U.js → snapshot-SELBWDZ7.js} +68 -43
- package/dist/{src-RGQFYVHO.js → src-55VXHZM5.js} +9 -9
- package/dist/{src-AP7B27MZ.js → src-6H4ENHBH.js} +10 -6
- package/dist/{staticProjectServer-YA6XOSFY.js → staticProjectServer-E4BZ4YZO.js} +18 -18
- package/dist/{status-Y5ZBFJ53.js → status-6WAZ5EBM.js} +5 -5
- package/dist/studio/assets/{hyperframes-player-Do2ZF6Lp.js → hyperframes-player-merzSkao.js} +3 -3
- package/dist/studio/assets/{index-CK4_IJ8G.js → index-B4XEg_n-.js} +1 -1
- package/dist/studio/assets/{index-Dxb7fTWf.js → index-DoXOJGW5.js} +174 -174
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-57E36S5N.js → studio-api-IERYGFXT.js} +10 -10
- package/dist/{studioServer-EVMF3HHL.js → studioServer-3RCCQB3T.js} +51 -50
- package/dist/{sync-ASUBSVGQ.js → sync-VV7L5GRE.js} +12 -12
- package/dist/{telemetry-YON45KT4.js → telemetry-KZRSFUC6.js} +4 -4
- package/dist/{timeline-OQWDGV7L.js → timeline-ALU6E3WE.js} +20 -20
- package/dist/{tokens-NMPY673W.js → tokens-XEZF2LGB.js} +2 -2
- package/dist/{transcribe-HSYXT5TZ.js → transcribe-HJX65J5D.js} +10 -10
- package/dist/{transcribe-C6FKVSRR.js → transcribe-OVOOUYK7.js} +22 -22
- package/dist/{updateCheck-B7PAAPCJ.js → updateCheck-FEOJQNLJ.js} +2 -2
- package/dist/{upgrade-BOECDD5S.js → upgrade-VM2DGLXZ.js} +2 -2
- package/dist/{urlDownloader-KC2SS457.js → urlDownloader-YENOMQQF.js} +6 -6
- package/dist/{validate-LEEBUIIH.js → validate-HXTL5C7J.js} +26 -25
- package/dist/{video-JJAEISDH.js → video-3BIRQK2N.js} +8 -8
- package/dist/warmCheck.js +40 -39
- package/package.json +1 -1
- package/dist/chunk-6UWSEXQ3.js +0 -5030
- package/dist/chunk-TRPNLI6V.js +0 -71
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
renderFrameIdForRenderId,
|
|
43
43
|
resolveAuthoredTimingWindow,
|
|
44
44
|
toFps
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-IZRC24DI.js";
|
|
46
46
|
import {
|
|
47
47
|
AUDIO_GROUP_RENDER_ID_ATTR,
|
|
48
48
|
AUTHORED_SOURCE_BEGIN,
|
|
@@ -85,7 +85,7 @@ import {
|
|
|
85
85
|
sourceTimeAt,
|
|
86
86
|
timeAtSourceTime,
|
|
87
87
|
volumeSegmentSampleCount
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-SBQV5FLG.js";
|
|
89
89
|
import {
|
|
90
90
|
redactTelemetryString,
|
|
91
91
|
redactUrlQueryStrings
|
|
@@ -103,7 +103,7 @@ import {
|
|
|
103
103
|
} from "./chunk-WE42NVH7.js";
|
|
104
104
|
import {
|
|
105
105
|
resolveReferencedStart
|
|
106
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-GR2T3BOX.js";
|
|
107
107
|
import {
|
|
108
108
|
FFMPEG_PATH_ENV,
|
|
109
109
|
FFPROBE_PATH_ENV,
|
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
import {
|
|
113
113
|
isWithinProjectRoot,
|
|
114
114
|
resolveProjectRelativeSrc
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-2GTFW4MK.js";
|
|
116
116
|
import {
|
|
117
117
|
isPathInside
|
|
118
118
|
} from "./chunk-C2KEGBR3.js";
|
|
@@ -169,6 +169,7 @@ var DEFAULT_CONFIG = {
|
|
|
169
169
|
protocolTimeout: 3e5,
|
|
170
170
|
forceScreenshot: false,
|
|
171
171
|
staticFrameDedup: true,
|
|
172
|
+
videoLayerPassthrough: false,
|
|
172
173
|
useDrawElement: true,
|
|
173
174
|
enableDrawElementWorkerEncode: true,
|
|
174
175
|
// Auto-detected per host in `resolveConfig`; defaults off for the raw
|
|
@@ -212,6 +213,7 @@ var BOOLEAN_ENGINE_CONFIG_FIELDS = [
|
|
|
212
213
|
"enableBrowserPool",
|
|
213
214
|
"forceScreenshot",
|
|
214
215
|
"staticFrameDedup",
|
|
216
|
+
"videoLayerPassthrough",
|
|
215
217
|
"useDrawElement",
|
|
216
218
|
"enableDrawElementWorkerEncode",
|
|
217
219
|
"lowMemoryMode",
|
|
@@ -480,6 +482,10 @@ function resolveConfig(overrides) {
|
|
|
480
482
|
expectedChromiumMajor: env("PRODUCER_EXPECTED_CHROMIUM_MAJOR") ? Number(env("PRODUCER_EXPECTED_CHROMIUM_MAJOR")) : void 0,
|
|
481
483
|
forceScreenshot: envBool("PRODUCER_FORCE_SCREENSHOT", DEFAULT_CONFIG.forceScreenshot),
|
|
482
484
|
staticFrameDedup: resolveStaticFrameDedup(),
|
|
485
|
+
videoLayerPassthrough: envBool(
|
|
486
|
+
"HF_VIDEO_LAYER_PASSTHROUGH",
|
|
487
|
+
DEFAULT_CONFIG.videoLayerPassthrough
|
|
488
|
+
),
|
|
483
489
|
useDrawElement: envBool("PRODUCER_EXPERIMENTAL_FAST_CAPTURE", DEFAULT_CONFIG.useDrawElement),
|
|
484
490
|
enableDrawElementWorkerEncode: envBool(
|
|
485
491
|
"HF_DE_WORKER_ENCODE",
|
|
@@ -3737,13 +3743,16 @@ function capturesAlpha(options) {
|
|
|
3737
3743
|
return options.transparent ?? options.format === "png";
|
|
3738
3744
|
}
|
|
3739
3745
|
var TRANSPARENT_BG_STYLE_ID = "__hf_transparent_bg__";
|
|
3740
|
-
async function initTransparentBackground(page, {
|
|
3746
|
+
async function initTransparentBackground(page, {
|
|
3747
|
+
clearCompositionRoot = false,
|
|
3748
|
+
hideElementIds = []
|
|
3749
|
+
} = {}) {
|
|
3741
3750
|
const client = await getCdpSession(page);
|
|
3742
3751
|
await client.send("Emulation.setDefaultBackgroundColorOverride", {
|
|
3743
3752
|
color: { r: 0, g: 0, b: 0, a: 0 }
|
|
3744
3753
|
});
|
|
3745
3754
|
await page.evaluate(
|
|
3746
|
-
(styleId, clearCompositionRoot2) => {
|
|
3755
|
+
(styleId, clearCompositionRoot2, hideIds) => {
|
|
3747
3756
|
const selector = clearCompositionRoot2 ? "html,body,[data-composition-id]" : "html,body";
|
|
3748
3757
|
let style = document.getElementById(styleId);
|
|
3749
3758
|
if (!style) {
|
|
@@ -3751,10 +3760,12 @@ async function initTransparentBackground(page, { clearCompositionRoot = false }
|
|
|
3751
3760
|
style.id = styleId;
|
|
3752
3761
|
document.head.appendChild(style);
|
|
3753
3762
|
}
|
|
3754
|
-
|
|
3763
|
+
const hidden = hideIds.map((id) => `#${CSS.escape(id)}`).join(",");
|
|
3764
|
+
style.textContent = `${selector}{background:transparent !important;background-color:transparent !important;background-image:none !important;}` + (hidden ? `${hidden}{visibility:hidden !important;}` : "");
|
|
3755
3765
|
},
|
|
3756
3766
|
TRANSPARENT_BG_STYLE_ID,
|
|
3757
|
-
clearCompositionRoot
|
|
3767
|
+
clearCompositionRoot,
|
|
3768
|
+
[...hideElementIds]
|
|
3758
3769
|
);
|
|
3759
3770
|
}
|
|
3760
3771
|
async function captureAlphaPng(page, width, height) {
|
|
@@ -5814,7 +5825,11 @@ async function initDrawElementOrTransparentBackground(session, page, logInitPhas
|
|
|
5814
5825
|
await finalizeDrawElementInit(session, page, logInitPhase, { transparent, forceDE });
|
|
5815
5826
|
}
|
|
5816
5827
|
} else if (capturesAlpha(session.options)) {
|
|
5817
|
-
|
|
5828
|
+
const hideElementIds = session.options.hiddenElementIds ?? [];
|
|
5829
|
+
await initTransparentBackground(session.page, {
|
|
5830
|
+
clearCompositionRoot: hideElementIds.length > 0,
|
|
5831
|
+
hideElementIds
|
|
5832
|
+
});
|
|
5818
5833
|
}
|
|
5819
5834
|
}
|
|
5820
5835
|
function drawElementWorkerEncodeEligible(session, transparent) {
|
|
@@ -6449,7 +6464,7 @@ async function pollVideosReady(page, skipIds, timeoutMs, intervalMs = 100) {
|
|
|
6449
6464
|
if (ve.readyState >= 2) return true;
|
|
6450
6465
|
if (ve.error) return true;
|
|
6451
6466
|
if (ve.networkState === HTMLMediaElement.NETWORK_NO_SOURCE) return true;
|
|
6452
|
-
return
|
|
6467
|
+
return !ve.getAttribute("src") && !ve.querySelector("source");
|
|
6453
6468
|
});
|
|
6454
6469
|
}, skipIds)
|
|
6455
6470
|
);
|
|
@@ -6518,6 +6533,7 @@ async function collectMediaReadinessWarnings(page, skipIds, timeoutMs) {
|
|
|
6518
6533
|
for (const media of document.querySelectorAll("video")) {
|
|
6519
6534
|
const mediaElement = media;
|
|
6520
6535
|
if (skipped.has(mediaElement.id)) continue;
|
|
6536
|
+
if (!mediaElement.getAttribute("src") && !mediaElement.querySelector("source")) continue;
|
|
6521
6537
|
const src = mediaElement.currentSrc || mediaElement.getAttribute("src") || "(no src)";
|
|
6522
6538
|
const failed = Boolean(mediaElement.error) || mediaElement.networkState === HTMLMediaElement.NETWORK_NO_SOURCE;
|
|
6523
6539
|
const pending = !failed && mediaElement.readyState < HTMLMediaElement.HAVE_CURRENT_DATA;
|
|
@@ -7155,82 +7171,88 @@ var MAX_STATIC_DEDUP_ANALYSIS_FRAMES = 1e6;
|
|
|
7155
7171
|
function isStaticDedupFrameAnalysisSafe(totalFrames) {
|
|
7156
7172
|
return Number.isFinite(totalFrames) && Number.isSafeInteger(totalFrames) && totalFrames > 0 && totalFrames <= MAX_STATIC_DEDUP_ANALYSIS_FRAMES;
|
|
7157
7173
|
}
|
|
7158
|
-
async function computeStaticFrameSet(page, fps) {
|
|
7159
|
-
const result = await page.evaluate(
|
|
7160
|
-
|
|
7161
|
-
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
const intervals2 = [];
|
|
7167
|
-
let tweenCount2 = 0;
|
|
7168
|
-
let hasTimelineCall2 = false;
|
|
7169
|
-
function walk(tl, offset) {
|
|
7170
|
-
if (typeof tl.getChildren !== "function") return;
|
|
7171
|
-
if (typeof tl.vars?.onUpdate === "function") {
|
|
7172
|
-
const total = typeof tl.totalDuration === "function" ? tl.totalDuration() : 0;
|
|
7173
|
-
if (total > 0) intervals2.push({ start: offset, end: offset + total, spatial: true });
|
|
7174
|
+
async function computeStaticFrameSet(page, fps, ignoredVideoIds = []) {
|
|
7175
|
+
const result = await page.evaluate(
|
|
7176
|
+
(spatialProps, ignored) => {
|
|
7177
|
+
const SPATIAL_PROPS = new Set(spatialProps);
|
|
7178
|
+
function isSpatial(vars) {
|
|
7179
|
+
if (!vars) return false;
|
|
7180
|
+
for (const key of Object.keys(vars)) if (SPATIAL_PROPS.has(key)) return true;
|
|
7181
|
+
return false;
|
|
7174
7182
|
}
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
if (typeof
|
|
7180
|
-
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
+
const intervals2 = [];
|
|
7184
|
+
let tweenCount2 = 0;
|
|
7185
|
+
let hasTimelineCall2 = false;
|
|
7186
|
+
function walk(tl, offset) {
|
|
7187
|
+
if (typeof tl.getChildren !== "function") return;
|
|
7188
|
+
if (typeof tl.vars?.onUpdate === "function") {
|
|
7189
|
+
const total = typeof tl.totalDuration === "function" ? tl.totalDuration() : 0;
|
|
7190
|
+
if (total > 0) intervals2.push({ start: offset, end: offset + total, spatial: true });
|
|
7191
|
+
}
|
|
7192
|
+
for (const child of tl.getChildren(false, true, true)) {
|
|
7193
|
+
const start = offset + (typeof child.startTime === "function" ? child.startTime() : 0);
|
|
7194
|
+
const single = typeof child.duration === "function" ? child.duration() : 0;
|
|
7195
|
+
const total = typeof child.totalDuration === "function" ? child.totalDuration() : single;
|
|
7196
|
+
if (typeof child.getChildren === "function") {
|
|
7197
|
+
if (total > single + 1e-6) {
|
|
7198
|
+
intervals2.push({ start, end: start + total, spatial: true });
|
|
7199
|
+
walk(child, start);
|
|
7200
|
+
} else {
|
|
7201
|
+
walk(child, start);
|
|
7202
|
+
}
|
|
7183
7203
|
} else {
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
if (total <= 1e-6 && (typeof child.vars?.onComplete === "function" || typeof child.vars?.onReverseComplete === "function")) {
|
|
7190
|
-
hasTimelineCall2 = true;
|
|
7204
|
+
tweenCount2++;
|
|
7205
|
+
intervals2.push({ start, end: start + total, spatial: isSpatial(child.vars) });
|
|
7206
|
+
if (total <= 1e-6 && (typeof child.vars?.onComplete === "function" || typeof child.vars?.onReverseComplete === "function")) {
|
|
7207
|
+
hasTimelineCall2 = true;
|
|
7208
|
+
}
|
|
7191
7209
|
}
|
|
7192
7210
|
}
|
|
7193
7211
|
}
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7197
|
-
if (tl && typeof tl.getChildren === "function") walk(tl, 0);
|
|
7198
|
-
}
|
|
7199
|
-
const hasVideo2 = !!document.querySelector("video");
|
|
7200
|
-
const hasCanvas2 = !!document.querySelector("canvas");
|
|
7201
|
-
const hasFrameSources2 = w.__hfHasFrameSources?.() ?? false;
|
|
7202
|
-
const hasIframe2 = !!document.querySelector("iframe");
|
|
7203
|
-
const hasUnresolvableClipStart2 = Array.from(document.querySelectorAll("[data-start]")).some(
|
|
7204
|
-
(el) => {
|
|
7205
|
-
const v = el.dataset.start;
|
|
7206
|
-
return v != null && v.trim() !== "" && !Number.isFinite(parseFloat(v));
|
|
7212
|
+
const w = window;
|
|
7213
|
+
for (const tl of Object.values(w.__timelines || {})) {
|
|
7214
|
+
if (tl && typeof tl.getChildren === "function") walk(tl, 0);
|
|
7207
7215
|
}
|
|
7208
|
-
|
|
7209
|
-
|
|
7210
|
-
|
|
7211
|
-
const
|
|
7212
|
-
|
|
7213
|
-
|
|
7214
|
-
|
|
7215
|
-
|
|
7216
|
-
|
|
7216
|
+
const hasVideo2 = Array.from(document.querySelectorAll("video")).some(
|
|
7217
|
+
(v) => !ignored.includes(v.id)
|
|
7218
|
+
);
|
|
7219
|
+
const hasCanvas2 = !!document.querySelector("canvas");
|
|
7220
|
+
const hasFrameSources2 = w.__hfHasFrameSources?.() ?? false;
|
|
7221
|
+
const hasIframe2 = !!document.querySelector("iframe");
|
|
7222
|
+
const hasUnresolvableClipStart2 = Array.from(document.querySelectorAll("[data-start]")).some(
|
|
7223
|
+
(el) => {
|
|
7224
|
+
const v = el.dataset.start;
|
|
7225
|
+
return v != null && v.trim() !== "" && !Number.isFinite(parseFloat(v));
|
|
7226
|
+
}
|
|
7227
|
+
);
|
|
7228
|
+
let hasNonGsapAnim2 = false;
|
|
7229
|
+
try {
|
|
7230
|
+
const docAnims = document.getAnimations;
|
|
7231
|
+
if (typeof docAnims === "function") {
|
|
7232
|
+
hasNonGsapAnim2 = docAnims.call(document).some((a) => {
|
|
7233
|
+
const t = a;
|
|
7234
|
+
return t.playState === "running" || t.playState === "paused";
|
|
7235
|
+
});
|
|
7236
|
+
}
|
|
7237
|
+
} catch {
|
|
7238
|
+
hasNonGsapAnim2 = true;
|
|
7217
7239
|
}
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
|
|
7222
|
-
|
|
7223
|
-
|
|
7224
|
-
|
|
7225
|
-
|
|
7226
|
-
|
|
7227
|
-
|
|
7228
|
-
|
|
7229
|
-
|
|
7230
|
-
|
|
7231
|
-
|
|
7232
|
-
|
|
7233
|
-
|
|
7240
|
+
return {
|
|
7241
|
+
intervals: intervals2,
|
|
7242
|
+
tweenCount: tweenCount2,
|
|
7243
|
+
duration: w.__hf?.duration ?? 0,
|
|
7244
|
+
hasVideo: hasVideo2,
|
|
7245
|
+
hasCanvas: hasCanvas2,
|
|
7246
|
+
hasFrameSources: hasFrameSources2,
|
|
7247
|
+
hasIframe: hasIframe2,
|
|
7248
|
+
hasNonGsapAnim: hasNonGsapAnim2,
|
|
7249
|
+
hasUnresolvableClipStart: hasUnresolvableClipStart2,
|
|
7250
|
+
hasTimelineCall: hasTimelineCall2
|
|
7251
|
+
};
|
|
7252
|
+
},
|
|
7253
|
+
SPATIAL_TWEEN_PROPERTIES,
|
|
7254
|
+
[...ignoredVideoIds]
|
|
7255
|
+
);
|
|
7234
7256
|
const {
|
|
7235
7257
|
intervals,
|
|
7236
7258
|
tweenCount,
|
|
@@ -7303,6 +7325,8 @@ async function computeStaticFrameSet(page, fps) {
|
|
|
7303
7325
|
}
|
|
7304
7326
|
var STATIC_VERIFY_REFERENCE_STRIDE = 24;
|
|
7305
7327
|
var STATIC_VERIFY_MAX_MS = 15e3;
|
|
7328
|
+
var STATIC_VERIFY_HEADROOM = 1.5;
|
|
7329
|
+
var STATIC_VERIFY_CEILING_MS = 3e5;
|
|
7306
7330
|
var STATIC_VERIFY_MIN_SCREENSHOT_CAP = 400;
|
|
7307
7331
|
var STATIC_VERIFY_SAMPLE_CAP_MULTIPLIER = 8;
|
|
7308
7332
|
var STATIC_VERIFY_MAX_GLOBAL_SAMPLE_FLOOR = STATIC_VERIFY_MIN_SCREENSHOT_CAP / STATIC_VERIFY_SAMPLE_CAP_MULTIPLIER;
|
|
@@ -7433,7 +7457,6 @@ async function verifyStaticFramesSafe(session, page, staticFrames, fps, sampleCo
|
|
|
7433
7457
|
const now = dependencies.now ?? Date.now;
|
|
7434
7458
|
const capture = dependencies.capture ?? pageScreenshotCapture;
|
|
7435
7459
|
const startedAt = now();
|
|
7436
|
-
const deadline = startedAt + STATIC_VERIFY_MAX_MS;
|
|
7437
7460
|
const verifiedFrames = /* @__PURE__ */ new Set();
|
|
7438
7461
|
const stats = {
|
|
7439
7462
|
plannedRuns: plan.runs.length,
|
|
@@ -7470,12 +7493,24 @@ async function verifyStaticFramesSafe(session, page, staticFrames, fps, sampleCo
|
|
|
7470
7493
|
plan.effectiveSampleFloor * STATIC_VERIFY_SAMPLE_CAP_MULTIPLIER,
|
|
7471
7494
|
Math.ceil(plan.predictedFrames / STATIC_VERIFY_REFERENCE_STRIDE) * 3 + plan.runs.length
|
|
7472
7495
|
);
|
|
7496
|
+
let firstShotMs = 0;
|
|
7473
7497
|
const seekCapture = async (frameIdx) => {
|
|
7474
|
-
|
|
7498
|
+
const spent = now() - startedAt;
|
|
7499
|
+
const budget = Math.max(
|
|
7500
|
+
STATIC_VERIFY_MAX_MS,
|
|
7501
|
+
Math.min(
|
|
7502
|
+
STATIC_VERIFY_CEILING_MS,
|
|
7503
|
+
STATIC_VERIFY_HEADROOM * plan.plannedScreenshots * firstShotMs
|
|
7504
|
+
)
|
|
7505
|
+
);
|
|
7506
|
+
if (spent >= budget) return "time_budget";
|
|
7475
7507
|
if (stats.screenshots >= hardCap) return "count_budget";
|
|
7508
|
+
const shotStart = now();
|
|
7476
7509
|
await seekToFrame(frameIdx);
|
|
7477
7510
|
stats.screenshots++;
|
|
7478
|
-
|
|
7511
|
+
const buf = await capture(page, session.options);
|
|
7512
|
+
if (stats.screenshots === 1) firstShotMs = now() - shotStart;
|
|
7513
|
+
return buf;
|
|
7479
7514
|
};
|
|
7480
7515
|
try {
|
|
7481
7516
|
for (const run of plan.runs) {
|
|
@@ -7514,7 +7549,11 @@ async function verifyStaticFramesSafe(session, page, staticFrames, fps, sampleCo
|
|
|
7514
7549
|
async function armStaticDedup(session, page, logInitPhase) {
|
|
7515
7550
|
let sharedStaticFrameStats;
|
|
7516
7551
|
if (session.options.motionBlur && session.options.motionBlur.samplesPerFrame === void 0 && !session.motionBlurNonSpatialFrames) {
|
|
7517
|
-
sharedStaticFrameStats = await computeStaticFrameSet(
|
|
7552
|
+
sharedStaticFrameStats = await computeStaticFrameSet(
|
|
7553
|
+
page,
|
|
7554
|
+
fpsToNumber(session.options.fps),
|
|
7555
|
+
session.options.hiddenElementIds
|
|
7556
|
+
);
|
|
7518
7557
|
session.motionBlurNonSpatialFrames = sharedStaticFrameStats.nonSpatialOnlyFrameSet;
|
|
7519
7558
|
}
|
|
7520
7559
|
if (session.staticFrames || session.staticDedupSkipReason) return;
|
|
@@ -7541,7 +7580,7 @@ async function armStaticDedup(session, page, logInitPhase) {
|
|
|
7541
7580
|
return;
|
|
7542
7581
|
}
|
|
7543
7582
|
const fps = fpsToNumber(session.options.fps);
|
|
7544
|
-
const stats = sharedStaticFrameStats ?? await computeStaticFrameSet(page, fps);
|
|
7583
|
+
const stats = sharedStaticFrameStats ?? await computeStaticFrameSet(page, fps, session.options.hiddenElementIds);
|
|
7545
7584
|
if (!stats.eligible || stats.staticFrameSet.size === 0) {
|
|
7546
7585
|
session.staticDedupSkipReason = "ineligible";
|
|
7547
7586
|
logInitPhase(`static-frame dedup: disabled (${stats.reason})`);
|
|
@@ -8375,6 +8414,7 @@ function getCapturePerfSummary(session) {
|
|
|
8375
8414
|
avgSeekMs: Math.round(session.capturePerf.seekMs / frames),
|
|
8376
8415
|
avgBeforeCaptureMs: Math.round(session.capturePerf.beforeCaptureMs / frames),
|
|
8377
8416
|
avgScreenshotMs: Math.round(session.capturePerf.screenshotMs / frames),
|
|
8417
|
+
captureBeyondViewport: session.options.captureBeyondViewport,
|
|
8378
8418
|
p50TotalMs: medianOf(session.capturePerf.frameMs),
|
|
8379
8419
|
p95TotalMs: percentileOf(session.capturePerf.frameMs, 0.95),
|
|
8380
8420
|
p99TotalMs: percentileOf(session.capturePerf.frameMs, 0.99),
|
|
@@ -8714,9 +8754,9 @@ async function selectUsableGpuEncoder(candidates, isUsable) {
|
|
|
8714
8754
|
}
|
|
8715
8755
|
return null;
|
|
8716
8756
|
}
|
|
8717
|
-
async function
|
|
8718
|
-
const ffmpeg = spawn2(getFfmpegBinary(),
|
|
8719
|
-
stdio: ["
|
|
8757
|
+
async function ffmpegStdout(args, deadlineMs, terminationGraceMs) {
|
|
8758
|
+
const ffmpeg = spawn2(getFfmpegBinary(), args, {
|
|
8759
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
8720
8760
|
// See runFfmpeg.ts: keeps a console window off the user's desktop on Windows.
|
|
8721
8761
|
windowsHide: true
|
|
8722
8762
|
});
|
|
@@ -8726,9 +8766,14 @@ async function detectGpuEncoder() {
|
|
|
8726
8766
|
stdout += data.toString();
|
|
8727
8767
|
});
|
|
8728
8768
|
const outcome = await new ManagedChildProcess(ffmpeg, {
|
|
8729
|
-
deadlineAtMs: Date.now() +
|
|
8769
|
+
deadlineAtMs: Date.now() + deadlineMs,
|
|
8770
|
+
terminationGraceMs
|
|
8730
8771
|
}).wait();
|
|
8731
|
-
|
|
8772
|
+
return outcome.reason === "exit" && outcome.exitCode === 0 ? stdout : null;
|
|
8773
|
+
}
|
|
8774
|
+
async function detectGpuEncoder() {
|
|
8775
|
+
const stdout = await ffmpegStdout(["-encoders"], 3e4);
|
|
8776
|
+
if (stdout === null) return null;
|
|
8732
8777
|
const candidates = getCompiledGpuEncoders(stdout);
|
|
8733
8778
|
return selectUsableGpuEncoder(candidates, canUseGpuEncoder).catch(() => null);
|
|
8734
8779
|
}
|
|
@@ -8847,9 +8892,11 @@ var QSV_PRESET_MAP = {
|
|
|
8847
8892
|
superfast: "veryfast",
|
|
8848
8893
|
placebo: "veryslow"
|
|
8849
8894
|
};
|
|
8850
|
-
function mapPresetForGpuEncoder(encoder, preset) {
|
|
8895
|
+
function mapPresetForGpuEncoder(encoder, preset, nvencPresets) {
|
|
8851
8896
|
switch (encoder) {
|
|
8852
8897
|
case "nvenc":
|
|
8898
|
+
if (nvencPresets && nvencPresets.size > 0 && !nvencPresets.has("p4"))
|
|
8899
|
+
return legacyNvencPreset(preset, nvencPresets);
|
|
8853
8900
|
if (/^p[1-7]$/.test(preset)) return preset;
|
|
8854
8901
|
return NVENC_PRESET_MAP[preset] ?? "p4";
|
|
8855
8902
|
case "qsv":
|
|
@@ -8858,6 +8905,49 @@ function mapPresetForGpuEncoder(encoder, preset) {
|
|
|
8858
8905
|
return preset;
|
|
8859
8906
|
}
|
|
8860
8907
|
}
|
|
8908
|
+
var LEGACY_NVENC_PRESET_MAP = {
|
|
8909
|
+
ultrafast: "hp",
|
|
8910
|
+
superfast: "hp",
|
|
8911
|
+
veryfast: "hp",
|
|
8912
|
+
faster: "fast",
|
|
8913
|
+
fast: "fast",
|
|
8914
|
+
medium: "medium",
|
|
8915
|
+
slow: "slow",
|
|
8916
|
+
slower: "slow",
|
|
8917
|
+
veryslow: "slow",
|
|
8918
|
+
placebo: "slow"
|
|
8919
|
+
};
|
|
8920
|
+
function legacyNvencPreset(preset, accepted) {
|
|
8921
|
+
if (accepted.has(preset) && !/^p[1-7]$/.test(preset)) return preset;
|
|
8922
|
+
const mapped = LEGACY_NVENC_PRESET_MAP[preset] ?? "medium";
|
|
8923
|
+
return accepted.has(mapped) ? mapped : "default";
|
|
8924
|
+
}
|
|
8925
|
+
function parseEncoderPresetNames(helpText) {
|
|
8926
|
+
const names = /* @__PURE__ */ new Set();
|
|
8927
|
+
let inPreset = false;
|
|
8928
|
+
for (const line of helpText.split(/\r?\n/)) {
|
|
8929
|
+
if (/^\s{1,3}-\S/.test(line)) {
|
|
8930
|
+
inPreset = /^\s{1,3}-preset\s/.test(line);
|
|
8931
|
+
continue;
|
|
8932
|
+
}
|
|
8933
|
+
const entry = inPreset ? /^\s{4,}([a-z][a-z0-9_]*)\s+-?\d+\s+[E.]\S{3}/.exec(line) : null;
|
|
8934
|
+
if (entry) names.add(entry[1]);
|
|
8935
|
+
}
|
|
8936
|
+
return names;
|
|
8937
|
+
}
|
|
8938
|
+
var cachedNvencPresets = void 0;
|
|
8939
|
+
function getCachedNvencPresets() {
|
|
8940
|
+
cachedNvencPresets ??= readNvencPresets();
|
|
8941
|
+
return cachedNvencPresets;
|
|
8942
|
+
}
|
|
8943
|
+
async function readNvencPresets() {
|
|
8944
|
+
const help = await ffmpegStdout(
|
|
8945
|
+
["-hide_banner", "-h", "encoder=h264_nvenc"],
|
|
8946
|
+
GPU_PROBE_TIMEOUT_MS2,
|
|
8947
|
+
GPU_PROBE_KILL_GRACE_MS
|
|
8948
|
+
).catch(() => null);
|
|
8949
|
+
return help === null ? /* @__PURE__ */ new Set() : parseEncoderPresetNames(help);
|
|
8950
|
+
}
|
|
8861
8951
|
|
|
8862
8952
|
// ../engine/src/utils/hdr.ts
|
|
8863
8953
|
function isHdrColorSpace(cs) {
|
|
@@ -9365,6 +9455,10 @@ function formatFfmpegSeconds(seconds) {
|
|
|
9365
9455
|
const text = String(seconds);
|
|
9366
9456
|
return text.includes("e") ? String(+seconds.toFixed(6)) : text;
|
|
9367
9457
|
}
|
|
9458
|
+
function readIntervalSpec(startSeconds, end) {
|
|
9459
|
+
const to = typeof end === "number" ? formatFfmpegSeconds(end) : end;
|
|
9460
|
+
return `${formatFfmpegSeconds(startSeconds)}%${to}`;
|
|
9461
|
+
}
|
|
9368
9462
|
function ffmpegSeekSeconds(metadata, mediaTime) {
|
|
9369
9463
|
return mediaTime - (metadata.mediaTimeOffsetSeconds ?? 0);
|
|
9370
9464
|
}
|
|
@@ -9718,7 +9812,7 @@ async function extractFinalPacketDuration(filePath, window2, signal) {
|
|
|
9718
9812
|
"-select_streams",
|
|
9719
9813
|
"v:0",
|
|
9720
9814
|
"-read_intervals",
|
|
9721
|
-
|
|
9815
|
+
readIntervalSpec(intervalStart, streamEnd),
|
|
9722
9816
|
"-show_entries",
|
|
9723
9817
|
"packet=pts_time,duration_time",
|
|
9724
9818
|
"-of",
|
|
@@ -9776,7 +9870,7 @@ async function extractFinalVideoFrameTimestamp(filePath, metadata, signal) {
|
|
|
9776
9870
|
});
|
|
9777
9871
|
return parseFinalTimestamp(stdout);
|
|
9778
9872
|
};
|
|
9779
|
-
const timestamp = await probe(
|
|
9873
|
+
const timestamp = await probe(readIntervalSpec(intervalStart, streamEnd)) ?? await probe(
|
|
9780
9874
|
/* full scan */
|
|
9781
9875
|
);
|
|
9782
9876
|
if (timestamp === void 0) {
|
|
@@ -9905,7 +9999,7 @@ async function probeDecodedAudioDuration(filePath, audioStream, sampleRate, star
|
|
|
9905
9999
|
startSeconds,
|
|
9906
10000
|
startSeconds + containerDurationSeconds - AUDIO_DURATION_PROBE_TAIL_SECONDS
|
|
9907
10001
|
);
|
|
9908
|
-
const lastFrame = await probe(
|
|
10002
|
+
const lastFrame = await probe(readIntervalSpec(tailStart, FFPROBE_READ_INTERVAL_EXPLICIT_FAR_END)) ?? await probe();
|
|
9909
10003
|
if (!lastFrame) return null;
|
|
9910
10004
|
return lastFrame.timestamp + lastFrame.nbSamples / sampleRate - startSeconds;
|
|
9911
10005
|
}
|
|
@@ -9936,7 +10030,7 @@ async function keyframeGapSeconds(filePath, seekSeconds, signal) {
|
|
|
9936
10030
|
filePath,
|
|
9937
10031
|
[
|
|
9938
10032
|
...["-select_streams", "v:0", "-show_entries", "packet=pts_time", "-of", "csv=p=0"],
|
|
9939
|
-
...["-read_intervals",
|
|
10033
|
+
...["-read_intervals", readIntervalSpec(seekSeconds, "+#1")]
|
|
9940
10034
|
],
|
|
9941
10035
|
signal
|
|
9942
10036
|
);
|
|
@@ -10208,7 +10302,7 @@ function appendRateCapArgs(args, options) {
|
|
|
10208
10302
|
}
|
|
10209
10303
|
args.push("-maxrate", String(Math.round(cap)), "-bufsize", String(Math.round(buffer)));
|
|
10210
10304
|
}
|
|
10211
|
-
function buildEncoderArgs(options, inputArgs, outputPath, gpuEncoder = null) {
|
|
10305
|
+
function buildEncoderArgs(options, inputArgs, outputPath, gpuEncoder = null, nvencPresets) {
|
|
10212
10306
|
const {
|
|
10213
10307
|
fps,
|
|
10214
10308
|
codec = "h264",
|
|
@@ -10234,7 +10328,7 @@ function buildEncoderArgs(options, inputArgs, outputPath, gpuEncoder = null) {
|
|
|
10234
10328
|
args.push("-c:v", encoderName);
|
|
10235
10329
|
switch (gpuEncoder) {
|
|
10236
10330
|
case "nvenc":
|
|
10237
|
-
args.push("-preset", mapPresetForGpuEncoder("nvenc", preset));
|
|
10331
|
+
args.push("-preset", mapPresetForGpuEncoder("nvenc", preset, nvencPresets));
|
|
10238
10332
|
if (bitrate) args.push("-b:v", bitrate);
|
|
10239
10333
|
else args.push("-cq", String(quality));
|
|
10240
10334
|
break;
|
|
@@ -10415,7 +10509,8 @@ async function encodeFramesFromDir(framesDir, framePattern, outputPath, options,
|
|
|
10415
10509
|
}
|
|
10416
10510
|
const inputPath = frameSequencePath(framesDir, framePattern);
|
|
10417
10511
|
const inputArgs = ["-framerate", fpsToFfmpegArg(options.fps), "-i", inputPath];
|
|
10418
|
-
const
|
|
10512
|
+
const nvencPresets = gpuEncoder === "nvenc" ? await getCachedNvencPresets() : void 0;
|
|
10513
|
+
const args = buildEncoderArgs(options, inputArgs, outputPath, gpuEncoder, nvencPresets);
|
|
10419
10514
|
const encodeTimeout = config?.ffmpegEncodeTimeout ?? DEFAULT_CONFIG.ffmpegEncodeTimeout;
|
|
10420
10515
|
let framesRead = 0;
|
|
10421
10516
|
const result = await runFfmpeg(args, {
|
|
@@ -10543,7 +10638,8 @@ async function encodeFramesChunkedConcat(framesDir, framePattern, outputPath, op
|
|
|
10543
10638
|
];
|
|
10544
10639
|
let gpuEncoder = null;
|
|
10545
10640
|
if (options.useGpu) gpuEncoder = await getCachedGpuEncoder();
|
|
10546
|
-
const
|
|
10641
|
+
const nvencPresets = gpuEncoder === "nvenc" ? await getCachedNvencPresets() : void 0;
|
|
10642
|
+
const args = buildEncoderArgs(options, inputArgs, chunkPath, gpuEncoder, nvencPresets);
|
|
10547
10643
|
const encodeTimeout = config?.ffmpegEncodeTimeout ?? DEFAULT_CONFIG.ffmpegEncodeTimeout;
|
|
10548
10644
|
let framesRead = 0;
|
|
10549
10645
|
const processResult = await runFfmpeg(args, {
|
|
@@ -10882,7 +10978,7 @@ function createFrameReorderBuffer(startFrame, endFrame) {
|
|
|
10882
10978
|
};
|
|
10883
10979
|
return { waitForFrame, advanceTo, waitForAllDone, abort };
|
|
10884
10980
|
}
|
|
10885
|
-
function buildStreamingArgs(options, outputPath, gpuEncoder = null) {
|
|
10981
|
+
function buildStreamingArgs(options, outputPath, gpuEncoder = null, nvencPresets) {
|
|
10886
10982
|
const {
|
|
10887
10983
|
fps,
|
|
10888
10984
|
codec = "h264",
|
|
@@ -10932,8 +11028,12 @@ function buildStreamingArgs(options, outputPath, gpuEncoder = null) {
|
|
|
10932
11028
|
"-"
|
|
10933
11029
|
);
|
|
10934
11030
|
}
|
|
11031
|
+
if (options.videoLayer) args.push(...options.videoLayer.inputArgs);
|
|
10935
11032
|
args.push("-r", fpsToFfmpegArg(fps));
|
|
10936
11033
|
const shouldUseGpu = useGpu && gpuEncoder !== null;
|
|
11034
|
+
if (options.videoLayer && (imageFormat !== "png" || options.rawInputFormat || shouldUseGpu || codec !== "h264" && codec !== "h265")) {
|
|
11035
|
+
throw new Error("videoLayer needs software h264/h265 and PNG frames");
|
|
11036
|
+
}
|
|
10937
11037
|
appendRateCapArgs(args, options);
|
|
10938
11038
|
if (codec === "h264" || codec === "h265") {
|
|
10939
11039
|
if (shouldUseGpu) {
|
|
@@ -10941,7 +11041,7 @@ function buildStreamingArgs(options, outputPath, gpuEncoder = null) {
|
|
|
10941
11041
|
args.push("-c:v", encoderName);
|
|
10942
11042
|
switch (gpuEncoder) {
|
|
10943
11043
|
case "nvenc":
|
|
10944
|
-
args.push("-preset", mapPresetForGpuEncoder("nvenc", preset));
|
|
11044
|
+
args.push("-preset", mapPresetForGpuEncoder("nvenc", preset, nvencPresets));
|
|
10945
11045
|
if (bitrate) args.push("-b:v", bitrate);
|
|
10946
11046
|
else args.push("-cq", String(quality));
|
|
10947
11047
|
break;
|
|
@@ -11047,6 +11147,20 @@ function buildStreamingArgs(options, outputPath, gpuEncoder = null) {
|
|
|
11047
11147
|
if (vfIdx !== -1) {
|
|
11048
11148
|
args[vfIdx + 1] = `${frameFilter},${args[vfIdx + 1]}`;
|
|
11049
11149
|
}
|
|
11150
|
+
} else if (options.videoLayer) {
|
|
11151
|
+
const video = `[1:v]${options.videoLayer.filters.join(",")},format=gbrp[v]`;
|
|
11152
|
+
const tail2 = withEvenDimensionPad(
|
|
11153
|
+
SDR_RGB_TO_TAGGED_BT709_FILTER,
|
|
11154
|
+
pixelFormat,
|
|
11155
|
+
options.width,
|
|
11156
|
+
options.height
|
|
11157
|
+
);
|
|
11158
|
+
args.push(
|
|
11159
|
+
"-filter_complex",
|
|
11160
|
+
`${video};[0:v]format=rgba[o];[v][o]overlay=eof_action=endall:format=gbrp,${tail2}[vout]`,
|
|
11161
|
+
"-map",
|
|
11162
|
+
"[vout]"
|
|
11163
|
+
);
|
|
11050
11164
|
} else {
|
|
11051
11165
|
args.push(
|
|
11052
11166
|
"-vf",
|
|
@@ -11070,7 +11184,8 @@ async function spawnStreamingEncoder(outputPath, options, signal, config) {
|
|
|
11070
11184
|
if (options.useGpu) {
|
|
11071
11185
|
gpuEncoder = await getCachedGpuEncoder();
|
|
11072
11186
|
}
|
|
11073
|
-
const
|
|
11187
|
+
const nvencPresets = gpuEncoder === "nvenc" ? await getCachedNvencPresets() : void 0;
|
|
11188
|
+
const args = buildStreamingArgs(options, outputPath, gpuEncoder, nvencPresets);
|
|
11074
11189
|
const ffmpeg = spawn5(getFfmpegBinary(), args, {
|
|
11075
11190
|
stdio: ["pipe", "pipe", "pipe"],
|
|
11076
11191
|
// See runFfmpeg.ts: keeps a console window off the user's desktop on Windows.
|
|
@@ -11301,7 +11416,7 @@ function isMemberGroupHidden(groupsById, el) {
|
|
|
11301
11416
|
|
|
11302
11417
|
// ../engine/src/services/videoFrameExtractor.ts
|
|
11303
11418
|
import { copyFileSync as copyFileSync2, existsSync as existsSync9, linkSync as linkSync2, mkdirSync as mkdirSync6, rmSync as rmSync5 } from "fs";
|
|
11304
|
-
import { basename as basename2, join as join12 } from "path";
|
|
11419
|
+
import { basename as basename2, isAbsolute, join as join12, normalize, relative, win32 } from "path";
|
|
11305
11420
|
import { cpus } from "os";
|
|
11306
11421
|
|
|
11307
11422
|
// ../engine/src/utils/concurrencyLimit.ts
|
|
@@ -12818,6 +12933,23 @@ async function hdrToSdrTransformKey() {
|
|
|
12818
12933
|
function sdrToHdrTransformKey(transfer) {
|
|
12819
12934
|
return `sdr2hdr-${transfer}`;
|
|
12820
12935
|
}
|
|
12936
|
+
var URL_SCHEME = /^[a-z][a-z0-9+.-]+:/i;
|
|
12937
|
+
var WINDOWS_ABSOLUTE = /^([a-zA-Z]:[\\/]|\\\\)/;
|
|
12938
|
+
function videoExtractionSourceLabel(src, baseDir) {
|
|
12939
|
+
if (/^(data|blob):/i.test(src)) return "inline video";
|
|
12940
|
+
if (URL_SCHEME.test(src)) {
|
|
12941
|
+
try {
|
|
12942
|
+
return basename2(decodeURIComponent(new URL(src).pathname)) || "remote video";
|
|
12943
|
+
} catch {
|
|
12944
|
+
return "remote video";
|
|
12945
|
+
}
|
|
12946
|
+
}
|
|
12947
|
+
const path = src.split(/[?#]/)[0];
|
|
12948
|
+
const lib = WINDOWS_ABSOLUTE.test(path) ? win32 : { isAbsolute, relative, basename: basename2, normalize };
|
|
12949
|
+
const relativePath = lib.isAbsolute(path) ? lib.relative(baseDir, path) : lib.normalize(path);
|
|
12950
|
+
const label = relativePath.startsWith("..") || lib.isAbsolute(relativePath) ? lib.basename(path) : relativePath;
|
|
12951
|
+
return label.replace(/\\/g, "/");
|
|
12952
|
+
}
|
|
12821
12953
|
function safeVideoExtractionSourceIdentity(source) {
|
|
12822
12954
|
if (!isHttpUrl(source)) return null;
|
|
12823
12955
|
const identity = safeDownloadUrlIdentity(source);
|
|
@@ -13296,6 +13428,69 @@ async function extractVideoFramesRange(...args) {
|
|
|
13296
13428
|
throw redactUrlQueriesInError(error);
|
|
13297
13429
|
}
|
|
13298
13430
|
}
|
|
13431
|
+
function videoFilterChain(input) {
|
|
13432
|
+
const { metadata, format, ffmpegFps, sampleAtOutputFps, keepsHdrForChrome, toneMapFrom } = input;
|
|
13433
|
+
const toneMappedToSdr = toneMapFrom !== void 0;
|
|
13434
|
+
const head = [];
|
|
13435
|
+
if (keepsHdrForChrome) head.push("format=nv12");
|
|
13436
|
+
const tail2 = [];
|
|
13437
|
+
if (metadata.sampleAspectRatio) {
|
|
13438
|
+
tail2.push("scale=trunc(iw*sar/2)*2:ih", "setsar=1");
|
|
13439
|
+
}
|
|
13440
|
+
const sampling = (seek) => sampleAtOutputFps ? [
|
|
13441
|
+
...metadata.isVFR ? [] : undoTickRoundingOnTheSourceFrameGrid(seek, videoStartOnMediaTimeline(metadata)),
|
|
13442
|
+
"settb=intb/2",
|
|
13443
|
+
"setpts=PTS-lte(TB\\,0.001)",
|
|
13444
|
+
`fps=${ffmpegFps}:start_time=0:round=up`
|
|
13445
|
+
] : [];
|
|
13446
|
+
if (input.sdrToHdrTransfer) {
|
|
13447
|
+
tail2.push(SDR_TO_HDR_COLORSPACE_FILTER);
|
|
13448
|
+
}
|
|
13449
|
+
if (toneMapFrom) {
|
|
13450
|
+
tail2.push(hdrToSdrToneMapFilter(metadata.colorSpace ?? {}, toneMapFrom));
|
|
13451
|
+
}
|
|
13452
|
+
if (toneMappedToSdr || !input.isHdr && !input.sdrToHdrTransfer) {
|
|
13453
|
+
tail2.push(...sdrCanvasColourFilters(metadata, toneMappedToSdr));
|
|
13454
|
+
if (format === "jpg") {
|
|
13455
|
+
if (input.shownBox) tail2.push(halveToCoverScaleFilter(input.shownBox));
|
|
13456
|
+
tail2.push(SDR_JPEG_AS_BT601_FULL_RANGE_FILTER);
|
|
13457
|
+
}
|
|
13458
|
+
}
|
|
13459
|
+
return (seek) => [...head, ...sampling(seek), ...tail2];
|
|
13460
|
+
}
|
|
13461
|
+
var VIDEO_LAYER_TAIL_SLACK_SECONDS = 0.5;
|
|
13462
|
+
async function buildVideoLayerInput(videoPath, startTime, duration, fps, canvas, fit = "fill") {
|
|
13463
|
+
const metadata = await extractMediaMetadata(videoPath);
|
|
13464
|
+
if (startTime + duration > resolvePlayableVideoDuration(metadata) + VIDEO_LAYER_TAIL_SLACK_SECONDS || isHdrColorSpace(metadata.colorSpace) || metadata.isVFR || metadata.hasAlpha || codecMayHaveAlpha(metadata.videoCodec)) {
|
|
13465
|
+
return void 0;
|
|
13466
|
+
}
|
|
13467
|
+
const chain = videoFilterChain({
|
|
13468
|
+
metadata,
|
|
13469
|
+
format: "png",
|
|
13470
|
+
ffmpegFps: fpsToFfmpegArg(fps),
|
|
13471
|
+
sampleAtOutputFps: true,
|
|
13472
|
+
keepsHdrForChrome: false,
|
|
13473
|
+
isHdr: false
|
|
13474
|
+
});
|
|
13475
|
+
const filters = chain(startTime);
|
|
13476
|
+
if (metadata.width !== canvas.width || metadata.height !== canvas.height) {
|
|
13477
|
+
filters.push(
|
|
13478
|
+
fit === "cover" ? `scale=${canvas.width}:${canvas.height}:force_original_aspect_ratio=increase:flags=bicubic,crop=${canvas.width}:${canvas.height}` : `scale=${canvas.width}:${canvas.height}:flags=bicubic`
|
|
13479
|
+
);
|
|
13480
|
+
}
|
|
13481
|
+
filters.push(`tpad=stop_mode=clone:stop_duration=${VIDEO_LAYER_TAIL_SLACK_SECONDS * 2}`);
|
|
13482
|
+
return {
|
|
13483
|
+
inputArgs: [
|
|
13484
|
+
"-noaccurate_seek",
|
|
13485
|
+
"-ss",
|
|
13486
|
+
formatFfmpegSeconds(ffmpegSeekSeconds(metadata, startTime)),
|
|
13487
|
+
...urlInputArgs(videoPath),
|
|
13488
|
+
"-i",
|
|
13489
|
+
videoPath
|
|
13490
|
+
],
|
|
13491
|
+
filters
|
|
13492
|
+
};
|
|
13493
|
+
}
|
|
13299
13494
|
async function extractVideoFramesRangeUnredacted(videoPath, videoId, startTime, duration, options, signal, config, outputDirOverride) {
|
|
13300
13495
|
const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
|
|
13301
13496
|
const { outputDir, quality = 95 } = options;
|
|
@@ -13365,41 +13560,24 @@ async function extractVideoFramesRangeUnredacted(videoPath, videoId, startTime,
|
|
|
13365
13560
|
formatFfmpegSeconds(duration)
|
|
13366
13561
|
);
|
|
13367
13562
|
}
|
|
13368
|
-
const
|
|
13369
|
-
|
|
13370
|
-
|
|
13371
|
-
|
|
13372
|
-
|
|
13373
|
-
|
|
13374
|
-
|
|
13375
|
-
|
|
13376
|
-
|
|
13377
|
-
|
|
13378
|
-
|
|
13379
|
-
|
|
13380
|
-
`fps=${ffmpegFps}:start_time=0:round=up`
|
|
13381
|
-
] : [];
|
|
13382
|
-
if (options.sdrToHdrTransfer) {
|
|
13383
|
-
vfFilters.push(SDR_TO_HDR_COLORSPACE_FILTER);
|
|
13384
|
-
}
|
|
13385
|
-
if (toneMappedToSdr) {
|
|
13386
|
-
const frameColour = await readFirstFrameColour(videoPath);
|
|
13387
|
-
vfFilters.push(hdrToSdrToneMapFilter(metadata.colorSpace ?? {}, frameColour));
|
|
13388
|
-
}
|
|
13389
|
-
if (toneMappedToSdr || !isHdr && !options.sdrToHdrTransfer) {
|
|
13390
|
-
vfFilters.push(...sdrCanvasColourFilters(metadata, toneMappedToSdr));
|
|
13391
|
-
if (format === "jpg") {
|
|
13392
|
-
if (options.shownBox) vfFilters.push(halveToCoverScaleFilter(options.shownBox));
|
|
13393
|
-
vfFilters.push(SDR_JPEG_AS_BT601_FULL_RANGE_FILTER);
|
|
13394
|
-
}
|
|
13395
|
-
}
|
|
13563
|
+
const frameColour = toneMappedToSdr ? await readFirstFrameColour(videoPath) : void 0;
|
|
13564
|
+
const filtersFor = videoFilterChain({
|
|
13565
|
+
metadata,
|
|
13566
|
+
format,
|
|
13567
|
+
ffmpegFps,
|
|
13568
|
+
sampleAtOutputFps,
|
|
13569
|
+
keepsHdrForChrome,
|
|
13570
|
+
toneMapFrom: frameColour,
|
|
13571
|
+
isHdr,
|
|
13572
|
+
sdrToHdrTransfer: options.sdrToHdrTransfer,
|
|
13573
|
+
shownBox: options.shownBox
|
|
13574
|
+
});
|
|
13396
13575
|
const encodeArgs = ["-q:v", format === "jpg" ? String(Math.ceil((100 - quality) / 3)) : "0"];
|
|
13397
13576
|
if (format === "png") encodeArgs.push("-compression_level", "1");
|
|
13398
13577
|
encodeArgs.push("-y", outputPattern);
|
|
13399
13578
|
const runOptions = { signal, timeout: ffmpegProcessTimeout };
|
|
13400
13579
|
const filterArgsFor = (seek) => {
|
|
13401
|
-
const filters =
|
|
13402
|
-
filters.splice(samplingAt, 0, ...samplingFilters(seek));
|
|
13580
|
+
const filters = filtersFor(seek);
|
|
13403
13581
|
return filters.length > 0 ? ["-vf", filters.join(",")] : [];
|
|
13404
13582
|
};
|
|
13405
13583
|
const segmentFrames = Math.round(EXTRACTION_SEGMENT_SECONDS * fps);
|
|
@@ -14495,10 +14673,14 @@ async function extractAllVideoFrames(videos, baseDir, options, signal, config, c
|
|
|
14495
14673
|
breakdown.cacheGcBytesFreed = gcStats.evictedBytes;
|
|
14496
14674
|
breakdown.cacheAgedPartialsCleared = gcStats.agedPartialsRemoved;
|
|
14497
14675
|
}
|
|
14676
|
+
const srcById = new Map(videos.map((video) => [video.id, video.src]));
|
|
14498
14677
|
return {
|
|
14499
14678
|
success: errors.length === 0,
|
|
14500
14679
|
extracted,
|
|
14501
|
-
errors
|
|
14680
|
+
errors: errors.map((failure) => {
|
|
14681
|
+
const src = srcById.get(failure.videoId);
|
|
14682
|
+
return src === void 0 ? failure : { ...failure, source: videoExtractionSourceLabel(src, baseDir) };
|
|
14683
|
+
}),
|
|
14502
14684
|
totalFramesExtracted,
|
|
14503
14685
|
durationMs: Date.now() - startTime,
|
|
14504
14686
|
phaseBreakdown: breakdown
|
|
@@ -14685,6 +14867,25 @@ function createFrameLookupTable(videos, extracted, fps) {
|
|
|
14685
14867
|
return table;
|
|
14686
14868
|
}
|
|
14687
14869
|
|
|
14870
|
+
// ../engine/src/services/videoLayerPassthrough.ts
|
|
14871
|
+
var EDGE_EPSILON_SECONDS = 1e-3;
|
|
14872
|
+
function qualifyVideoLayer(videos, compositionDuration) {
|
|
14873
|
+
if (videos.length !== 1) return { qualifies: false, reason: "video_count" };
|
|
14874
|
+
const video = videos[0];
|
|
14875
|
+
if (!video) return { qualifies: false, reason: "video_count" };
|
|
14876
|
+
if (video.hidden) return { qualifies: false, reason: "hidden" };
|
|
14877
|
+
if (video.graded) return { qualifies: false, reason: "color_grading" };
|
|
14878
|
+
if (video.loop) return { qualifies: false, reason: "loop" };
|
|
14879
|
+
if (video.playbackRate !== void 0 && video.playbackRate !== 1) {
|
|
14880
|
+
return { qualifies: false, reason: "playback_rate" };
|
|
14881
|
+
}
|
|
14882
|
+
if (video.start > EDGE_EPSILON_SECONDS) return { qualifies: false, reason: "late_start" };
|
|
14883
|
+
if (video.end < compositionDuration - EDGE_EPSILON_SECONDS) {
|
|
14884
|
+
return { qualifies: false, reason: "ends_early" };
|
|
14885
|
+
}
|
|
14886
|
+
return { qualifies: true, video };
|
|
14887
|
+
}
|
|
14888
|
+
|
|
14688
14889
|
// ../engine/src/services/videoFrameInjector.ts
|
|
14689
14890
|
import { promises as fs } from "fs";
|
|
14690
14891
|
function createFrameSourceCache(entryLimit, bytesLimit, frameSrcResolver) {
|
|
@@ -15179,7 +15380,7 @@ async function queryElementStacking(page, nativeHdrIds) {
|
|
|
15179
15380
|
|
|
15180
15381
|
// ../engine/src/services/audioMixer.ts
|
|
15181
15382
|
import { closeSync as closeSync4, existsSync as existsSync11, mkdirSync as mkdirSync7, mkdtempSync as mkdtempSync9, openSync as openSync4, rmSync as rmSync7, writeFileSync as writeFileSync7 } from "fs";
|
|
15182
|
-
import { join as join16, dirname as dirname7, isAbsolute, relative } from "path";
|
|
15383
|
+
import { join as join16, dirname as dirname7, isAbsolute as isAbsolute2, relative as relative2 } from "path";
|
|
15183
15384
|
|
|
15184
15385
|
// ../engine/src/utils/notMediaPayload.ts
|
|
15185
15386
|
import { createHash as createHash3 } from "crypto";
|
|
@@ -16552,8 +16753,8 @@ function buildTrackInputFilter(track, index, volumeFilter, totalDuration, padToD
|
|
|
16552
16753
|
return `${filters}${padToDuration ? `,apad,asetpts=N/SR/TB,atrim=0:${formatFilterNumber(totalDuration)}` : ""}[a${index}]`;
|
|
16553
16754
|
}
|
|
16554
16755
|
function missingSourceMessage(elementId, src, baseDir, resolvedPath) {
|
|
16555
|
-
const relativePath =
|
|
16556
|
-
const insideProject = !relativePath.startsWith("..") && !
|
|
16756
|
+
const relativePath = relative2(baseDir, resolvedPath).replace(/\\/g, "/");
|
|
16757
|
+
const insideProject = !relativePath.startsWith("..") && !isAbsolute2(relativePath);
|
|
16557
16758
|
const authored = /^([\\/]|[A-Za-z]:)/.test(src) ? "" : `src="${src}" `;
|
|
16558
16759
|
return `Source not found for audio element ${elementId}: ${authored}resolved to ${insideProject ? relativePath : "a path outside the project"}`;
|
|
16559
16760
|
}
|
|
@@ -19181,6 +19382,7 @@ export {
|
|
|
19181
19382
|
parseImageElements,
|
|
19182
19383
|
sdrCanvasColourFilters,
|
|
19183
19384
|
extractVideoFramesRange,
|
|
19385
|
+
buildVideoLayerInput,
|
|
19184
19386
|
isVideoPastTimelineEnd,
|
|
19185
19387
|
rebaseVideoToWindow,
|
|
19186
19388
|
resolveTimelineExtractionWindow,
|
|
@@ -19194,6 +19396,7 @@ export {
|
|
|
19194
19396
|
analyzeClipMediaFit,
|
|
19195
19397
|
FrameLookupTable,
|
|
19196
19398
|
createFrameLookupTable,
|
|
19399
|
+
qualifyVideoLayer,
|
|
19197
19400
|
createVideoFrameInjector,
|
|
19198
19401
|
hideVideoElements,
|
|
19199
19402
|
showVideoElements,
|