@nodaro/shared 3.53.0 → 3.54.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-NR5IFEYC.js → chunk-25KAGSPT.js} +3 -3
- package/dist/{chunk-NR5IFEYC.js.map → chunk-25KAGSPT.js.map} +1 -1
- package/dist/{chunk-FBLMWA2R.cjs → chunk-2OYV6K7D.cjs} +4 -4
- package/dist/{chunk-FBLMWA2R.cjs.map → chunk-2OYV6K7D.cjs.map} +1 -1
- package/dist/{chunk-HDXAM5JW.cjs → chunk-2R74OU76.cjs} +19 -20
- package/dist/chunk-2R74OU76.cjs.map +1 -0
- package/dist/{chunk-WGXTTQNT.cjs → chunk-3633VD2M.cjs} +8 -8
- package/dist/{chunk-WGXTTQNT.cjs.map → chunk-3633VD2M.cjs.map} +1 -1
- package/dist/{chunk-DLSJTVS5.js → chunk-3CHOZ573.js} +19 -20
- package/dist/chunk-3CHOZ573.js.map +1 -0
- package/dist/{chunk-L6IGNCIV.js → chunk-5DVDHL7Y.js} +5 -5
- package/dist/{chunk-L6IGNCIV.js.map → chunk-5DVDHL7Y.js.map} +1 -1
- package/dist/{chunk-GJTRQOH6.cjs → chunk-5R6LTKE5.cjs} +5 -5
- package/dist/{chunk-GJTRQOH6.cjs.map → chunk-5R6LTKE5.cjs.map} +1 -1
- package/dist/{chunk-JKVCAEIZ.cjs → chunk-6HUWQLF2.cjs} +6 -6
- package/dist/{chunk-JKVCAEIZ.cjs.map → chunk-6HUWQLF2.cjs.map} +1 -1
- package/dist/{chunk-YCKHGHXN.js → chunk-6XVHYD5R.js} +11 -8
- package/dist/chunk-6XVHYD5R.js.map +1 -0
- package/dist/{chunk-EC4ZSWEN.cjs → chunk-AGTCHDG5.cjs} +6 -6
- package/dist/{chunk-EC4ZSWEN.cjs.map → chunk-AGTCHDG5.cjs.map} +1 -1
- package/dist/{chunk-LVXGMXJJ.cjs → chunk-ATWLKUAI.cjs} +4 -4
- package/dist/{chunk-LVXGMXJJ.cjs.map → chunk-ATWLKUAI.cjs.map} +1 -1
- package/dist/{chunk-NUFQFQ7C.js → chunk-C5S75476.js} +5 -5
- package/dist/{chunk-NUFQFQ7C.js.map → chunk-C5S75476.js.map} +1 -1
- package/dist/{chunk-6UHXNHKT.cjs → chunk-C6IQCKJT.cjs} +4 -4
- package/dist/{chunk-6UHXNHKT.cjs.map → chunk-C6IQCKJT.cjs.map} +1 -1
- package/dist/{chunk-RGXOHQWY.js → chunk-CZCOL3M5.js} +9 -5
- package/dist/chunk-CZCOL3M5.js.map +1 -0
- package/dist/{chunk-IVXWKDQ3.js → chunk-DUL5ZLTJ.js} +3 -3
- package/dist/{chunk-IVXWKDQ3.js.map → chunk-DUL5ZLTJ.js.map} +1 -1
- package/dist/{chunk-PRW25YSJ.js → chunk-E4YES25K.js} +4 -4
- package/dist/{chunk-PRW25YSJ.js.map → chunk-E4YES25K.js.map} +1 -1
- package/dist/{chunk-7MSA476R.cjs → chunk-FIYVKW7F.cjs} +12 -12
- package/dist/{chunk-7MSA476R.cjs.map → chunk-FIYVKW7F.cjs.map} +1 -1
- package/dist/{chunk-CQJYKSXF.js → chunk-FVVD6XY2.js} +5 -3
- package/dist/chunk-FVVD6XY2.js.map +1 -0
- package/dist/{chunk-HG5VWCZV.cjs → chunk-G7IUQKRU.cjs} +47 -47
- package/dist/{chunk-HG5VWCZV.cjs.map → chunk-G7IUQKRU.cjs.map} +1 -1
- package/dist/chunk-HD45Y7QU.cjs +27 -0
- package/dist/{chunk-WLQGTQC6.cjs.map → chunk-HD45Y7QU.cjs.map} +1 -1
- package/dist/{chunk-3YRH7UC5.js → chunk-HEF4BIMA.js} +4 -4
- package/dist/{chunk-3YRH7UC5.js.map → chunk-HEF4BIMA.js.map} +1 -1
- package/dist/{chunk-QPSEC6UO.js → chunk-HG3KKCJJ.js} +3 -3
- package/dist/{chunk-QPSEC6UO.js.map → chunk-HG3KKCJJ.js.map} +1 -1
- package/dist/{chunk-YYERNMW4.cjs → chunk-IPCWYKX5.cjs} +45 -45
- package/dist/{chunk-YYERNMW4.cjs.map → chunk-IPCWYKX5.cjs.map} +1 -1
- package/dist/{chunk-IB5B3EBD.js → chunk-JCNTNAZP.js} +13 -7
- package/dist/chunk-JCNTNAZP.js.map +1 -0
- package/dist/{chunk-NC4IMS67.cjs → chunk-KM35K2M5.cjs} +21 -21
- package/dist/{chunk-NC4IMS67.cjs.map → chunk-KM35K2M5.cjs.map} +1 -1
- package/dist/{chunk-YOFBLLVD.js → chunk-KMSEU6FK.js} +3 -3
- package/dist/{chunk-YOFBLLVD.js.map → chunk-KMSEU6FK.js.map} +1 -1
- package/dist/{chunk-2LNQ2MDO.js → chunk-LYWJAXPT.js} +3 -3
- package/dist/{chunk-2LNQ2MDO.js.map → chunk-LYWJAXPT.js.map} +1 -1
- package/dist/{chunk-GZXQ4T2W.cjs → chunk-M3SXUUWC.cjs} +12 -7
- package/dist/chunk-M3SXUUWC.cjs.map +1 -0
- package/dist/{chunk-6F6GGX2W.cjs → chunk-M7LU4NTI.cjs} +3 -2
- package/dist/chunk-M7LU4NTI.cjs.map +1 -0
- package/dist/{chunk-ZGPLTM5Y.js → chunk-MCIBQ5BF.js} +9 -9
- package/dist/{chunk-ZGPLTM5Y.js.map → chunk-MCIBQ5BF.js.map} +1 -1
- package/dist/{chunk-YCUFXCWH.js → chunk-MGJR5OXO.js} +5 -5
- package/dist/{chunk-YCUFXCWH.js.map → chunk-MGJR5OXO.js.map} +1 -1
- package/dist/{chunk-5HNJLFCZ.cjs → chunk-MTUNORQB.cjs} +11 -11
- package/dist/{chunk-5HNJLFCZ.cjs.map → chunk-MTUNORQB.cjs.map} +1 -1
- package/dist/{chunk-3SU2DRME.js → chunk-N3WL6IOJ.js} +3 -3
- package/dist/{chunk-3SU2DRME.js.map → chunk-N3WL6IOJ.js.map} +1 -1
- package/dist/{chunk-KADUPASC.cjs → chunk-OVIIJVXH.cjs} +21 -21
- package/dist/{chunk-KADUPASC.cjs.map → chunk-OVIIJVXH.cjs.map} +1 -1
- package/dist/{chunk-5PCI6M44.cjs → chunk-PONP5J5E.cjs} +5 -3
- package/dist/chunk-PONP5J5E.cjs.map +1 -0
- package/dist/{chunk-NTSGMX23.cjs → chunk-QP5JLSCJ.cjs} +9 -5
- package/dist/chunk-QP5JLSCJ.cjs.map +1 -0
- package/dist/{chunk-GLED2FVJ.cjs → chunk-SEEQ3H22.cjs} +5 -5
- package/dist/{chunk-GLED2FVJ.cjs.map → chunk-SEEQ3H22.cjs.map} +1 -1
- package/dist/{chunk-3WYOLP35.cjs → chunk-SZUDEFX2.cjs} +41 -41
- package/dist/{chunk-3WYOLP35.cjs.map → chunk-SZUDEFX2.cjs.map} +1 -1
- package/dist/{chunk-C4R7BTBQ.js → chunk-TADEEG5E.js} +3 -2
- package/dist/chunk-TADEEG5E.js.map +1 -0
- package/dist/{chunk-A7RJOQXI.js → chunk-UWMXMLMV.js} +3 -3
- package/dist/{chunk-A7RJOQXI.js.map → chunk-UWMXMLMV.js.map} +1 -1
- package/dist/{chunk-IORF5UGR.cjs → chunk-WVACGZYV.cjs} +29 -29
- package/dist/{chunk-IORF5UGR.cjs.map → chunk-WVACGZYV.cjs.map} +1 -1
- package/dist/{chunk-HT6PACYO.js → chunk-YBZQXZ6A.js} +3 -3
- package/dist/{chunk-HT6PACYO.js.map → chunk-YBZQXZ6A.js.map} +1 -1
- package/dist/{chunk-ANMCMSGR.cjs → chunk-YTXP4VHD.cjs} +13 -7
- package/dist/chunk-YTXP4VHD.cjs.map +1 -0
- package/dist/{chunk-7NRDX3KL.js → chunk-ZAK276QF.js} +6 -6
- package/dist/{chunk-7NRDX3KL.js.map → chunk-ZAK276QF.js.map} +1 -1
- package/dist/{chunk-DS4QUPGZ.js → chunk-ZKHQSG76.js} +4 -4
- package/dist/{chunk-DS4QUPGZ.js.map → chunk-ZKHQSG76.js.map} +1 -1
- package/dist/{chunk-6XYLFTLI.js → chunk-ZWB3NG4M.js} +3 -3
- package/dist/{chunk-6XYLFTLI.js.map → chunk-ZWB3NG4M.js.map} +1 -1
- package/dist/entries/apps.cjs +44 -44
- package/dist/entries/apps.js +9 -9
- package/dist/entries/credits.cjs +150 -150
- package/dist/entries/credits.js +7 -7
- package/dist/entries/i18n.cjs +11 -11
- package/dist/entries/i18n.d.cts +5 -4
- package/dist/entries/i18n.d.ts +5 -4
- package/dist/entries/i18n.js +1 -1
- package/dist/entries/media.cjs +81 -73
- package/dist/entries/media.d.cts +51 -84
- package/dist/entries/media.d.ts +51 -84
- package/dist/entries/media.js +2 -2
- package/dist/entries/model-catalog.cjs +66 -66
- package/dist/entries/model-catalog.js +4 -4
- package/dist/entries/models.cjs +277 -277
- package/dist/entries/models.js +5 -5
- package/dist/entries/nodes.cjs +208 -208
- package/dist/entries/nodes.js +10 -10
- package/dist/entries/pipeline.cjs +149 -149
- package/dist/entries/pipeline.js +3 -3
- package/dist/entries/ugc.cjs +71 -71
- package/dist/entries/ugc.js +4 -4
- package/dist/entries/video.cjs +141 -141
- package/dist/entries/video.d.cts +11 -10
- package/dist/entries/video.d.ts +11 -10
- package/dist/entries/video.js +5 -5
- package/dist/entries/workflow.cjs +99 -99
- package/dist/entries/workflow.js +2 -2
- package/dist/index.cjs +1268 -1260
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +23 -23
- package/package.json +1 -1
- package/src/__tests__/entry-matches-query.test.ts +34 -0
- package/src/__tests__/priced-clip-seconds.test.ts +193 -0
- package/src/__tests__/video-depth.test.ts +28 -16
- package/src/__tests__/video-face-mesh.test.ts +3 -2
- package/src/__tests__/video-link-needs.test.ts +23 -4
- package/src/__tests__/video-link.test.ts +1 -1
- package/src/__tests__/video-mask.test.ts +1 -1
- package/src/entries/media.ts +1 -0
- package/src/generated/unit-contracts.ts +1 -0
- package/src/i18n/index.ts +6 -4
- package/src/i18n/style.ar.ts +1 -1
- package/src/i18n/style.de.ts +1 -1
- package/src/i18n/style.es.ts +1 -1
- package/src/i18n/style.fr.ts +1 -1
- package/src/i18n/style.he.ts +1 -1
- package/src/i18n/style.hi.ts +1 -1
- package/src/i18n/style.ja.ts +1 -1
- package/src/i18n/style.ko.ts +1 -1
- package/src/i18n/style.pt-BR.ts +1 -1
- package/src/i18n/style.ru.ts +1 -1
- package/src/i18n/style.zh-CN.ts +1 -1
- package/src/mask-composite.ts +6 -5
- package/src/model-catalog.ts +17 -18
- package/src/priced-clip-seconds.ts +28 -0
- package/src/video-depth.ts +21 -19
- package/src/video-face-mesh.ts +5 -2
- package/src/video-link.ts +35 -15
- package/src/video-mask.ts +12 -7
- package/dist/chunk-5PCI6M44.cjs.map +0 -1
- package/dist/chunk-6F6GGX2W.cjs.map +0 -1
- package/dist/chunk-ANMCMSGR.cjs.map +0 -1
- package/dist/chunk-C4R7BTBQ.js.map +0 -1
- package/dist/chunk-CQJYKSXF.js.map +0 -1
- package/dist/chunk-DLSJTVS5.js.map +0 -1
- package/dist/chunk-GZXQ4T2W.cjs.map +0 -1
- package/dist/chunk-HDXAM5JW.cjs.map +0 -1
- package/dist/chunk-IB5B3EBD.js.map +0 -1
- package/dist/chunk-NTSGMX23.cjs.map +0 -1
- package/dist/chunk-RGXOHQWY.js.map +0 -1
- package/dist/chunk-WLQGTQC6.cjs +0 -27
- package/dist/chunk-YCKHGHXN.js.map +0 -1
package/dist/entries/media.d.cts
CHANGED
|
@@ -63,6 +63,24 @@ declare function describeMaskRegion(box: PixelBox, image: {
|
|
|
63
63
|
height: number;
|
|
64
64
|
}): MaskRegionDescriptor;
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* The whole seconds a clip is PRICED at by Video Depth (both providers), Video
|
|
68
|
+
* Mask, Mask Composite and the face mesh: its length rounded up, after ignoring
|
|
69
|
+
* up to {@link CLIP_PRICE_GRACE_SEC} past a whole second.
|
|
70
|
+
*
|
|
71
|
+
* A whole-second cut of a 29.97 or 23.976 fps clip can come out a little long:
|
|
72
|
+
* 12 s is 360 frames, a 12.012 s file. A quote reads the cut, a run measures the
|
|
73
|
+
* file, and both land on the same row through this one rule, wherever those steps
|
|
74
|
+
* are reserved, charged or quoted.
|
|
75
|
+
*
|
|
76
|
+
* It decides the price only. Each step's limits (the 300 s cap, the frame cap)
|
|
77
|
+
* read the clip's real length. Other models round as they always have.
|
|
78
|
+
*/
|
|
79
|
+
/** How far past a whole second a clip is still priced as that second. */
|
|
80
|
+
declare const CLIP_PRICE_GRACE_SEC = 0.05;
|
|
81
|
+
/** At least one second. The caller has checked that `sec` is a real length. */
|
|
82
|
+
declare function pricedClipSeconds(sec: number): number;
|
|
83
|
+
|
|
66
84
|
/**
|
|
67
85
|
* Video Depth — the one contract every layer reads: which providers exist and
|
|
68
86
|
* which lane serves each, which optional levers a provider honours, how long a
|
|
@@ -74,11 +92,11 @@ declare function describeMaskRegion(box: PixelBox, image: {
|
|
|
74
92
|
* produces from the inferno output (`videoDepthNeedsGrayscalePass`).
|
|
75
93
|
*
|
|
76
94
|
* Price rows are `model_pricing` rows (`<provider>:<n>s`); the credit amounts
|
|
77
|
-
* live there, never here.
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
* video-depth-anything: 0.4 s → `:1s`, 9 s → `:9s`, 9.2 s → `:10s`, 15.
|
|
81
|
-
* depth-anything-frames:
|
|
95
|
+
* live there, never here. Both providers have one row per whole second of the
|
|
96
|
+
* clip, up to the longest clip each accepts. Worked examples (repeated in
|
|
97
|
+
* docs/nodes/processing-video/video-depth.md):
|
|
98
|
+
* video-depth-anything: 0.4 s → `:1s`, 9 s → `:9s`, 9.2 s → `:10s`, 15.015 s → `:15s`, 15.06 s → `:16s`.
|
|
99
|
+
* depth-anything-frames: 0.4 s → `:1s`, 4 s → `:4s`, 4.1 s → `:5s`, 15.015 s → `:15s`, 15.06 s → `:16s`, 80 s → `:80s`.
|
|
82
100
|
*/
|
|
83
101
|
declare const VIDEO_DEPTH_PROVIDERS: readonly ["video-depth-anything", "depth-anything-frames"];
|
|
84
102
|
type VideoDepthProvider = (typeof VIDEO_DEPTH_PROVIDERS)[number];
|
|
@@ -128,21 +146,25 @@ declare function checkVideoDepthLength(provider: string, probe: {
|
|
|
128
146
|
ok: false;
|
|
129
147
|
message: string;
|
|
130
148
|
};
|
|
131
|
-
/**
|
|
149
|
+
/**
|
|
150
|
+
* The length buckets, in seconds, both providers were priced in before their
|
|
151
|
+
* per-second rows. A row is no longer picked from these: a clip's whole seconds
|
|
152
|
+
* name its row, so a `:15s` is the 15-second row and a `:120s` on Depth Anything
|
|
153
|
+
* per frame is past its limit. Each per-second row took its admin switches from
|
|
154
|
+
* the bucket that priced it (migrations 590 and 595).
|
|
155
|
+
*/
|
|
132
156
|
declare const VIDEO_DEPTH_BUCKETS: readonly [15, 30, 60, 120, 300];
|
|
133
157
|
/**
|
|
134
158
|
* The price row for a clip of `durationSec`.
|
|
135
159
|
*
|
|
136
|
-
*
|
|
137
|
-
* (`
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
* boundaries inclusive).
|
|
160
|
+
* One row per whole second of the clip on both lanes: the clip's length rounded
|
|
161
|
+
* UP (`pricedClipSeconds`: up to 0.05 s past a whole second is ignored first), so
|
|
162
|
+
* a clip under one second is priced as one. `video-depth-anything:1s` … `:300s`
|
|
163
|
+
* (decided 2026-11-03), `depth-anything-frames:1s` … `:80s` (decided 2026-11-04).
|
|
141
164
|
*
|
|
142
165
|
* Unknown, non-positive or longer than the provider accepts → the provider's
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
* run on it can be charged, never a row a run could not reach.
|
|
166
|
+
* longest clip (fal `:300s`, Replicate `:80s`), its highest REACHABLE row — the
|
|
167
|
+
* most a run on it can be charged, never a row a run could not reach.
|
|
146
168
|
*/
|
|
147
169
|
declare function videoDepthCreditId(provider: string, durationSec: number | null | undefined): string;
|
|
148
170
|
|
|
@@ -304,24 +326,6 @@ declare const AUDIO_FX_PRESET_LABELS: Record<AudioFxPreset, string>;
|
|
|
304
326
|
/** Presets that apply convolution reverb (afir + inline-synth IR). */
|
|
305
327
|
declare const AUDIO_FX_REVERB_PRESETS: ReadonlySet<AudioFxPreset>;
|
|
306
328
|
|
|
307
|
-
/**
|
|
308
|
-
* Video Mask — text-prompted video segmentation (SAM 3.1 / SAM 3). The wire contract of
|
|
309
|
-
* the `video-mask` node, `POST /v1/video-mask`, the `video_mask` MCP verb,
|
|
310
|
-
* `client.media.videoMask` and `nodaro media video-mask`, defined ONCE:
|
|
311
|
-
* - every bound the route schema, the node panel and the MCP verb read;
|
|
312
|
-
* - `videoMaskBilledSeconds`: the length a run is priced at — the clip's
|
|
313
|
-
* length at the 30 fps basis, so a 60 fps clip is priced at twice its
|
|
314
|
-
* length (the segmentation works per FRAME);
|
|
315
|
-
* - `videoMaskCreditId`: which price row (`model_pricing`) that length is
|
|
316
|
-
* charged from. The credit amounts live in the rows, never here.
|
|
317
|
-
*
|
|
318
|
-
* Worked examples (repeated in docs/nodes/ai-video/video-mask.md):
|
|
319
|
-
* 4 s at 30 fps → `sam-3.1-video:5s`, 12 s at 24 fps → `sam-3.1-video:15s`,
|
|
320
|
-
* 10 s at 60 fps (priced as 20 s) → `sam-3.1-video:30s`, 45 s at 30 fps → `sam-3.1-video:60s`,
|
|
321
|
-
* 100 s at 30 fps → `sam-3.1-video:120s`, 4 min at 30 fps on SAM 3 → `sam-3-video:240s`.
|
|
322
|
-
*
|
|
323
|
-
* Wire contract only — no I/O.
|
|
324
|
-
*/
|
|
325
329
|
/** Segmentation models a Video Mask run can use. SAM 3.1 (the default)
|
|
326
330
|
* tracks several objects in one pass and runs faster; SAM 3 costs half. */
|
|
327
331
|
declare const VIDEO_MASK_PROVIDERS: readonly ["sam-3.1", "sam-3"];
|
|
@@ -461,14 +465,17 @@ declare function videoMaskCreditIds(provider?: VideoMaskProvider): string[];
|
|
|
461
465
|
/**
|
|
462
466
|
* The length a clip is priced at: its duration at the 30 fps basis. A clip
|
|
463
467
|
* at or under 30 fps is priced at its own length; a 60 fps clip at twice it.
|
|
464
|
-
* An unknown frame rate counts as the basis.
|
|
468
|
+
* An unknown frame rate counts as the basis. The cap reads this figure; the
|
|
469
|
+
* price row reads it through `pricedClipSeconds`.
|
|
465
470
|
*/
|
|
466
471
|
declare function videoMaskBilledSeconds(durationSec: number, fps?: number | null): number;
|
|
467
472
|
/**
|
|
468
|
-
* The price row for a clip priced at `billedSec` seconds
|
|
469
|
-
*
|
|
470
|
-
*
|
|
471
|
-
*
|
|
473
|
+
* The price row for a clip priced at `billedSec` seconds: the smallest that
|
|
474
|
+
* holds it, after `pricedClipSeconds` (up to 0.05 s past a row's length stays in
|
|
475
|
+
* that row). An unknown or non-positive length prices the LONGEST row (a clip
|
|
476
|
+
* the route could not measure is refused, so this is only the pre-run quote for
|
|
477
|
+
* a clip whose length is not known yet); anything past the cap prices the last
|
|
478
|
+
* row.
|
|
472
479
|
*/
|
|
473
480
|
declare function videoMaskCreditId(billedSec: number | null | undefined, provider?: VideoMaskProvider): string;
|
|
474
481
|
/** Narrow an arbitrary value to a known provider, falling back to the default. */
|
|
@@ -522,19 +529,6 @@ interface VideoMaskRequest {
|
|
|
522
529
|
readonly redetectEverySec?: number;
|
|
523
530
|
}
|
|
524
531
|
|
|
525
|
-
/**
|
|
526
|
-
* Video Face Mesh (`POST /v1/video-face-mesh`, job type `video-face-mesh`):
|
|
527
|
-
* thin GRAY face lines — a wireframe, and darker eye and lip outlines, each a
|
|
528
|
-
* tone of the picture under it — drawn on the faces of a clip, frame for
|
|
529
|
-
* frame. An internal step of Nodaro Motion's face masking: the lines go on
|
|
530
|
-
* the masked (or depth) clip so the video model still sees where the mouth
|
|
531
|
-
* and the eyes are. A request may draw only the eye and lip outlines, or
|
|
532
|
-
* only the lip outline (`parts`).
|
|
533
|
-
*
|
|
534
|
-
* Priced by the clip's length at the 30 fps basis Video Mask uses
|
|
535
|
-
* (`videoMaskBilledSeconds`), one row per length bucket.
|
|
536
|
-
*/
|
|
537
|
-
|
|
538
532
|
/** The route, as the Cast Swap engine calls it. */
|
|
539
533
|
declare const VIDEO_FACE_MESH_PATH = "/v1/video-face-mesh";
|
|
540
534
|
declare const VIDEO_FACE_MESH_LIMITS: {
|
|
@@ -576,7 +570,8 @@ declare const VIDEO_FACE_MESH_RECIPE = "2026-11-03";
|
|
|
576
570
|
declare function videoFaceMeshCreditIds(): string[];
|
|
577
571
|
/**
|
|
578
572
|
* The price row for a clip priced at `billedSec` seconds: the smallest bucket
|
|
579
|
-
* that holds it
|
|
573
|
+
* that holds it, after `pricedClipSeconds` (up to 0.05 s past a bucket's length
|
|
574
|
+
* stays in that bucket). An unknown or non-positive length, or one past the cap,
|
|
580
575
|
* prices the LONGEST row (the route measures every clip and refuses one past
|
|
581
576
|
* the cap, so this is only ever a ceiling).
|
|
582
577
|
*/
|
|
@@ -674,35 +669,6 @@ interface GenerateMaskOutput {
|
|
|
674
669
|
readonly imageUrl: string;
|
|
675
670
|
}
|
|
676
671
|
|
|
677
|
-
/**
|
|
678
|
-
* Mask Composite — place a foreground video over a background video through a
|
|
679
|
-
* mask video (white = keep the foreground, black = show the background). The
|
|
680
|
-
* wire contract of the `mask-composite` node, `POST /v1/mask-composite`, the
|
|
681
|
-
* `mask_composite` MCP verb, `client.media.maskComposite` and
|
|
682
|
-
* `nodaro media mask-composite`, defined ONCE. Pair it with Video Mask, whose
|
|
683
|
-
* output is exactly such a mask.
|
|
684
|
-
*
|
|
685
|
-
* The render follows the FOREGROUND: its size, frame rate and length. The
|
|
686
|
-
* background is fitted to that frame (`backgroundFit`) and loops when shorter;
|
|
687
|
-
* the mask is stretched to the frame and holds its last frame when shorter.
|
|
688
|
-
*
|
|
689
|
-
* `fill` picks what fills the masked area. `"video"` (the default) is the
|
|
690
|
-
* foreground, as above. `"pixelate"` and `"blur"` fill it with the BACKGROUND
|
|
691
|
-
* itself, pixelated or blurred: there is no foreground then (a sent
|
|
692
|
-
* `foregroundUrl` is ignored), so the render follows the BACKGROUND (its size,
|
|
693
|
-
* frame rate and length; `backgroundFit` has nothing to fit), and the run is
|
|
694
|
-
* priced on the background's length. With no foreground the result always
|
|
695
|
-
* carries the background's sound — `audioSource` is ignored there
|
|
696
|
-
* ({@link maskCompositeEffectiveAudioSource}); the canvas hides the control.
|
|
697
|
-
*
|
|
698
|
-
* Priced per started 5 seconds of the result (the foreground's length), like
|
|
699
|
-
* Trim / Loop / Combine Videos: the node's own `model_pricing` row is ONE unit
|
|
700
|
-
* (`maskCompositeUnits` counts them). Worked examples (repeated in
|
|
701
|
-
* docs/nodes/processing-video/mask-composite.md, at the 10-credit row):
|
|
702
|
-
* 3 s → 1 unit (10), 10 s → 2 units (20), 61 s → 13 units (130), 5 min → 60 units (600).
|
|
703
|
-
*
|
|
704
|
-
* Wire contract only — no I/O.
|
|
705
|
-
*/
|
|
706
672
|
/** How the background is fitted to the foreground's frame. */
|
|
707
673
|
declare const MASK_COMPOSITE_BACKGROUND_FITS: readonly ["cover", "contain", "stretch"];
|
|
708
674
|
type MaskCompositeBackgroundFit = (typeof MASK_COMPOSITE_BACKGROUND_FITS)[number];
|
|
@@ -738,9 +704,10 @@ declare const MASK_COMPOSITE_BOUNDS: {
|
|
|
738
704
|
declare const MASK_COMPOSITE_UNIT_SEC = 5;
|
|
739
705
|
/**
|
|
740
706
|
* Pricing units for a result `durationSec` long: one per started 5 seconds,
|
|
741
|
-
* at least one
|
|
742
|
-
*
|
|
743
|
-
*
|
|
707
|
+
* at least one, after `pricedClipSeconds` (up to 0.05 s past a whole second is
|
|
708
|
+
* ignored, so a 10.01 s result is 2 units, not 3). An unknown length counts the
|
|
709
|
+
* longest result a run accepts (an upper bound — the pre-run quote for a clip
|
|
710
|
+
* whose length is not known yet; every run measures its foreground).
|
|
744
711
|
*/
|
|
745
712
|
declare function maskCompositeUnits(durationSec: number | null | undefined): number;
|
|
746
713
|
declare const MASK_COMPOSITE_DEFAULTS: {
|
|
@@ -880,4 +847,4 @@ declare function overlayVariantHandle(platformId: string): string;
|
|
|
880
847
|
/** The platform id a variant handle names, or null for any other handle. */
|
|
881
848
|
declare function overlayVariantIdFromHandle(handle: string | null | undefined): string | null;
|
|
882
849
|
|
|
883
|
-
export { AUDIO_FX_PRESETS, AUDIO_FX_PRESET_LABELS, AUDIO_FX_PRESET_SET, AUDIO_FX_REVERB_PRESETS, type AudioFxPreset, DEFAULT_VIDEO_MASK_PROVIDER, FAL_VIDEO_DEPTH_PROVIDERS, FREECUT_EXPORT_COMPLETE, FREECUT_EXPORT_PROGRESS, FREECUT_READY, FREECUT_REQUEST_IMPORT, type FreecutExportCompletePayload, type FreecutExportProgressPayload, type FreecutImportFile, type FreecutRequestImportPayload, GENERATE_MASK_LIMITS, type GenerateMaskOutput, type GenerateMaskRequest, LEGACY_LOTTIE_HOST_REMAP, LOTTIE_OVERLAY_CATALOG, LOTTIE_SLOT_FIELD_PREFIX, type LottieOverlayCatalogEntry, type LottieSlotField, MASK_COMPOSITE_AUDIO_SOURCES, MASK_COMPOSITE_BACKGROUND_FITS, MASK_COMPOSITE_BOUNDS, MASK_COMPOSITE_DEFAULTS, MASK_COMPOSITE_FILLS, MASK_COMPOSITE_UNIT_SEC, type MaskCompositeAudioSource, type MaskCompositeBackgroundFit, type MaskCompositeFill, type MaskCompositeRequest, type MaskCompositeSettings, type MaskRegionDescriptor, NODARO_IMPORT_FILES, NODARO_LOAD_TIMELINE, NODARO_LOAD_VIDEO, NODARO_RESET_PROJECT, type NodaroLoadTimelinePayload, type NodaroLoadVideoPayload, OVERLAY_MAX_VARIANTS, OVERLAY_PLATFORMS, OVERLAY_PLATFORM_IDS, OVERLAY_SHAPES, OVERLAY_VARIANT_HANDLE_PREFIX, type OverlayPlatformId, type OverlayPlatformPreset, type OverlayPlatformZone, type OverlayShape, type OverlayShapeElement, type PixelBox, REPLICATE_VIDEO_DEPTH_PROVIDERS, type SlotControlDescriptor, type SlotControlKind, VIDEO_DEPTH_BUCKETS, VIDEO_DEPTH_COLORMAPS, VIDEO_DEPTH_LIMITS, VIDEO_DEPTH_MODEL_SIZES, VIDEO_DEPTH_PROVIDERS, VIDEO_DEPTH_RESOLUTIONS, VIDEO_FACE_MESH_LIMITS, VIDEO_FACE_MESH_PARTS, VIDEO_FACE_MESH_PATH, VIDEO_FACE_MESH_RECIPE, VIDEO_MASK_DEFAULTS, VIDEO_MASK_LIMITS, VIDEO_MASK_PROVIDERS, VIDEO_MASK_RECIPE, type VideoDepthColormap, type VideoDepthLever, type VideoDepthModelSize, type VideoDepthProvider, type VideoDepthResolution, type VideoFaceMeshOutput, type VideoFaceMeshParts, type VideoFaceMeshRequest, type VideoMaskProvider, type VideoMaskRequest, type VideoMaskZone, applySlots, checkVideoDepthLength, deriveLottieSlotFields, describeMaskRegion, describeSlotControl, hexToRgbaArray, humanizeSlotSid, listSlotSids, maskCompositeEffectiveAudioSource, maskCompositeFillOf, maskCompositeLeadHandle, maskCompositeUnits, maskCompositeUsesForeground, normalizeLottieLayers, overlayPlatformById, overlayShapeElement, overlayVariantHandle, overlayVariantIdFromHandle, resolveLottieOverlaySrc, resolveMaskCompositeSettings, resolveVideoDepthColormap, resolveVideoDepthModelSize, resolveVideoDepthProvider, resolveVideoMaskProvider, resolveVideoMaskRedetectSec, resolveVideoMaskZone, rgbaArrayToHex, videoDepthColormaps, videoDepthCreditId, videoDepthLevers, videoDepthNeedsGrayscalePass, videoFaceMeshCreditId, videoFaceMeshCreditIds, videoMaskBilledSeconds, videoMaskCreditId, videoMaskCreditIds };
|
|
850
|
+
export { AUDIO_FX_PRESETS, AUDIO_FX_PRESET_LABELS, AUDIO_FX_PRESET_SET, AUDIO_FX_REVERB_PRESETS, type AudioFxPreset, CLIP_PRICE_GRACE_SEC, DEFAULT_VIDEO_MASK_PROVIDER, FAL_VIDEO_DEPTH_PROVIDERS, FREECUT_EXPORT_COMPLETE, FREECUT_EXPORT_PROGRESS, FREECUT_READY, FREECUT_REQUEST_IMPORT, type FreecutExportCompletePayload, type FreecutExportProgressPayload, type FreecutImportFile, type FreecutRequestImportPayload, GENERATE_MASK_LIMITS, type GenerateMaskOutput, type GenerateMaskRequest, LEGACY_LOTTIE_HOST_REMAP, LOTTIE_OVERLAY_CATALOG, LOTTIE_SLOT_FIELD_PREFIX, type LottieOverlayCatalogEntry, type LottieSlotField, MASK_COMPOSITE_AUDIO_SOURCES, MASK_COMPOSITE_BACKGROUND_FITS, MASK_COMPOSITE_BOUNDS, MASK_COMPOSITE_DEFAULTS, MASK_COMPOSITE_FILLS, MASK_COMPOSITE_UNIT_SEC, type MaskCompositeAudioSource, type MaskCompositeBackgroundFit, type MaskCompositeFill, type MaskCompositeRequest, type MaskCompositeSettings, type MaskRegionDescriptor, NODARO_IMPORT_FILES, NODARO_LOAD_TIMELINE, NODARO_LOAD_VIDEO, NODARO_RESET_PROJECT, type NodaroLoadTimelinePayload, type NodaroLoadVideoPayload, OVERLAY_MAX_VARIANTS, OVERLAY_PLATFORMS, OVERLAY_PLATFORM_IDS, OVERLAY_SHAPES, OVERLAY_VARIANT_HANDLE_PREFIX, type OverlayPlatformId, type OverlayPlatformPreset, type OverlayPlatformZone, type OverlayShape, type OverlayShapeElement, type PixelBox, REPLICATE_VIDEO_DEPTH_PROVIDERS, type SlotControlDescriptor, type SlotControlKind, VIDEO_DEPTH_BUCKETS, VIDEO_DEPTH_COLORMAPS, VIDEO_DEPTH_LIMITS, VIDEO_DEPTH_MODEL_SIZES, VIDEO_DEPTH_PROVIDERS, VIDEO_DEPTH_RESOLUTIONS, VIDEO_FACE_MESH_LIMITS, VIDEO_FACE_MESH_PARTS, VIDEO_FACE_MESH_PATH, VIDEO_FACE_MESH_RECIPE, VIDEO_MASK_DEFAULTS, VIDEO_MASK_LIMITS, VIDEO_MASK_PROVIDERS, VIDEO_MASK_RECIPE, type VideoDepthColormap, type VideoDepthLever, type VideoDepthModelSize, type VideoDepthProvider, type VideoDepthResolution, type VideoFaceMeshOutput, type VideoFaceMeshParts, type VideoFaceMeshRequest, type VideoMaskProvider, type VideoMaskRequest, type VideoMaskZone, applySlots, checkVideoDepthLength, deriveLottieSlotFields, describeMaskRegion, describeSlotControl, hexToRgbaArray, humanizeSlotSid, listSlotSids, maskCompositeEffectiveAudioSource, maskCompositeFillOf, maskCompositeLeadHandle, maskCompositeUnits, maskCompositeUsesForeground, normalizeLottieLayers, overlayPlatformById, overlayShapeElement, overlayVariantHandle, overlayVariantIdFromHandle, pricedClipSeconds, resolveLottieOverlaySrc, resolveMaskCompositeSettings, resolveVideoDepthColormap, resolveVideoDepthModelSize, resolveVideoDepthProvider, resolveVideoMaskProvider, resolveVideoMaskRedetectSec, resolveVideoMaskZone, rgbaArrayToHex, videoDepthColormaps, videoDepthCreditId, videoDepthLevers, videoDepthNeedsGrayscalePass, videoFaceMeshCreditId, videoFaceMeshCreditIds, videoMaskBilledSeconds, videoMaskCreditId, videoMaskCreditIds };
|
package/dist/entries/media.d.ts
CHANGED
|
@@ -63,6 +63,24 @@ declare function describeMaskRegion(box: PixelBox, image: {
|
|
|
63
63
|
height: number;
|
|
64
64
|
}): MaskRegionDescriptor;
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* The whole seconds a clip is PRICED at by Video Depth (both providers), Video
|
|
68
|
+
* Mask, Mask Composite and the face mesh: its length rounded up, after ignoring
|
|
69
|
+
* up to {@link CLIP_PRICE_GRACE_SEC} past a whole second.
|
|
70
|
+
*
|
|
71
|
+
* A whole-second cut of a 29.97 or 23.976 fps clip can come out a little long:
|
|
72
|
+
* 12 s is 360 frames, a 12.012 s file. A quote reads the cut, a run measures the
|
|
73
|
+
* file, and both land on the same row through this one rule, wherever those steps
|
|
74
|
+
* are reserved, charged or quoted.
|
|
75
|
+
*
|
|
76
|
+
* It decides the price only. Each step's limits (the 300 s cap, the frame cap)
|
|
77
|
+
* read the clip's real length. Other models round as they always have.
|
|
78
|
+
*/
|
|
79
|
+
/** How far past a whole second a clip is still priced as that second. */
|
|
80
|
+
declare const CLIP_PRICE_GRACE_SEC = 0.05;
|
|
81
|
+
/** At least one second. The caller has checked that `sec` is a real length. */
|
|
82
|
+
declare function pricedClipSeconds(sec: number): number;
|
|
83
|
+
|
|
66
84
|
/**
|
|
67
85
|
* Video Depth — the one contract every layer reads: which providers exist and
|
|
68
86
|
* which lane serves each, which optional levers a provider honours, how long a
|
|
@@ -74,11 +92,11 @@ declare function describeMaskRegion(box: PixelBox, image: {
|
|
|
74
92
|
* produces from the inferno output (`videoDepthNeedsGrayscalePass`).
|
|
75
93
|
*
|
|
76
94
|
* Price rows are `model_pricing` rows (`<provider>:<n>s`); the credit amounts
|
|
77
|
-
* live there, never here.
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
* video-depth-anything: 0.4 s → `:1s`, 9 s → `:9s`, 9.2 s → `:10s`, 15.
|
|
81
|
-
* depth-anything-frames:
|
|
95
|
+
* live there, never here. Both providers have one row per whole second of the
|
|
96
|
+
* clip, up to the longest clip each accepts. Worked examples (repeated in
|
|
97
|
+
* docs/nodes/processing-video/video-depth.md):
|
|
98
|
+
* video-depth-anything: 0.4 s → `:1s`, 9 s → `:9s`, 9.2 s → `:10s`, 15.015 s → `:15s`, 15.06 s → `:16s`.
|
|
99
|
+
* depth-anything-frames: 0.4 s → `:1s`, 4 s → `:4s`, 4.1 s → `:5s`, 15.015 s → `:15s`, 15.06 s → `:16s`, 80 s → `:80s`.
|
|
82
100
|
*/
|
|
83
101
|
declare const VIDEO_DEPTH_PROVIDERS: readonly ["video-depth-anything", "depth-anything-frames"];
|
|
84
102
|
type VideoDepthProvider = (typeof VIDEO_DEPTH_PROVIDERS)[number];
|
|
@@ -128,21 +146,25 @@ declare function checkVideoDepthLength(provider: string, probe: {
|
|
|
128
146
|
ok: false;
|
|
129
147
|
message: string;
|
|
130
148
|
};
|
|
131
|
-
/**
|
|
149
|
+
/**
|
|
150
|
+
* The length buckets, in seconds, both providers were priced in before their
|
|
151
|
+
* per-second rows. A row is no longer picked from these: a clip's whole seconds
|
|
152
|
+
* name its row, so a `:15s` is the 15-second row and a `:120s` on Depth Anything
|
|
153
|
+
* per frame is past its limit. Each per-second row took its admin switches from
|
|
154
|
+
* the bucket that priced it (migrations 590 and 595).
|
|
155
|
+
*/
|
|
132
156
|
declare const VIDEO_DEPTH_BUCKETS: readonly [15, 30, 60, 120, 300];
|
|
133
157
|
/**
|
|
134
158
|
* The price row for a clip of `durationSec`.
|
|
135
159
|
*
|
|
136
|
-
*
|
|
137
|
-
* (`
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
* boundaries inclusive).
|
|
160
|
+
* One row per whole second of the clip on both lanes: the clip's length rounded
|
|
161
|
+
* UP (`pricedClipSeconds`: up to 0.05 s past a whole second is ignored first), so
|
|
162
|
+
* a clip under one second is priced as one. `video-depth-anything:1s` … `:300s`
|
|
163
|
+
* (decided 2026-11-03), `depth-anything-frames:1s` … `:80s` (decided 2026-11-04).
|
|
141
164
|
*
|
|
142
165
|
* Unknown, non-positive or longer than the provider accepts → the provider's
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
* run on it can be charged, never a row a run could not reach.
|
|
166
|
+
* longest clip (fal `:300s`, Replicate `:80s`), its highest REACHABLE row — the
|
|
167
|
+
* most a run on it can be charged, never a row a run could not reach.
|
|
146
168
|
*/
|
|
147
169
|
declare function videoDepthCreditId(provider: string, durationSec: number | null | undefined): string;
|
|
148
170
|
|
|
@@ -304,24 +326,6 @@ declare const AUDIO_FX_PRESET_LABELS: Record<AudioFxPreset, string>;
|
|
|
304
326
|
/** Presets that apply convolution reverb (afir + inline-synth IR). */
|
|
305
327
|
declare const AUDIO_FX_REVERB_PRESETS: ReadonlySet<AudioFxPreset>;
|
|
306
328
|
|
|
307
|
-
/**
|
|
308
|
-
* Video Mask — text-prompted video segmentation (SAM 3.1 / SAM 3). The wire contract of
|
|
309
|
-
* the `video-mask` node, `POST /v1/video-mask`, the `video_mask` MCP verb,
|
|
310
|
-
* `client.media.videoMask` and `nodaro media video-mask`, defined ONCE:
|
|
311
|
-
* - every bound the route schema, the node panel and the MCP verb read;
|
|
312
|
-
* - `videoMaskBilledSeconds`: the length a run is priced at — the clip's
|
|
313
|
-
* length at the 30 fps basis, so a 60 fps clip is priced at twice its
|
|
314
|
-
* length (the segmentation works per FRAME);
|
|
315
|
-
* - `videoMaskCreditId`: which price row (`model_pricing`) that length is
|
|
316
|
-
* charged from. The credit amounts live in the rows, never here.
|
|
317
|
-
*
|
|
318
|
-
* Worked examples (repeated in docs/nodes/ai-video/video-mask.md):
|
|
319
|
-
* 4 s at 30 fps → `sam-3.1-video:5s`, 12 s at 24 fps → `sam-3.1-video:15s`,
|
|
320
|
-
* 10 s at 60 fps (priced as 20 s) → `sam-3.1-video:30s`, 45 s at 30 fps → `sam-3.1-video:60s`,
|
|
321
|
-
* 100 s at 30 fps → `sam-3.1-video:120s`, 4 min at 30 fps on SAM 3 → `sam-3-video:240s`.
|
|
322
|
-
*
|
|
323
|
-
* Wire contract only — no I/O.
|
|
324
|
-
*/
|
|
325
329
|
/** Segmentation models a Video Mask run can use. SAM 3.1 (the default)
|
|
326
330
|
* tracks several objects in one pass and runs faster; SAM 3 costs half. */
|
|
327
331
|
declare const VIDEO_MASK_PROVIDERS: readonly ["sam-3.1", "sam-3"];
|
|
@@ -461,14 +465,17 @@ declare function videoMaskCreditIds(provider?: VideoMaskProvider): string[];
|
|
|
461
465
|
/**
|
|
462
466
|
* The length a clip is priced at: its duration at the 30 fps basis. A clip
|
|
463
467
|
* at or under 30 fps is priced at its own length; a 60 fps clip at twice it.
|
|
464
|
-
* An unknown frame rate counts as the basis.
|
|
468
|
+
* An unknown frame rate counts as the basis. The cap reads this figure; the
|
|
469
|
+
* price row reads it through `pricedClipSeconds`.
|
|
465
470
|
*/
|
|
466
471
|
declare function videoMaskBilledSeconds(durationSec: number, fps?: number | null): number;
|
|
467
472
|
/**
|
|
468
|
-
* The price row for a clip priced at `billedSec` seconds
|
|
469
|
-
*
|
|
470
|
-
*
|
|
471
|
-
*
|
|
473
|
+
* The price row for a clip priced at `billedSec` seconds: the smallest that
|
|
474
|
+
* holds it, after `pricedClipSeconds` (up to 0.05 s past a row's length stays in
|
|
475
|
+
* that row). An unknown or non-positive length prices the LONGEST row (a clip
|
|
476
|
+
* the route could not measure is refused, so this is only the pre-run quote for
|
|
477
|
+
* a clip whose length is not known yet); anything past the cap prices the last
|
|
478
|
+
* row.
|
|
472
479
|
*/
|
|
473
480
|
declare function videoMaskCreditId(billedSec: number | null | undefined, provider?: VideoMaskProvider): string;
|
|
474
481
|
/** Narrow an arbitrary value to a known provider, falling back to the default. */
|
|
@@ -522,19 +529,6 @@ interface VideoMaskRequest {
|
|
|
522
529
|
readonly redetectEverySec?: number;
|
|
523
530
|
}
|
|
524
531
|
|
|
525
|
-
/**
|
|
526
|
-
* Video Face Mesh (`POST /v1/video-face-mesh`, job type `video-face-mesh`):
|
|
527
|
-
* thin GRAY face lines — a wireframe, and darker eye and lip outlines, each a
|
|
528
|
-
* tone of the picture under it — drawn on the faces of a clip, frame for
|
|
529
|
-
* frame. An internal step of Nodaro Motion's face masking: the lines go on
|
|
530
|
-
* the masked (or depth) clip so the video model still sees where the mouth
|
|
531
|
-
* and the eyes are. A request may draw only the eye and lip outlines, or
|
|
532
|
-
* only the lip outline (`parts`).
|
|
533
|
-
*
|
|
534
|
-
* Priced by the clip's length at the 30 fps basis Video Mask uses
|
|
535
|
-
* (`videoMaskBilledSeconds`), one row per length bucket.
|
|
536
|
-
*/
|
|
537
|
-
|
|
538
532
|
/** The route, as the Cast Swap engine calls it. */
|
|
539
533
|
declare const VIDEO_FACE_MESH_PATH = "/v1/video-face-mesh";
|
|
540
534
|
declare const VIDEO_FACE_MESH_LIMITS: {
|
|
@@ -576,7 +570,8 @@ declare const VIDEO_FACE_MESH_RECIPE = "2026-11-03";
|
|
|
576
570
|
declare function videoFaceMeshCreditIds(): string[];
|
|
577
571
|
/**
|
|
578
572
|
* The price row for a clip priced at `billedSec` seconds: the smallest bucket
|
|
579
|
-
* that holds it
|
|
573
|
+
* that holds it, after `pricedClipSeconds` (up to 0.05 s past a bucket's length
|
|
574
|
+
* stays in that bucket). An unknown or non-positive length, or one past the cap,
|
|
580
575
|
* prices the LONGEST row (the route measures every clip and refuses one past
|
|
581
576
|
* the cap, so this is only ever a ceiling).
|
|
582
577
|
*/
|
|
@@ -674,35 +669,6 @@ interface GenerateMaskOutput {
|
|
|
674
669
|
readonly imageUrl: string;
|
|
675
670
|
}
|
|
676
671
|
|
|
677
|
-
/**
|
|
678
|
-
* Mask Composite — place a foreground video over a background video through a
|
|
679
|
-
* mask video (white = keep the foreground, black = show the background). The
|
|
680
|
-
* wire contract of the `mask-composite` node, `POST /v1/mask-composite`, the
|
|
681
|
-
* `mask_composite` MCP verb, `client.media.maskComposite` and
|
|
682
|
-
* `nodaro media mask-composite`, defined ONCE. Pair it with Video Mask, whose
|
|
683
|
-
* output is exactly such a mask.
|
|
684
|
-
*
|
|
685
|
-
* The render follows the FOREGROUND: its size, frame rate and length. The
|
|
686
|
-
* background is fitted to that frame (`backgroundFit`) and loops when shorter;
|
|
687
|
-
* the mask is stretched to the frame and holds its last frame when shorter.
|
|
688
|
-
*
|
|
689
|
-
* `fill` picks what fills the masked area. `"video"` (the default) is the
|
|
690
|
-
* foreground, as above. `"pixelate"` and `"blur"` fill it with the BACKGROUND
|
|
691
|
-
* itself, pixelated or blurred: there is no foreground then (a sent
|
|
692
|
-
* `foregroundUrl` is ignored), so the render follows the BACKGROUND (its size,
|
|
693
|
-
* frame rate and length; `backgroundFit` has nothing to fit), and the run is
|
|
694
|
-
* priced on the background's length. With no foreground the result always
|
|
695
|
-
* carries the background's sound — `audioSource` is ignored there
|
|
696
|
-
* ({@link maskCompositeEffectiveAudioSource}); the canvas hides the control.
|
|
697
|
-
*
|
|
698
|
-
* Priced per started 5 seconds of the result (the foreground's length), like
|
|
699
|
-
* Trim / Loop / Combine Videos: the node's own `model_pricing` row is ONE unit
|
|
700
|
-
* (`maskCompositeUnits` counts them). Worked examples (repeated in
|
|
701
|
-
* docs/nodes/processing-video/mask-composite.md, at the 10-credit row):
|
|
702
|
-
* 3 s → 1 unit (10), 10 s → 2 units (20), 61 s → 13 units (130), 5 min → 60 units (600).
|
|
703
|
-
*
|
|
704
|
-
* Wire contract only — no I/O.
|
|
705
|
-
*/
|
|
706
672
|
/** How the background is fitted to the foreground's frame. */
|
|
707
673
|
declare const MASK_COMPOSITE_BACKGROUND_FITS: readonly ["cover", "contain", "stretch"];
|
|
708
674
|
type MaskCompositeBackgroundFit = (typeof MASK_COMPOSITE_BACKGROUND_FITS)[number];
|
|
@@ -738,9 +704,10 @@ declare const MASK_COMPOSITE_BOUNDS: {
|
|
|
738
704
|
declare const MASK_COMPOSITE_UNIT_SEC = 5;
|
|
739
705
|
/**
|
|
740
706
|
* Pricing units for a result `durationSec` long: one per started 5 seconds,
|
|
741
|
-
* at least one
|
|
742
|
-
*
|
|
743
|
-
*
|
|
707
|
+
* at least one, after `pricedClipSeconds` (up to 0.05 s past a whole second is
|
|
708
|
+
* ignored, so a 10.01 s result is 2 units, not 3). An unknown length counts the
|
|
709
|
+
* longest result a run accepts (an upper bound — the pre-run quote for a clip
|
|
710
|
+
* whose length is not known yet; every run measures its foreground).
|
|
744
711
|
*/
|
|
745
712
|
declare function maskCompositeUnits(durationSec: number | null | undefined): number;
|
|
746
713
|
declare const MASK_COMPOSITE_DEFAULTS: {
|
|
@@ -880,4 +847,4 @@ declare function overlayVariantHandle(platformId: string): string;
|
|
|
880
847
|
/** The platform id a variant handle names, or null for any other handle. */
|
|
881
848
|
declare function overlayVariantIdFromHandle(handle: string | null | undefined): string | null;
|
|
882
849
|
|
|
883
|
-
export { AUDIO_FX_PRESETS, AUDIO_FX_PRESET_LABELS, AUDIO_FX_PRESET_SET, AUDIO_FX_REVERB_PRESETS, type AudioFxPreset, DEFAULT_VIDEO_MASK_PROVIDER, FAL_VIDEO_DEPTH_PROVIDERS, FREECUT_EXPORT_COMPLETE, FREECUT_EXPORT_PROGRESS, FREECUT_READY, FREECUT_REQUEST_IMPORT, type FreecutExportCompletePayload, type FreecutExportProgressPayload, type FreecutImportFile, type FreecutRequestImportPayload, GENERATE_MASK_LIMITS, type GenerateMaskOutput, type GenerateMaskRequest, LEGACY_LOTTIE_HOST_REMAP, LOTTIE_OVERLAY_CATALOG, LOTTIE_SLOT_FIELD_PREFIX, type LottieOverlayCatalogEntry, type LottieSlotField, MASK_COMPOSITE_AUDIO_SOURCES, MASK_COMPOSITE_BACKGROUND_FITS, MASK_COMPOSITE_BOUNDS, MASK_COMPOSITE_DEFAULTS, MASK_COMPOSITE_FILLS, MASK_COMPOSITE_UNIT_SEC, type MaskCompositeAudioSource, type MaskCompositeBackgroundFit, type MaskCompositeFill, type MaskCompositeRequest, type MaskCompositeSettings, type MaskRegionDescriptor, NODARO_IMPORT_FILES, NODARO_LOAD_TIMELINE, NODARO_LOAD_VIDEO, NODARO_RESET_PROJECT, type NodaroLoadTimelinePayload, type NodaroLoadVideoPayload, OVERLAY_MAX_VARIANTS, OVERLAY_PLATFORMS, OVERLAY_PLATFORM_IDS, OVERLAY_SHAPES, OVERLAY_VARIANT_HANDLE_PREFIX, type OverlayPlatformId, type OverlayPlatformPreset, type OverlayPlatformZone, type OverlayShape, type OverlayShapeElement, type PixelBox, REPLICATE_VIDEO_DEPTH_PROVIDERS, type SlotControlDescriptor, type SlotControlKind, VIDEO_DEPTH_BUCKETS, VIDEO_DEPTH_COLORMAPS, VIDEO_DEPTH_LIMITS, VIDEO_DEPTH_MODEL_SIZES, VIDEO_DEPTH_PROVIDERS, VIDEO_DEPTH_RESOLUTIONS, VIDEO_FACE_MESH_LIMITS, VIDEO_FACE_MESH_PARTS, VIDEO_FACE_MESH_PATH, VIDEO_FACE_MESH_RECIPE, VIDEO_MASK_DEFAULTS, VIDEO_MASK_LIMITS, VIDEO_MASK_PROVIDERS, VIDEO_MASK_RECIPE, type VideoDepthColormap, type VideoDepthLever, type VideoDepthModelSize, type VideoDepthProvider, type VideoDepthResolution, type VideoFaceMeshOutput, type VideoFaceMeshParts, type VideoFaceMeshRequest, type VideoMaskProvider, type VideoMaskRequest, type VideoMaskZone, applySlots, checkVideoDepthLength, deriveLottieSlotFields, describeMaskRegion, describeSlotControl, hexToRgbaArray, humanizeSlotSid, listSlotSids, maskCompositeEffectiveAudioSource, maskCompositeFillOf, maskCompositeLeadHandle, maskCompositeUnits, maskCompositeUsesForeground, normalizeLottieLayers, overlayPlatformById, overlayShapeElement, overlayVariantHandle, overlayVariantIdFromHandle, resolveLottieOverlaySrc, resolveMaskCompositeSettings, resolveVideoDepthColormap, resolveVideoDepthModelSize, resolveVideoDepthProvider, resolveVideoMaskProvider, resolveVideoMaskRedetectSec, resolveVideoMaskZone, rgbaArrayToHex, videoDepthColormaps, videoDepthCreditId, videoDepthLevers, videoDepthNeedsGrayscalePass, videoFaceMeshCreditId, videoFaceMeshCreditIds, videoMaskBilledSeconds, videoMaskCreditId, videoMaskCreditIds };
|
|
850
|
+
export { AUDIO_FX_PRESETS, AUDIO_FX_PRESET_LABELS, AUDIO_FX_PRESET_SET, AUDIO_FX_REVERB_PRESETS, type AudioFxPreset, CLIP_PRICE_GRACE_SEC, DEFAULT_VIDEO_MASK_PROVIDER, FAL_VIDEO_DEPTH_PROVIDERS, FREECUT_EXPORT_COMPLETE, FREECUT_EXPORT_PROGRESS, FREECUT_READY, FREECUT_REQUEST_IMPORT, type FreecutExportCompletePayload, type FreecutExportProgressPayload, type FreecutImportFile, type FreecutRequestImportPayload, GENERATE_MASK_LIMITS, type GenerateMaskOutput, type GenerateMaskRequest, LEGACY_LOTTIE_HOST_REMAP, LOTTIE_OVERLAY_CATALOG, LOTTIE_SLOT_FIELD_PREFIX, type LottieOverlayCatalogEntry, type LottieSlotField, MASK_COMPOSITE_AUDIO_SOURCES, MASK_COMPOSITE_BACKGROUND_FITS, MASK_COMPOSITE_BOUNDS, MASK_COMPOSITE_DEFAULTS, MASK_COMPOSITE_FILLS, MASK_COMPOSITE_UNIT_SEC, type MaskCompositeAudioSource, type MaskCompositeBackgroundFit, type MaskCompositeFill, type MaskCompositeRequest, type MaskCompositeSettings, type MaskRegionDescriptor, NODARO_IMPORT_FILES, NODARO_LOAD_TIMELINE, NODARO_LOAD_VIDEO, NODARO_RESET_PROJECT, type NodaroLoadTimelinePayload, type NodaroLoadVideoPayload, OVERLAY_MAX_VARIANTS, OVERLAY_PLATFORMS, OVERLAY_PLATFORM_IDS, OVERLAY_SHAPES, OVERLAY_VARIANT_HANDLE_PREFIX, type OverlayPlatformId, type OverlayPlatformPreset, type OverlayPlatformZone, type OverlayShape, type OverlayShapeElement, type PixelBox, REPLICATE_VIDEO_DEPTH_PROVIDERS, type SlotControlDescriptor, type SlotControlKind, VIDEO_DEPTH_BUCKETS, VIDEO_DEPTH_COLORMAPS, VIDEO_DEPTH_LIMITS, VIDEO_DEPTH_MODEL_SIZES, VIDEO_DEPTH_PROVIDERS, VIDEO_DEPTH_RESOLUTIONS, VIDEO_FACE_MESH_LIMITS, VIDEO_FACE_MESH_PARTS, VIDEO_FACE_MESH_PATH, VIDEO_FACE_MESH_RECIPE, VIDEO_MASK_DEFAULTS, VIDEO_MASK_LIMITS, VIDEO_MASK_PROVIDERS, VIDEO_MASK_RECIPE, type VideoDepthColormap, type VideoDepthLever, type VideoDepthModelSize, type VideoDepthProvider, type VideoDepthResolution, type VideoFaceMeshOutput, type VideoFaceMeshParts, type VideoFaceMeshRequest, type VideoMaskProvider, type VideoMaskRequest, type VideoMaskZone, applySlots, checkVideoDepthLength, deriveLottieSlotFields, describeMaskRegion, describeSlotControl, hexToRgbaArray, humanizeSlotSid, listSlotSids, maskCompositeEffectiveAudioSource, maskCompositeFillOf, maskCompositeLeadHandle, maskCompositeUnits, maskCompositeUsesForeground, normalizeLottieLayers, overlayPlatformById, overlayShapeElement, overlayVariantHandle, overlayVariantIdFromHandle, pricedClipSeconds, resolveLottieOverlaySrc, resolveMaskCompositeSettings, resolveVideoDepthColormap, resolveVideoDepthModelSize, resolveVideoDepthProvider, resolveVideoMaskProvider, resolveVideoMaskRedetectSec, resolveVideoMaskZone, rgbaArrayToHex, videoDepthColormaps, videoDepthCreditId, videoDepthLevers, videoDepthNeedsGrayscalePass, videoFaceMeshCreditId, videoFaceMeshCreditIds, videoMaskBilledSeconds, videoMaskCreditId, videoMaskCreditIds };
|
package/dist/entries/media.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { AUDIO_FX_PRESETS, AUDIO_FX_PRESET_LABELS, AUDIO_FX_PRESET_SET, AUDIO_FX_REVERB_PRESETS, DEFAULT_VIDEO_MASK_PROVIDER, FREECUT_EXPORT_COMPLETE, FREECUT_EXPORT_PROGRESS, FREECUT_READY, FREECUT_REQUEST_IMPORT, GENERATE_MASK_LIMITS, LEGACY_LOTTIE_HOST_REMAP, LOTTIE_OVERLAY_CATALOG, LOTTIE_SLOT_FIELD_PREFIX, MASK_COMPOSITE_AUDIO_SOURCES, MASK_COMPOSITE_BACKGROUND_FITS, MASK_COMPOSITE_BOUNDS, MASK_COMPOSITE_DEFAULTS, MASK_COMPOSITE_FILLS, MASK_COMPOSITE_UNIT_SEC, NODARO_IMPORT_FILES, NODARO_LOAD_TIMELINE, NODARO_LOAD_VIDEO, NODARO_RESET_PROJECT, VIDEO_FACE_MESH_LIMITS, VIDEO_FACE_MESH_PARTS, VIDEO_FACE_MESH_PATH, VIDEO_FACE_MESH_RECIPE, VIDEO_MASK_DEFAULTS, VIDEO_MASK_LIMITS, VIDEO_MASK_PROVIDERS, VIDEO_MASK_RECIPE, applySlots, deriveLottieSlotFields, describeMaskRegion, describeSlotControl, hexToRgbaArray, humanizeSlotSid, listSlotSids, maskCompositeEffectiveAudioSource, maskCompositeFillOf, maskCompositeLeadHandle, maskCompositeUnits, maskCompositeUsesForeground, normalizeLottieLayers, resolveLottieOverlaySrc, resolveMaskCompositeSettings, resolveVideoMaskProvider, resolveVideoMaskRedetectSec, resolveVideoMaskZone, rgbaArrayToHex, videoFaceMeshCreditId, videoFaceMeshCreditIds, videoMaskBilledSeconds, videoMaskCreditId, videoMaskCreditIds } from '../chunk-
|
|
1
|
+
export { AUDIO_FX_PRESETS, AUDIO_FX_PRESET_LABELS, AUDIO_FX_PRESET_SET, AUDIO_FX_REVERB_PRESETS, DEFAULT_VIDEO_MASK_PROVIDER, FREECUT_EXPORT_COMPLETE, FREECUT_EXPORT_PROGRESS, FREECUT_READY, FREECUT_REQUEST_IMPORT, GENERATE_MASK_LIMITS, LEGACY_LOTTIE_HOST_REMAP, LOTTIE_OVERLAY_CATALOG, LOTTIE_SLOT_FIELD_PREFIX, MASK_COMPOSITE_AUDIO_SOURCES, MASK_COMPOSITE_BACKGROUND_FITS, MASK_COMPOSITE_BOUNDS, MASK_COMPOSITE_DEFAULTS, MASK_COMPOSITE_FILLS, MASK_COMPOSITE_UNIT_SEC, NODARO_IMPORT_FILES, NODARO_LOAD_TIMELINE, NODARO_LOAD_VIDEO, NODARO_RESET_PROJECT, VIDEO_FACE_MESH_LIMITS, VIDEO_FACE_MESH_PARTS, VIDEO_FACE_MESH_PATH, VIDEO_FACE_MESH_RECIPE, VIDEO_MASK_DEFAULTS, VIDEO_MASK_LIMITS, VIDEO_MASK_PROVIDERS, VIDEO_MASK_RECIPE, applySlots, deriveLottieSlotFields, describeMaskRegion, describeSlotControl, hexToRgbaArray, humanizeSlotSid, listSlotSids, maskCompositeEffectiveAudioSource, maskCompositeFillOf, maskCompositeLeadHandle, maskCompositeUnits, maskCompositeUsesForeground, normalizeLottieLayers, resolveLottieOverlaySrc, resolveMaskCompositeSettings, resolveVideoMaskProvider, resolveVideoMaskRedetectSec, resolveVideoMaskZone, rgbaArrayToHex, videoFaceMeshCreditId, videoFaceMeshCreditIds, videoMaskBilledSeconds, videoMaskCreditId, videoMaskCreditIds } from '../chunk-CZCOL3M5.js';
|
|
2
2
|
export { DEFAULT_OVERLAY_QR, DEFAULT_OVERLAY_SHAPE, DEFAULT_OVERLAY_TEXT, OVERLAY_ANCHORS, OVERLAY_FONTS, OVERLAY_FONT_IDS, OVERLAY_IMAGE_MASKS, OVERLAY_LAYER_KINDS, OVERLAY_SHAPES, OVERLAY_TEXT_ALIGNS, isRtlText, overlayFontById, overlayImageEffectsSchema, overlayQrStyleSchema, overlayShapeElement, overlayShapeStyleSchema, overlayStrokeSchema, overlayTextStyleSchema } from '../chunk-ZNZDQAXN.js';
|
|
3
|
-
export { FAL_VIDEO_DEPTH_PROVIDERS, REPLICATE_VIDEO_DEPTH_PROVIDERS, VIDEO_DEPTH_BUCKETS, VIDEO_DEPTH_COLORMAPS, VIDEO_DEPTH_LIMITS, VIDEO_DEPTH_MODEL_SIZES, VIDEO_DEPTH_PROVIDERS, VIDEO_DEPTH_RESOLUTIONS, checkVideoDepthLength, resolveVideoDepthColormap, resolveVideoDepthModelSize, resolveVideoDepthProvider, videoDepthColormaps, videoDepthCreditId, videoDepthLevers, videoDepthNeedsGrayscalePass } from '../chunk-
|
|
3
|
+
export { CLIP_PRICE_GRACE_SEC, FAL_VIDEO_DEPTH_PROVIDERS, REPLICATE_VIDEO_DEPTH_PROVIDERS, VIDEO_DEPTH_BUCKETS, VIDEO_DEPTH_COLORMAPS, VIDEO_DEPTH_LIMITS, VIDEO_DEPTH_MODEL_SIZES, VIDEO_DEPTH_PROVIDERS, VIDEO_DEPTH_RESOLUTIONS, checkVideoDepthLength, pricedClipSeconds, resolveVideoDepthColormap, resolveVideoDepthModelSize, resolveVideoDepthProvider, videoDepthColormaps, videoDepthCreditId, videoDepthLevers, videoDepthNeedsGrayscalePass } from '../chunk-6XVHYD5R.js';
|
|
4
4
|
export { OVERLAY_MAX_VARIANTS, OVERLAY_PLATFORMS, OVERLAY_PLATFORM_IDS, OVERLAY_VARIANT_HANDLE_PREFIX, overlayPlatformById, overlayVariantHandle, overlayVariantIdFromHandle } from '../chunk-5THUHJ3E.js';
|
|
5
5
|
//# sourceMappingURL=media.js.map
|
|
6
6
|
//# sourceMappingURL=media.js.map
|