@nodaro/sdk 2.63.0 → 2.64.0
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-72ZJ72WF.js → chunk-3HL3IHVE.js} +20 -5
- package/dist/chunk-3HL3IHVE.js.map +1 -0
- package/dist/{chunk-PTVUYLJO.cjs → chunk-AAUVNTWE.cjs} +4 -3
- package/dist/chunk-AAUVNTWE.cjs.map +1 -0
- package/dist/{chunk-7IZ4ZMI5.cjs → chunk-C7DOFDP2.cjs} +8 -8
- package/dist/{chunk-7IZ4ZMI5.cjs.map → chunk-C7DOFDP2.cjs.map} +1 -1
- package/dist/{chunk-ZAATTX5W.js → chunk-E3ZMKMY7.js} +4 -3
- package/dist/chunk-E3ZMKMY7.js.map +1 -0
- package/dist/{chunk-VU23J7US.cjs → chunk-KBRMAEBT.cjs} +3 -3
- package/dist/{chunk-VU23J7US.cjs.map → chunk-KBRMAEBT.cjs.map} +1 -1
- package/dist/{chunk-CAQ2BKEP.js → chunk-NODNRXHA.js} +3 -3
- package/dist/{chunk-CAQ2BKEP.js.map → chunk-NODNRXHA.js.map} +1 -1
- package/dist/{chunk-JK3YVG6A.cjs → chunk-UIM5SLPP.cjs} +20 -5
- package/dist/chunk-UIM5SLPP.cjs.map +1 -0
- package/dist/{chunk-POUMH7QE.js → chunk-YT7HGYVO.js} +5 -5
- package/dist/{chunk-POUMH7QE.js.map → chunk-YT7HGYVO.js.map} +1 -1
- package/dist/entries/cast-swap.cjs +2 -2
- package/dist/entries/cast-swap.d.cts +31 -17
- package/dist/entries/cast-swap.d.ts +31 -17
- package/dist/entries/cast-swap.js +1 -1
- package/dist/entries/client.cjs +9 -9
- package/dist/entries/client.js +4 -4
- package/dist/entries/core.cjs +5 -5
- package/dist/entries/core.js +1 -1
- package/dist/entries/media.cjs +2 -2
- package/dist/entries/media.d.cts +78 -6
- package/dist/entries/media.d.ts +78 -6
- package/dist/entries/media.js +1 -1
- package/dist/index.cjs +12 -12
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/package.json +2 -2
- package/dist/chunk-72ZJ72WF.js.map +0 -1
- package/dist/chunk-JK3YVG6A.cjs.map +0 -1
- package/dist/chunk-PTVUYLJO.cjs.map +0 -1
- package/dist/chunk-ZAATTX5W.js.map +0 -1
|
@@ -273,17 +273,20 @@ interface CastSwapParams {
|
|
|
273
273
|
*/
|
|
274
274
|
style?: CastSwapStyle;
|
|
275
275
|
/**
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
276
|
+
* A direct run on Nodaro Motion Prism: an art style that restyles the whole
|
|
277
|
+
* video, as a `direction.style` id of the platform's `style` picker catalog
|
|
278
|
+
* (the same ids an image's `direction.style` takes); the platform words it.
|
|
279
|
+
* A Flex run (`style: "motion"`) takes one, and so does a Precise run where
|
|
280
|
+
* {@link CastSwapResource.styleChoice} answers `preciseArtStyle` true for the
|
|
281
|
+
* engine: Precise's edit of the clip, drawn in the art style. Refused with
|
|
282
|
+
* 400 `unknown_art_style` (not in the catalog), `art_style_not_supported` (a
|
|
283
|
+
* saved moodboard, `moodboard:…`) or `art_style_needs_flex` (a trend run, a
|
|
284
|
+
* Flex run whose prompt is made Precise by Nodaro's setting for how Flex
|
|
285
|
+
* runs are prepared, or a Precise request on an engine from before Precise
|
|
286
|
+
* runs took one), and on Nodaro Motion Pulse with `art_style_needs_prism`.
|
|
287
|
+
* The estimate (sent with the same `direction`) shows the price: it changes
|
|
288
|
+
* only where Nodaro's setting for such runs first redraws the role pictures
|
|
289
|
+
* in the art style.
|
|
287
290
|
*
|
|
288
291
|
* Style only: with no role with images and no fixed reference, the art style
|
|
289
292
|
* alone is the run's change (a pre or post prompt is still added). It
|
|
@@ -292,11 +295,11 @@ interface CastSwapParams {
|
|
|
292
295
|
* `privacy` part). By default a black-and-white art style comes out
|
|
293
296
|
* monochrome. Nodaro may run it the way other art-style runs run instead,
|
|
294
297
|
* priced as those are and not made monochrome.
|
|
295
|
-
* A preview takes its full run's path. Runs this way only
|
|
296
|
-
* {@link CastSwapResource.styleChoice} answers `styleOnly` true
|
|
297
|
-
* engine; elsewhere on Nodaro Motion Prism an art style alone is
|
|
298
|
-
* one with a pre or post prompt runs as
|
|
299
|
-
* records it in `input_data.direction`.
|
|
298
|
+
* A preview takes its full run's path. Runs this way only on a Flex run, and
|
|
299
|
+
* only where {@link CastSwapResource.styleChoice} answers `styleOnly` true
|
|
300
|
+
* for the engine; elsewhere on Nodaro Motion Prism an art style alone is
|
|
301
|
+
* refused (on a Precise run too), and one with a pre or post prompt runs as
|
|
302
|
+
* any other art-style run. The job records it in `input_data.direction`.
|
|
300
303
|
*/
|
|
301
304
|
direction?: {
|
|
302
305
|
style: string;
|
|
@@ -525,6 +528,16 @@ interface CastSwapStyleChoice {
|
|
|
525
528
|
* an engine missing from it: `false`.
|
|
526
529
|
*/
|
|
527
530
|
styleOnly?: Partial<Record<CastSwapEngine, boolean>>;
|
|
531
|
+
/**
|
|
532
|
+
* Per engine, whether a Precise run (no `style`, or `"precise"`) takes an
|
|
533
|
+
* art style (`direction`), as a Flex run does: Precise's edit of the clip,
|
|
534
|
+
* drawn in the art style. Not on its own: a Precise run with nothing else to
|
|
535
|
+
* change is still refused. Where it is `true`, an engine answered
|
|
536
|
+
* `"precise"` keeps a Flex request's art style. Nodaro Motion Pulse is always
|
|
537
|
+
* `false` (it takes no art style). Absent from an older server, and an engine
|
|
538
|
+
* missing from it: `false` (offer an art style on Flex runs alone).
|
|
539
|
+
*/
|
|
540
|
+
preciseArtStyle?: Partial<Record<CastSwapEngine, boolean>>;
|
|
528
541
|
}
|
|
529
542
|
declare class CastSwapResource {
|
|
530
543
|
private client;
|
|
@@ -549,7 +562,8 @@ declare class CastSwapResource {
|
|
|
549
562
|
* nothing to swap restyles the whole clip there. Where it is not `true`
|
|
550
563
|
* (absent, or an engine missing from it, included) on Nodaro Motion Prism, an
|
|
551
564
|
* art style alone is refused, and one with a pre or post prompt runs as any
|
|
552
|
-
* other art-style run.
|
|
565
|
+
* other art-style run. Its `preciseArtStyle` says, per engine, whether a
|
|
566
|
+
* Precise run takes an art style there too.
|
|
553
567
|
* Public (no sign-in needed); the answer may be up to a minute old.
|
|
554
568
|
*/
|
|
555
569
|
styleChoice(): Promise<CastSwapStyleChoice>;
|
|
@@ -273,17 +273,20 @@ interface CastSwapParams {
|
|
|
273
273
|
*/
|
|
274
274
|
style?: CastSwapStyle;
|
|
275
275
|
/**
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
276
|
+
* A direct run on Nodaro Motion Prism: an art style that restyles the whole
|
|
277
|
+
* video, as a `direction.style` id of the platform's `style` picker catalog
|
|
278
|
+
* (the same ids an image's `direction.style` takes); the platform words it.
|
|
279
|
+
* A Flex run (`style: "motion"`) takes one, and so does a Precise run where
|
|
280
|
+
* {@link CastSwapResource.styleChoice} answers `preciseArtStyle` true for the
|
|
281
|
+
* engine: Precise's edit of the clip, drawn in the art style. Refused with
|
|
282
|
+
* 400 `unknown_art_style` (not in the catalog), `art_style_not_supported` (a
|
|
283
|
+
* saved moodboard, `moodboard:…`) or `art_style_needs_flex` (a trend run, a
|
|
284
|
+
* Flex run whose prompt is made Precise by Nodaro's setting for how Flex
|
|
285
|
+
* runs are prepared, or a Precise request on an engine from before Precise
|
|
286
|
+
* runs took one), and on Nodaro Motion Pulse with `art_style_needs_prism`.
|
|
287
|
+
* The estimate (sent with the same `direction`) shows the price: it changes
|
|
288
|
+
* only where Nodaro's setting for such runs first redraws the role pictures
|
|
289
|
+
* in the art style.
|
|
287
290
|
*
|
|
288
291
|
* Style only: with no role with images and no fixed reference, the art style
|
|
289
292
|
* alone is the run's change (a pre or post prompt is still added). It
|
|
@@ -292,11 +295,11 @@ interface CastSwapParams {
|
|
|
292
295
|
* `privacy` part). By default a black-and-white art style comes out
|
|
293
296
|
* monochrome. Nodaro may run it the way other art-style runs run instead,
|
|
294
297
|
* priced as those are and not made monochrome.
|
|
295
|
-
* A preview takes its full run's path. Runs this way only
|
|
296
|
-
* {@link CastSwapResource.styleChoice} answers `styleOnly` true
|
|
297
|
-
* engine; elsewhere on Nodaro Motion Prism an art style alone is
|
|
298
|
-
* one with a pre or post prompt runs as
|
|
299
|
-
* records it in `input_data.direction`.
|
|
298
|
+
* A preview takes its full run's path. Runs this way only on a Flex run, and
|
|
299
|
+
* only where {@link CastSwapResource.styleChoice} answers `styleOnly` true
|
|
300
|
+
* for the engine; elsewhere on Nodaro Motion Prism an art style alone is
|
|
301
|
+
* refused (on a Precise run too), and one with a pre or post prompt runs as
|
|
302
|
+
* any other art-style run. The job records it in `input_data.direction`.
|
|
300
303
|
*/
|
|
301
304
|
direction?: {
|
|
302
305
|
style: string;
|
|
@@ -525,6 +528,16 @@ interface CastSwapStyleChoice {
|
|
|
525
528
|
* an engine missing from it: `false`.
|
|
526
529
|
*/
|
|
527
530
|
styleOnly?: Partial<Record<CastSwapEngine, boolean>>;
|
|
531
|
+
/**
|
|
532
|
+
* Per engine, whether a Precise run (no `style`, or `"precise"`) takes an
|
|
533
|
+
* art style (`direction`), as a Flex run does: Precise's edit of the clip,
|
|
534
|
+
* drawn in the art style. Not on its own: a Precise run with nothing else to
|
|
535
|
+
* change is still refused. Where it is `true`, an engine answered
|
|
536
|
+
* `"precise"` keeps a Flex request's art style. Nodaro Motion Pulse is always
|
|
537
|
+
* `false` (it takes no art style). Absent from an older server, and an engine
|
|
538
|
+
* missing from it: `false` (offer an art style on Flex runs alone).
|
|
539
|
+
*/
|
|
540
|
+
preciseArtStyle?: Partial<Record<CastSwapEngine, boolean>>;
|
|
528
541
|
}
|
|
529
542
|
declare class CastSwapResource {
|
|
530
543
|
private client;
|
|
@@ -549,7 +562,8 @@ declare class CastSwapResource {
|
|
|
549
562
|
* nothing to swap restyles the whole clip there. Where it is not `true`
|
|
550
563
|
* (absent, or an engine missing from it, included) on Nodaro Motion Prism, an
|
|
551
564
|
* art style alone is refused, and one with a pre or post prompt runs as any
|
|
552
|
-
* other art-style run.
|
|
565
|
+
* other art-style run. Its `preciseArtStyle` says, per engine, whether a
|
|
566
|
+
* Precise run takes an art style there too.
|
|
553
567
|
* Public (no sign-in needed); the answer may be up to a minute old.
|
|
554
568
|
*/
|
|
555
569
|
styleChoice(): Promise<CastSwapStyleChoice>;
|
package/dist/entries/client.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkC7DOFDP2_cjs = require('../chunk-C7DOFDP2.cjs');
|
|
4
4
|
require('../chunk-WUM6CWTE.cjs');
|
|
5
5
|
require('../chunk-LKH5M44B.cjs');
|
|
6
6
|
require('../chunk-RKW3N463.cjs');
|
|
@@ -29,7 +29,7 @@ require('../chunk-TCLNSVYA.cjs');
|
|
|
29
29
|
require('../chunk-KXEWTYS4.cjs');
|
|
30
30
|
require('../chunk-SS3B6PHT.cjs');
|
|
31
31
|
require('../chunk-MIXRL6I2.cjs');
|
|
32
|
-
require('../chunk-
|
|
32
|
+
require('../chunk-UIM5SLPP.cjs');
|
|
33
33
|
require('../chunk-7QOCWJKD.cjs');
|
|
34
34
|
require('../chunk-ZCWKX4V6.cjs');
|
|
35
35
|
require('../chunk-Q45PC4YD.cjs');
|
|
@@ -48,14 +48,14 @@ require('../chunk-YFS2LMG4.cjs');
|
|
|
48
48
|
require('../chunk-3OARKXWT.cjs');
|
|
49
49
|
require('../chunk-TBFA6QPH.cjs');
|
|
50
50
|
require('../chunk-KP2DIIKO.cjs');
|
|
51
|
-
var
|
|
51
|
+
var chunkKBRMAEBT_cjs = require('../chunk-KBRMAEBT.cjs');
|
|
52
52
|
require('../chunk-P2JYDWZT.cjs');
|
|
53
53
|
require('../chunk-A3XA6UNM.cjs');
|
|
54
54
|
require('../chunk-4BAHF762.cjs');
|
|
55
55
|
require('../chunk-JOXZ4ZIF.cjs');
|
|
56
56
|
require('../chunk-GA4LZZKQ.cjs');
|
|
57
57
|
require('../chunk-GGIWDFER.cjs');
|
|
58
|
-
require('../chunk-
|
|
58
|
+
require('../chunk-AAUVNTWE.cjs');
|
|
59
59
|
require('../chunk-BPWUWUZ3.cjs');
|
|
60
60
|
require('../chunk-XZQ6Z4T6.cjs');
|
|
61
61
|
|
|
@@ -63,23 +63,23 @@ require('../chunk-XZQ6Z4T6.cjs');
|
|
|
63
63
|
|
|
64
64
|
Object.defineProperty(exports, "NodaroClient", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkC7DOFDP2_cjs.NodaroClient; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "createClient", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkC7DOFDP2_cjs.createClient; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "CallbackAuth", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkKBRMAEBT_cjs.CallbackAuth; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "StaticTokenAuth", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkKBRMAEBT_cjs.StaticTokenAuth; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "supabaseAuth", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkKBRMAEBT_cjs.supabaseAuth; }
|
|
83
83
|
});
|
|
84
84
|
//# sourceMappingURL=client.cjs.map
|
|
85
85
|
//# sourceMappingURL=client.cjs.map
|
package/dist/entries/client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { NodaroClient, createClient } from '../chunk-
|
|
1
|
+
export { NodaroClient, createClient } from '../chunk-YT7HGYVO.js';
|
|
2
2
|
import '../chunk-33HT46A3.js';
|
|
3
3
|
import '../chunk-Z5GLY4R3.js';
|
|
4
4
|
import '../chunk-TLTPIS2A.js';
|
|
@@ -27,7 +27,7 @@ import '../chunk-OIPPTBW4.js';
|
|
|
27
27
|
import '../chunk-AJVSMNPZ.js';
|
|
28
28
|
import '../chunk-E37CVHWW.js';
|
|
29
29
|
import '../chunk-XZPSJG2X.js';
|
|
30
|
-
import '../chunk-
|
|
30
|
+
import '../chunk-3HL3IHVE.js';
|
|
31
31
|
import '../chunk-Y6V6CBY5.js';
|
|
32
32
|
import '../chunk-YVU2M7MI.js';
|
|
33
33
|
import '../chunk-AEUPH7EE.js';
|
|
@@ -46,14 +46,14 @@ import '../chunk-BU5A6K4C.js';
|
|
|
46
46
|
import '../chunk-K2VWXAGK.js';
|
|
47
47
|
import '../chunk-MQRPXZW5.js';
|
|
48
48
|
import '../chunk-A75Q7UEU.js';
|
|
49
|
-
export { CallbackAuth, StaticTokenAuth, supabaseAuth } from '../chunk-
|
|
49
|
+
export { CallbackAuth, StaticTokenAuth, supabaseAuth } from '../chunk-NODNRXHA.js';
|
|
50
50
|
import '../chunk-WNXX3B2A.js';
|
|
51
51
|
import '../chunk-HUYI5G3D.js';
|
|
52
52
|
import '../chunk-7QK2NXJA.js';
|
|
53
53
|
import '../chunk-7LODCIQK.js';
|
|
54
54
|
import '../chunk-3QFTP5P5.js';
|
|
55
55
|
import '../chunk-VQOUF4F5.js';
|
|
56
|
-
import '../chunk-
|
|
56
|
+
import '../chunk-E3ZMKMY7.js';
|
|
57
57
|
import '../chunk-KG4R454Z.js';
|
|
58
58
|
import '../chunk-CBDUHYTR.js';
|
|
59
59
|
//# sourceMappingURL=client.js.map
|
package/dist/entries/core.cjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('../chunk-X7XP5WBP.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkKBRMAEBT_cjs = require('../chunk-KBRMAEBT.cjs');
|
|
5
5
|
require('../chunk-P2JYDWZT.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "CallbackAuth", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkKBRMAEBT_cjs.CallbackAuth; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "NodaroClientCore", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkKBRMAEBT_cjs.NodaroClientCore; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "StaticTokenAuth", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkKBRMAEBT_cjs.StaticTokenAuth; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "supabaseAuth", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkKBRMAEBT_cjs.supabaseAuth; }
|
|
24
24
|
});
|
|
25
25
|
//# sourceMappingURL=core.cjs.map
|
|
26
26
|
//# sourceMappingURL=core.cjs.map
|
package/dist/entries/core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../chunk-AUDHV3OE.js';
|
|
2
|
-
export { CallbackAuth, NodaroClientCore, StaticTokenAuth, supabaseAuth } from '../chunk-
|
|
2
|
+
export { CallbackAuth, NodaroClientCore, StaticTokenAuth, supabaseAuth } from '../chunk-NODNRXHA.js';
|
|
3
3
|
import '../chunk-WNXX3B2A.js';
|
|
4
4
|
//# sourceMappingURL=core.js.map
|
|
5
5
|
//# sourceMappingURL=core.js.map
|
package/dist/entries/media.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('../chunk-RHETJOUM.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkUIM5SLPP_cjs = require('../chunk-UIM5SLPP.cjs');
|
|
5
5
|
require('../chunk-KP2DIIKO.cjs');
|
|
6
6
|
require('../chunk-P2JYDWZT.cjs');
|
|
7
7
|
|
|
@@ -9,7 +9,7 @@ require('../chunk-P2JYDWZT.cjs');
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "MediaResource", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkUIM5SLPP_cjs.MediaResource; }
|
|
13
13
|
});
|
|
14
14
|
//# sourceMappingURL=media.cjs.map
|
|
15
15
|
//# sourceMappingURL=media.cjs.map
|
package/dist/entries/media.d.cts
CHANGED
|
@@ -358,13 +358,28 @@ declare class MediaResource {
|
|
|
358
358
|
* short leftover is evened out with the parts before it. Video is cut on
|
|
359
359
|
* whole frames with each part's sound matching its picture; audio parts are
|
|
360
360
|
* sample-exact, in `audioFormat` (`mp3` default / `wav` / `aac`). With both
|
|
361
|
-
* sources each is split on its own. At most 200 parts per input.
|
|
362
|
-
* `
|
|
363
|
-
*
|
|
361
|
+
* sources each is split on its own. At most 200 parts per input. With
|
|
362
|
+
* `mode: "shots"` a video is instead cut into one part per shot, at the cuts
|
|
363
|
+
* measured from the file (no part length; a video only, up to 30 minutes and
|
|
364
|
+
* 200 shots; each part keeps the video's own sound). Poll `jobs.get(jobId)`;
|
|
365
|
+
* the parts are on the completed job's `output_data` — see
|
|
366
|
+
* {@link SplitMediaOutput}.
|
|
364
367
|
*/
|
|
365
368
|
splitMedia(input: SplitMediaInput): Promise<{
|
|
366
369
|
jobId: string;
|
|
367
370
|
}>;
|
|
371
|
+
/**
|
|
372
|
+
* Where every shot of a video starts and ends (`POST /v1/shot-cuts`),
|
|
373
|
+
* measured from the file: every decoded frame is scored and each hard cut
|
|
374
|
+
* starts a new shot (dissolves and fades are not cuts). Videos up to 30
|
|
375
|
+
* minutes. `frames: true` also saves each shot's exact first and last frame
|
|
376
|
+
* as PNG images (up to 1,000 shots; same price). Poll `jobs.get(jobId)`; the
|
|
377
|
+
* completed job's `output_data.json` is a {@link ShotCutsResult} — see
|
|
378
|
+
* {@link ShotCutsOutput}.
|
|
379
|
+
*/
|
|
380
|
+
shotCuts(input: ShotCutsInput): Promise<{
|
|
381
|
+
jobId: string;
|
|
382
|
+
}>;
|
|
368
383
|
/**
|
|
369
384
|
* Turn one still image + one audio track into an MP4
|
|
370
385
|
* (`POST /v1/still-to-video`) — locally rendered (FFmpeg), no AI model,
|
|
@@ -568,12 +583,16 @@ interface VideoMetadata {
|
|
|
568
583
|
isLive?: boolean;
|
|
569
584
|
[key: string]: unknown;
|
|
570
585
|
}
|
|
571
|
-
/** Body of {@link MediaResource.splitMedia} (`POST /v1/split-media`)
|
|
572
|
-
|
|
586
|
+
/** Body of {@link MediaResource.splitMedia} (`POST /v1/split-media`): parts of a set length, or one part per shot of a video. */
|
|
587
|
+
type SplitMediaInput = SplitMediaByDurationInput | SplitMediaByShotsInput;
|
|
588
|
+
/** {@link SplitMediaInput} cutting parts of at most `chunkDuration` seconds. At least one of `videoUrl` / `audioUrl`. */
|
|
589
|
+
interface SplitMediaByDurationInput {
|
|
573
590
|
/** Video to split. */
|
|
574
591
|
videoUrl?: string;
|
|
575
592
|
/** Audio file to split (split on its own when a video is given too). */
|
|
576
593
|
audioUrl?: string;
|
|
594
|
+
/** The default: parts of a set length. */
|
|
595
|
+
mode?: "duration";
|
|
577
596
|
/** The longest a part may be, in seconds (at least 1). Every part is at most this long. */
|
|
578
597
|
chunkDuration: number;
|
|
579
598
|
/** The shortest a part may be, in seconds (0 or more, default 4). Must not exceed `chunkDuration` (400 otherwise). */
|
|
@@ -581,6 +600,19 @@ interface SplitMediaInput {
|
|
|
581
600
|
/** Format of the audio parts. Default `mp3`. */
|
|
582
601
|
audioFormat?: "mp3" | "wav" | "aac";
|
|
583
602
|
}
|
|
603
|
+
/** {@link SplitMediaInput} cutting a video into one part per shot, at its measured cuts. */
|
|
604
|
+
interface SplitMediaByShotsInput {
|
|
605
|
+
/** The video to split (up to 30 minutes). A separate audio file is refused (each part keeps the video's own sound). */
|
|
606
|
+
videoUrl: string;
|
|
607
|
+
mode: "shots";
|
|
608
|
+
}
|
|
609
|
+
/** One part's shot in a shots-mode split: its place on the video, seconds to the millisecond. */
|
|
610
|
+
interface SplitMediaShot {
|
|
611
|
+
index: number;
|
|
612
|
+
startSec: number;
|
|
613
|
+
endSec: number;
|
|
614
|
+
durationSec: number;
|
|
615
|
+
}
|
|
584
616
|
/** A completed split-media job's `output_data`. */
|
|
585
617
|
interface SplitMediaOutput {
|
|
586
618
|
/** The video parts, in order (when a video was split). */
|
|
@@ -593,6 +625,46 @@ interface SplitMediaOutput {
|
|
|
593
625
|
partDurationsSec?: number[];
|
|
594
626
|
/** The audio parts' lengths, only when BOTH a video and an audio file were split. */
|
|
595
627
|
audioPartDurationsSec?: number[];
|
|
628
|
+
/** Shots mode: the number of shots (= parts). */
|
|
629
|
+
shotCount?: number;
|
|
630
|
+
/** Shots mode: each part's shot, in part order. */
|
|
631
|
+
shots?: SplitMediaShot[];
|
|
632
|
+
}
|
|
633
|
+
/** Body of {@link MediaResource.shotCuts} (`POST /v1/shot-cuts`). */
|
|
634
|
+
interface ShotCutsInput {
|
|
635
|
+
/** The video to measure: MP4, MOV, MKV or WebM, up to 30 minutes. */
|
|
636
|
+
videoUrl: string;
|
|
637
|
+
/** Also save each shot's first and last frame as images (up to 1,000 shots). Default false. */
|
|
638
|
+
frames?: boolean;
|
|
639
|
+
}
|
|
640
|
+
/** One shot of a {@link ShotCutsResult}: seconds from the video's first frame, to the millisecond. */
|
|
641
|
+
interface ShotCutsShot {
|
|
642
|
+
index: number;
|
|
643
|
+
startSec: number;
|
|
644
|
+
/** Where the next shot starts, or the video's end. */
|
|
645
|
+
endSec: number;
|
|
646
|
+
durationSec: number;
|
|
647
|
+
/** With `frames`: the shot's first decoded frame (PNG). */
|
|
648
|
+
firstFrameUrl?: string;
|
|
649
|
+
/** With `frames`: its last decoded frame — the one before the next cut, or the video's last. */
|
|
650
|
+
lastFrameUrl?: string;
|
|
651
|
+
}
|
|
652
|
+
/** What a Shot Cuts run measured (`output_data.json`). */
|
|
653
|
+
interface ShotCutsResult {
|
|
654
|
+
shotCount: number;
|
|
655
|
+
/** Where each new shot starts: ascending, never 0; `[]` for a single shot. */
|
|
656
|
+
cutsSec: number[];
|
|
657
|
+
/** The video's length. */
|
|
658
|
+
durationSec: number;
|
|
659
|
+
shots: ShotCutsShot[];
|
|
660
|
+
}
|
|
661
|
+
/** A completed shot-cuts job's `output_data`. */
|
|
662
|
+
interface ShotCutsOutput {
|
|
663
|
+
json: ShotCutsResult;
|
|
664
|
+
/** With `frames`: each shot's first frame, in shot order. */
|
|
665
|
+
firstFrames?: string[];
|
|
666
|
+
/** With `frames`: each shot's last frame, in shot order. */
|
|
667
|
+
lastFrames?: string[];
|
|
596
668
|
}
|
|
597
669
|
interface MediaProcessInput {
|
|
598
670
|
sourceUrl: string;
|
|
@@ -624,4 +696,4 @@ interface MediaProcessResult {
|
|
|
624
696
|
metadata: Record<string, unknown>;
|
|
625
697
|
}
|
|
626
698
|
|
|
627
|
-
export { type AddCaptionsInput, type CaptionEntry, type CaptionLookInput, type CaptionSegmentInput, type DownloadVideoProgress, type MediaDiscardResult, type MediaProcessInput, type MediaProcessResult, MediaResource, type OverlayPlacement, type SplitMediaInput, type SplitMediaOutput, type VideoMetadata };
|
|
699
|
+
export { type AddCaptionsInput, type CaptionEntry, type CaptionLookInput, type CaptionSegmentInput, type DownloadVideoProgress, type MediaDiscardResult, type MediaProcessInput, type MediaProcessResult, MediaResource, type OverlayPlacement, type ShotCutsInput, type ShotCutsOutput, type ShotCutsResult, type ShotCutsShot, type SplitMediaByDurationInput, type SplitMediaByShotsInput, type SplitMediaInput, type SplitMediaOutput, type SplitMediaShot, type VideoMetadata };
|
package/dist/entries/media.d.ts
CHANGED
|
@@ -358,13 +358,28 @@ declare class MediaResource {
|
|
|
358
358
|
* short leftover is evened out with the parts before it. Video is cut on
|
|
359
359
|
* whole frames with each part's sound matching its picture; audio parts are
|
|
360
360
|
* sample-exact, in `audioFormat` (`mp3` default / `wav` / `aac`). With both
|
|
361
|
-
* sources each is split on its own. At most 200 parts per input.
|
|
362
|
-
* `
|
|
363
|
-
*
|
|
361
|
+
* sources each is split on its own. At most 200 parts per input. With
|
|
362
|
+
* `mode: "shots"` a video is instead cut into one part per shot, at the cuts
|
|
363
|
+
* measured from the file (no part length; a video only, up to 30 minutes and
|
|
364
|
+
* 200 shots; each part keeps the video's own sound). Poll `jobs.get(jobId)`;
|
|
365
|
+
* the parts are on the completed job's `output_data` — see
|
|
366
|
+
* {@link SplitMediaOutput}.
|
|
364
367
|
*/
|
|
365
368
|
splitMedia(input: SplitMediaInput): Promise<{
|
|
366
369
|
jobId: string;
|
|
367
370
|
}>;
|
|
371
|
+
/**
|
|
372
|
+
* Where every shot of a video starts and ends (`POST /v1/shot-cuts`),
|
|
373
|
+
* measured from the file: every decoded frame is scored and each hard cut
|
|
374
|
+
* starts a new shot (dissolves and fades are not cuts). Videos up to 30
|
|
375
|
+
* minutes. `frames: true` also saves each shot's exact first and last frame
|
|
376
|
+
* as PNG images (up to 1,000 shots; same price). Poll `jobs.get(jobId)`; the
|
|
377
|
+
* completed job's `output_data.json` is a {@link ShotCutsResult} — see
|
|
378
|
+
* {@link ShotCutsOutput}.
|
|
379
|
+
*/
|
|
380
|
+
shotCuts(input: ShotCutsInput): Promise<{
|
|
381
|
+
jobId: string;
|
|
382
|
+
}>;
|
|
368
383
|
/**
|
|
369
384
|
* Turn one still image + one audio track into an MP4
|
|
370
385
|
* (`POST /v1/still-to-video`) — locally rendered (FFmpeg), no AI model,
|
|
@@ -568,12 +583,16 @@ interface VideoMetadata {
|
|
|
568
583
|
isLive?: boolean;
|
|
569
584
|
[key: string]: unknown;
|
|
570
585
|
}
|
|
571
|
-
/** Body of {@link MediaResource.splitMedia} (`POST /v1/split-media`)
|
|
572
|
-
|
|
586
|
+
/** Body of {@link MediaResource.splitMedia} (`POST /v1/split-media`): parts of a set length, or one part per shot of a video. */
|
|
587
|
+
type SplitMediaInput = SplitMediaByDurationInput | SplitMediaByShotsInput;
|
|
588
|
+
/** {@link SplitMediaInput} cutting parts of at most `chunkDuration` seconds. At least one of `videoUrl` / `audioUrl`. */
|
|
589
|
+
interface SplitMediaByDurationInput {
|
|
573
590
|
/** Video to split. */
|
|
574
591
|
videoUrl?: string;
|
|
575
592
|
/** Audio file to split (split on its own when a video is given too). */
|
|
576
593
|
audioUrl?: string;
|
|
594
|
+
/** The default: parts of a set length. */
|
|
595
|
+
mode?: "duration";
|
|
577
596
|
/** The longest a part may be, in seconds (at least 1). Every part is at most this long. */
|
|
578
597
|
chunkDuration: number;
|
|
579
598
|
/** The shortest a part may be, in seconds (0 or more, default 4). Must not exceed `chunkDuration` (400 otherwise). */
|
|
@@ -581,6 +600,19 @@ interface SplitMediaInput {
|
|
|
581
600
|
/** Format of the audio parts. Default `mp3`. */
|
|
582
601
|
audioFormat?: "mp3" | "wav" | "aac";
|
|
583
602
|
}
|
|
603
|
+
/** {@link SplitMediaInput} cutting a video into one part per shot, at its measured cuts. */
|
|
604
|
+
interface SplitMediaByShotsInput {
|
|
605
|
+
/** The video to split (up to 30 minutes). A separate audio file is refused (each part keeps the video's own sound). */
|
|
606
|
+
videoUrl: string;
|
|
607
|
+
mode: "shots";
|
|
608
|
+
}
|
|
609
|
+
/** One part's shot in a shots-mode split: its place on the video, seconds to the millisecond. */
|
|
610
|
+
interface SplitMediaShot {
|
|
611
|
+
index: number;
|
|
612
|
+
startSec: number;
|
|
613
|
+
endSec: number;
|
|
614
|
+
durationSec: number;
|
|
615
|
+
}
|
|
584
616
|
/** A completed split-media job's `output_data`. */
|
|
585
617
|
interface SplitMediaOutput {
|
|
586
618
|
/** The video parts, in order (when a video was split). */
|
|
@@ -593,6 +625,46 @@ interface SplitMediaOutput {
|
|
|
593
625
|
partDurationsSec?: number[];
|
|
594
626
|
/** The audio parts' lengths, only when BOTH a video and an audio file were split. */
|
|
595
627
|
audioPartDurationsSec?: number[];
|
|
628
|
+
/** Shots mode: the number of shots (= parts). */
|
|
629
|
+
shotCount?: number;
|
|
630
|
+
/** Shots mode: each part's shot, in part order. */
|
|
631
|
+
shots?: SplitMediaShot[];
|
|
632
|
+
}
|
|
633
|
+
/** Body of {@link MediaResource.shotCuts} (`POST /v1/shot-cuts`). */
|
|
634
|
+
interface ShotCutsInput {
|
|
635
|
+
/** The video to measure: MP4, MOV, MKV or WebM, up to 30 minutes. */
|
|
636
|
+
videoUrl: string;
|
|
637
|
+
/** Also save each shot's first and last frame as images (up to 1,000 shots). Default false. */
|
|
638
|
+
frames?: boolean;
|
|
639
|
+
}
|
|
640
|
+
/** One shot of a {@link ShotCutsResult}: seconds from the video's first frame, to the millisecond. */
|
|
641
|
+
interface ShotCutsShot {
|
|
642
|
+
index: number;
|
|
643
|
+
startSec: number;
|
|
644
|
+
/** Where the next shot starts, or the video's end. */
|
|
645
|
+
endSec: number;
|
|
646
|
+
durationSec: number;
|
|
647
|
+
/** With `frames`: the shot's first decoded frame (PNG). */
|
|
648
|
+
firstFrameUrl?: string;
|
|
649
|
+
/** With `frames`: its last decoded frame — the one before the next cut, or the video's last. */
|
|
650
|
+
lastFrameUrl?: string;
|
|
651
|
+
}
|
|
652
|
+
/** What a Shot Cuts run measured (`output_data.json`). */
|
|
653
|
+
interface ShotCutsResult {
|
|
654
|
+
shotCount: number;
|
|
655
|
+
/** Where each new shot starts: ascending, never 0; `[]` for a single shot. */
|
|
656
|
+
cutsSec: number[];
|
|
657
|
+
/** The video's length. */
|
|
658
|
+
durationSec: number;
|
|
659
|
+
shots: ShotCutsShot[];
|
|
660
|
+
}
|
|
661
|
+
/** A completed shot-cuts job's `output_data`. */
|
|
662
|
+
interface ShotCutsOutput {
|
|
663
|
+
json: ShotCutsResult;
|
|
664
|
+
/** With `frames`: each shot's first frame, in shot order. */
|
|
665
|
+
firstFrames?: string[];
|
|
666
|
+
/** With `frames`: each shot's last frame, in shot order. */
|
|
667
|
+
lastFrames?: string[];
|
|
596
668
|
}
|
|
597
669
|
interface MediaProcessInput {
|
|
598
670
|
sourceUrl: string;
|
|
@@ -624,4 +696,4 @@ interface MediaProcessResult {
|
|
|
624
696
|
metadata: Record<string, unknown>;
|
|
625
697
|
}
|
|
626
698
|
|
|
627
|
-
export { type AddCaptionsInput, type CaptionEntry, type CaptionLookInput, type CaptionSegmentInput, type DownloadVideoProgress, type MediaDiscardResult, type MediaProcessInput, type MediaProcessResult, MediaResource, type OverlayPlacement, type SplitMediaInput, type SplitMediaOutput, type VideoMetadata };
|
|
699
|
+
export { type AddCaptionsInput, type CaptionEntry, type CaptionLookInput, type CaptionSegmentInput, type DownloadVideoProgress, type MediaDiscardResult, type MediaProcessInput, type MediaProcessResult, MediaResource, type OverlayPlacement, type ShotCutsInput, type ShotCutsOutput, type ShotCutsResult, type ShotCutsShot, type SplitMediaByDurationInput, type SplitMediaByShotsInput, type SplitMediaInput, type SplitMediaOutput, type SplitMediaShot, type VideoMetadata };
|
package/dist/entries/media.js
CHANGED