mulmocast 2.0.8 → 2.1.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.
Files changed (35) hide show
  1. package/lib/actions/movie.d.ts +29 -2
  2. package/lib/actions/movie.js +243 -91
  3. package/lib/methods/mulmo_presentation_style.d.ts +4 -3
  4. package/lib/methods/mulmo_presentation_style.js +7 -1
  5. package/lib/types/schema.d.ts +202 -31
  6. package/lib/types/schema.js +27 -13
  7. package/lib/types/schema_video_filter.d.ts +423 -0
  8. package/lib/types/schema_video_filter.js +253 -0
  9. package/lib/types/type.d.ts +2 -1
  10. package/lib/utils/context.d.ts +11 -3
  11. package/lib/utils/ffmpeg_utils.js +2 -2
  12. package/lib/utils/provider2agent.d.ts +4 -0
  13. package/lib/utils/provider2agent.js +5 -0
  14. package/lib/utils/utils.js +24 -55
  15. package/lib/utils/video_filter.d.ts +7 -0
  16. package/lib/utils/video_filter.js +149 -0
  17. package/package.json +7 -7
  18. package/scripts/test/README.md +48 -48
  19. package/scripts/test/test_transition2.json +460 -0
  20. package/scripts/test/test_transition2.json~ +62 -0
  21. package/scripts/test/test_transition3.json +70 -0
  22. package/scripts/test/test_transition3.json~ +76 -0
  23. package/scripts/test/test_transition_no_audio.json +16 -0
  24. package/scripts/test/test_video_filters.json~ +227 -0
  25. package/scripts/test/test_wipe_simple.json +37 -0
  26. package/scripts/test/test_all_image.json~ +0 -45
  27. package/scripts/test/test_all_movie.json~ +0 -37
  28. package/scripts/test/test_all_tts.json~ +0 -83
  29. package/scripts/test/test_audio_gemini.json~ +0 -67
  30. package/scripts/test/test_genai2.json~ +0 -84
  31. package/scripts/test/test_genai_movie.json~ +0 -22
  32. package/scripts/test/test_kotodama.json~ +0 -0
  33. package/scripts/test/test_lipsync2.json~ +0 -24
  34. package/scripts/test/test_movie2.json~ +0 -40
  35. package/scripts/test/test_play_to_end.json~ +0 -65
@@ -0,0 +1,423 @@
1
+ import { z } from "zod";
2
+ export declare const mulmoVideoFilterMonoSchema: z.ZodObject<{
3
+ type: z.ZodLiteral<"mono">;
4
+ }, z.core.$strip>;
5
+ export declare const mulmoVideoFilterSepiaSchema: z.ZodObject<{
6
+ type: z.ZodLiteral<"sepia">;
7
+ }, z.core.$strip>;
8
+ export declare const mulmoVideoFilterBrightnessContrastSchema: z.ZodObject<{
9
+ type: z.ZodLiteral<"brightness_contrast">;
10
+ brightness: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
11
+ contrast: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
12
+ }, z.core.$strip>;
13
+ export declare const mulmoVideoFilterHueSchema: z.ZodObject<{
14
+ type: z.ZodLiteral<"hue">;
15
+ hue: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
16
+ saturation: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
17
+ brightness: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
18
+ }, z.core.$strip>;
19
+ export declare const mulmoVideoFilterColorBalanceSchema: z.ZodObject<{
20
+ type: z.ZodLiteral<"colorbalance">;
21
+ rs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
22
+ gs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
23
+ bs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
24
+ rm: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
25
+ gm: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
26
+ bm: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
27
+ rh: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
28
+ gh: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
29
+ bh: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
30
+ }, z.core.$strip>;
31
+ export declare const mulmoVideoFilterVibranceSchema: z.ZodObject<{
32
+ type: z.ZodLiteral<"vibrance">;
33
+ intensity: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
34
+ }, z.core.$strip>;
35
+ export declare const mulmoVideoFilterNegateSchema: z.ZodObject<{
36
+ type: z.ZodLiteral<"negate">;
37
+ negate_alpha: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
38
+ }, z.core.$strip>;
39
+ export declare const mulmoVideoFilterColorHoldSchema: z.ZodObject<{
40
+ type: z.ZodLiteral<"colorhold">;
41
+ color: z.ZodDefault<z.ZodOptional<z.ZodString>>;
42
+ similarity: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
43
+ blend: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
44
+ }, z.core.$strip>;
45
+ export declare const mulmoVideoFilterColorKeySchema: z.ZodObject<{
46
+ type: z.ZodLiteral<"colorkey">;
47
+ color: z.ZodDefault<z.ZodOptional<z.ZodString>>;
48
+ similarity: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
49
+ blend: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
50
+ }, z.core.$strip>;
51
+ export declare const mulmoVideoFilterBlurSchema: z.ZodObject<{
52
+ type: z.ZodLiteral<"blur">;
53
+ radius: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
54
+ power: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
55
+ }, z.core.$strip>;
56
+ export declare const mulmoVideoFilterGBlurSchema: z.ZodObject<{
57
+ type: z.ZodLiteral<"gblur">;
58
+ sigma: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
59
+ }, z.core.$strip>;
60
+ export declare const mulmoVideoFilterAvgBlurSchema: z.ZodObject<{
61
+ type: z.ZodLiteral<"avgblur">;
62
+ sizeX: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
63
+ sizeY: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
64
+ }, z.core.$strip>;
65
+ export declare const mulmoVideoFilterUnsharpSchema: z.ZodObject<{
66
+ type: z.ZodLiteral<"unsharp">;
67
+ luma_msize_x: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
68
+ luma_msize_y: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
69
+ luma_amount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
70
+ chroma_msize_x: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
71
+ chroma_msize_y: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
72
+ chroma_amount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
73
+ }, z.core.$strip>;
74
+ export declare const mulmoVideoFilterEdgeDetectSchema: z.ZodObject<{
75
+ type: z.ZodLiteral<"edgedetect">;
76
+ low: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
77
+ high: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
78
+ mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
79
+ wires: "wires";
80
+ colormix: "colormix";
81
+ canny: "canny";
82
+ }>>>;
83
+ }, z.core.$strip>;
84
+ export declare const mulmoVideoFilterSobelSchema: z.ZodObject<{
85
+ type: z.ZodLiteral<"sobel">;
86
+ planes: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
87
+ scale: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
88
+ delta: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
89
+ }, z.core.$strip>;
90
+ export declare const mulmoVideoFilterEmbossSchema: z.ZodObject<{
91
+ type: z.ZodLiteral<"emboss">;
92
+ }, z.core.$strip>;
93
+ export declare const mulmoVideoFilterGlitchSchema: z.ZodObject<{
94
+ type: z.ZodLiteral<"glitch">;
95
+ intensity: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
96
+ style: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
97
+ blend: "blend";
98
+ noise: "noise";
99
+ }>>>;
100
+ }, z.core.$strip>;
101
+ export declare const mulmoVideoFilterGrainSchema: z.ZodObject<{
102
+ type: z.ZodLiteral<"grain">;
103
+ intensity: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
104
+ }, z.core.$strip>;
105
+ export declare const mulmoVideoFilterHFlipSchema: z.ZodObject<{
106
+ type: z.ZodLiteral<"hflip">;
107
+ }, z.core.$strip>;
108
+ export declare const mulmoVideoFilterVFlipSchema: z.ZodObject<{
109
+ type: z.ZodLiteral<"vflip">;
110
+ }, z.core.$strip>;
111
+ export declare const mulmoVideoFilterRotateSchema: z.ZodObject<{
112
+ type: z.ZodLiteral<"rotate">;
113
+ angle: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
114
+ fillcolor: z.ZodDefault<z.ZodOptional<z.ZodString>>;
115
+ }, z.core.$strip>;
116
+ export declare const mulmoVideoFilterTransposeSchema: z.ZodObject<{
117
+ type: z.ZodLiteral<"transpose">;
118
+ dir: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
119
+ cclock: "cclock";
120
+ clock: "clock";
121
+ cclock_flip: "cclock_flip";
122
+ clock_flip: "clock_flip";
123
+ }>>>;
124
+ }, z.core.$strip>;
125
+ export declare const mulmoVideoFilterVignetteSchema: z.ZodObject<{
126
+ type: z.ZodLiteral<"vignette">;
127
+ angle: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
128
+ x0: z.ZodOptional<z.ZodNumber>;
129
+ y0: z.ZodOptional<z.ZodNumber>;
130
+ mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
131
+ forward: "forward";
132
+ backward: "backward";
133
+ }>>>;
134
+ }, z.core.$strip>;
135
+ export declare const mulmoVideoFilterFadeSchema: z.ZodObject<{
136
+ type: z.ZodLiteral<"fade">;
137
+ mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
138
+ in: "in";
139
+ out: "out";
140
+ }>>>;
141
+ start_frame: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
142
+ nb_frames: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
143
+ alpha: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
144
+ color: z.ZodDefault<z.ZodOptional<z.ZodString>>;
145
+ }, z.core.$strip>;
146
+ export declare const mulmoVideoFilterPixelizeSchema: z.ZodObject<{
147
+ type: z.ZodLiteral<"pixelize">;
148
+ width: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
149
+ height: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
150
+ mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
151
+ avg: "avg";
152
+ min: "min";
153
+ max: "max";
154
+ }>>>;
155
+ }, z.core.$strip>;
156
+ export declare const mulmoVideoFilterPseudoColorSchema: z.ZodObject<{
157
+ type: z.ZodLiteral<"pseudocolor">;
158
+ preset: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
159
+ magma: "magma";
160
+ inferno: "inferno";
161
+ plasma: "plasma";
162
+ viridis: "viridis";
163
+ turbo: "turbo";
164
+ cividis: "cividis";
165
+ range1: "range1";
166
+ range2: "range2";
167
+ shadows: "shadows";
168
+ highlights: "highlights";
169
+ solar: "solar";
170
+ nominal: "nominal";
171
+ preferred: "preferred";
172
+ total: "total";
173
+ }>>>;
174
+ }, z.core.$strip>;
175
+ export declare const mulmoVideoFilterTmixSchema: z.ZodObject<{
176
+ type: z.ZodLiteral<"tmix">;
177
+ frames: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
178
+ weights: z.ZodOptional<z.ZodString>;
179
+ }, z.core.$strip>;
180
+ export declare const mulmoVideoFilterLagfunSchema: z.ZodObject<{
181
+ type: z.ZodLiteral<"lagfun">;
182
+ decay: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
183
+ planes: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
184
+ }, z.core.$strip>;
185
+ export declare const mulmoVideoFilterThresholdSchema: z.ZodObject<{
186
+ type: z.ZodLiteral<"threshold">;
187
+ planes: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
188
+ }, z.core.$strip>;
189
+ export declare const mulmoVideoFilterElbgSchema: z.ZodObject<{
190
+ type: z.ZodLiteral<"elbg">;
191
+ codebook_length: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
192
+ }, z.core.$strip>;
193
+ export declare const mulmoVideoFilterLensDistortionSchema: z.ZodObject<{
194
+ type: z.ZodLiteral<"lensdistortion">;
195
+ k1: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
196
+ k2: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
197
+ }, z.core.$strip>;
198
+ export declare const mulmoVideoFilterChromaShiftSchema: z.ZodObject<{
199
+ type: z.ZodLiteral<"chromashift">;
200
+ cbh: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
201
+ cbv: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
202
+ crh: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
203
+ crv: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
204
+ edge: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
205
+ smear: "smear";
206
+ wrap: "wrap";
207
+ }>>>;
208
+ }, z.core.$strip>;
209
+ export declare const mulmoVideoFilterDeflickerSchema: z.ZodObject<{
210
+ type: z.ZodLiteral<"deflicker">;
211
+ size: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
212
+ mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
213
+ gm: "gm";
214
+ am: "am";
215
+ hm: "hm";
216
+ qm: "qm";
217
+ cm: "cm";
218
+ pm: "pm";
219
+ median: "median";
220
+ }>>>;
221
+ }, z.core.$strip>;
222
+ export declare const mulmoVideoFilterDctDenoiseSchema: z.ZodObject<{
223
+ type: z.ZodLiteral<"dctdnoiz">;
224
+ sigma: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
225
+ }, z.core.$strip>;
226
+ export declare const mulmoVideoFilterCustomSchema: z.ZodObject<{
227
+ type: z.ZodLiteral<"custom">;
228
+ filter: z.ZodString;
229
+ }, z.core.$strip>;
230
+ export declare const mulmoVideoFilterSchema: z.ZodUnion<readonly [z.ZodObject<{
231
+ type: z.ZodLiteral<"mono">;
232
+ }, z.core.$strip>, z.ZodObject<{
233
+ type: z.ZodLiteral<"sepia">;
234
+ }, z.core.$strip>, z.ZodObject<{
235
+ type: z.ZodLiteral<"brightness_contrast">;
236
+ brightness: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
237
+ contrast: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
238
+ }, z.core.$strip>, z.ZodObject<{
239
+ type: z.ZodLiteral<"hue">;
240
+ hue: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
241
+ saturation: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
242
+ brightness: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
243
+ }, z.core.$strip>, z.ZodObject<{
244
+ type: z.ZodLiteral<"colorbalance">;
245
+ rs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
246
+ gs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
247
+ bs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
248
+ rm: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
249
+ gm: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
250
+ bm: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
251
+ rh: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
252
+ gh: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
253
+ bh: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
254
+ }, z.core.$strip>, z.ZodObject<{
255
+ type: z.ZodLiteral<"vibrance">;
256
+ intensity: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
257
+ }, z.core.$strip>, z.ZodObject<{
258
+ type: z.ZodLiteral<"negate">;
259
+ negate_alpha: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
260
+ }, z.core.$strip>, z.ZodObject<{
261
+ type: z.ZodLiteral<"colorhold">;
262
+ color: z.ZodDefault<z.ZodOptional<z.ZodString>>;
263
+ similarity: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
264
+ blend: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
265
+ }, z.core.$strip>, z.ZodObject<{
266
+ type: z.ZodLiteral<"colorkey">;
267
+ color: z.ZodDefault<z.ZodOptional<z.ZodString>>;
268
+ similarity: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
269
+ blend: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
270
+ }, z.core.$strip>, z.ZodObject<{
271
+ type: z.ZodLiteral<"blur">;
272
+ radius: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
273
+ power: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
274
+ }, z.core.$strip>, z.ZodObject<{
275
+ type: z.ZodLiteral<"gblur">;
276
+ sigma: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
277
+ }, z.core.$strip>, z.ZodObject<{
278
+ type: z.ZodLiteral<"avgblur">;
279
+ sizeX: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
280
+ sizeY: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
281
+ }, z.core.$strip>, z.ZodObject<{
282
+ type: z.ZodLiteral<"unsharp">;
283
+ luma_msize_x: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
284
+ luma_msize_y: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
285
+ luma_amount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
286
+ chroma_msize_x: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
287
+ chroma_msize_y: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
288
+ chroma_amount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
289
+ }, z.core.$strip>, z.ZodObject<{
290
+ type: z.ZodLiteral<"edgedetect">;
291
+ low: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
292
+ high: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
293
+ mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
294
+ wires: "wires";
295
+ colormix: "colormix";
296
+ canny: "canny";
297
+ }>>>;
298
+ }, z.core.$strip>, z.ZodObject<{
299
+ type: z.ZodLiteral<"sobel">;
300
+ planes: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
301
+ scale: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
302
+ delta: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
303
+ }, z.core.$strip>, z.ZodObject<{
304
+ type: z.ZodLiteral<"emboss">;
305
+ }, z.core.$strip>, z.ZodObject<{
306
+ type: z.ZodLiteral<"glitch">;
307
+ intensity: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
308
+ style: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
309
+ blend: "blend";
310
+ noise: "noise";
311
+ }>>>;
312
+ }, z.core.$strip>, z.ZodObject<{
313
+ type: z.ZodLiteral<"grain">;
314
+ intensity: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
315
+ }, z.core.$strip>, z.ZodObject<{
316
+ type: z.ZodLiteral<"hflip">;
317
+ }, z.core.$strip>, z.ZodObject<{
318
+ type: z.ZodLiteral<"vflip">;
319
+ }, z.core.$strip>, z.ZodObject<{
320
+ type: z.ZodLiteral<"rotate">;
321
+ angle: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
322
+ fillcolor: z.ZodDefault<z.ZodOptional<z.ZodString>>;
323
+ }, z.core.$strip>, z.ZodObject<{
324
+ type: z.ZodLiteral<"transpose">;
325
+ dir: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
326
+ cclock: "cclock";
327
+ clock: "clock";
328
+ cclock_flip: "cclock_flip";
329
+ clock_flip: "clock_flip";
330
+ }>>>;
331
+ }, z.core.$strip>, z.ZodObject<{
332
+ type: z.ZodLiteral<"vignette">;
333
+ angle: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
334
+ x0: z.ZodOptional<z.ZodNumber>;
335
+ y0: z.ZodOptional<z.ZodNumber>;
336
+ mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
337
+ forward: "forward";
338
+ backward: "backward";
339
+ }>>>;
340
+ }, z.core.$strip>, z.ZodObject<{
341
+ type: z.ZodLiteral<"fade">;
342
+ mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
343
+ in: "in";
344
+ out: "out";
345
+ }>>>;
346
+ start_frame: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
347
+ nb_frames: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
348
+ alpha: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
349
+ color: z.ZodDefault<z.ZodOptional<z.ZodString>>;
350
+ }, z.core.$strip>, z.ZodObject<{
351
+ type: z.ZodLiteral<"pixelize">;
352
+ width: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
353
+ height: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
354
+ mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
355
+ avg: "avg";
356
+ min: "min";
357
+ max: "max";
358
+ }>>>;
359
+ }, z.core.$strip>, z.ZodObject<{
360
+ type: z.ZodLiteral<"pseudocolor">;
361
+ preset: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
362
+ magma: "magma";
363
+ inferno: "inferno";
364
+ plasma: "plasma";
365
+ viridis: "viridis";
366
+ turbo: "turbo";
367
+ cividis: "cividis";
368
+ range1: "range1";
369
+ range2: "range2";
370
+ shadows: "shadows";
371
+ highlights: "highlights";
372
+ solar: "solar";
373
+ nominal: "nominal";
374
+ preferred: "preferred";
375
+ total: "total";
376
+ }>>>;
377
+ }, z.core.$strip>, z.ZodObject<{
378
+ type: z.ZodLiteral<"tmix">;
379
+ frames: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
380
+ weights: z.ZodOptional<z.ZodString>;
381
+ }, z.core.$strip>, z.ZodObject<{
382
+ type: z.ZodLiteral<"lagfun">;
383
+ decay: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
384
+ planes: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
385
+ }, z.core.$strip>, z.ZodObject<{
386
+ type: z.ZodLiteral<"threshold">;
387
+ planes: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
388
+ }, z.core.$strip>, z.ZodObject<{
389
+ type: z.ZodLiteral<"elbg">;
390
+ codebook_length: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
391
+ }, z.core.$strip>, z.ZodObject<{
392
+ type: z.ZodLiteral<"lensdistortion">;
393
+ k1: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
394
+ k2: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
395
+ }, z.core.$strip>, z.ZodObject<{
396
+ type: z.ZodLiteral<"chromashift">;
397
+ cbh: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
398
+ cbv: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
399
+ crh: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
400
+ crv: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
401
+ edge: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
402
+ smear: "smear";
403
+ wrap: "wrap";
404
+ }>>>;
405
+ }, z.core.$strip>, z.ZodObject<{
406
+ type: z.ZodLiteral<"deflicker">;
407
+ size: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
408
+ mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
409
+ gm: "gm";
410
+ am: "am";
411
+ hm: "hm";
412
+ qm: "qm";
413
+ cm: "cm";
414
+ pm: "pm";
415
+ median: "median";
416
+ }>>>;
417
+ }, z.core.$strip>, z.ZodObject<{
418
+ type: z.ZodLiteral<"dctdnoiz">;
419
+ sigma: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
420
+ }, z.core.$strip>, z.ZodObject<{
421
+ type: z.ZodLiteral<"custom">;
422
+ filter: z.ZodString;
423
+ }, z.core.$strip>]>;
@@ -0,0 +1,253 @@
1
+ import { z } from "zod";
2
+ // Video filter schemas
3
+ // Color adjustment filters
4
+ export const mulmoVideoFilterMonoSchema = z.object({
5
+ type: z.literal("mono"),
6
+ });
7
+ export const mulmoVideoFilterSepiaSchema = z.object({
8
+ type: z.literal("sepia"),
9
+ });
10
+ export const mulmoVideoFilterBrightnessContrastSchema = z.object({
11
+ type: z.literal("brightness_contrast"),
12
+ brightness: z.number().min(-1).max(1).optional().default(0),
13
+ contrast: z.number().min(0).max(3).optional().default(1),
14
+ });
15
+ export const mulmoVideoFilterHueSchema = z.object({
16
+ type: z.literal("hue"),
17
+ hue: z.number().min(-180).max(180).optional().default(0), // hue angle in degrees
18
+ saturation: z.number().min(-10).max(10).optional().default(1), // saturation multiplier
19
+ brightness: z.number().min(-10).max(10).optional().default(0), // brightness offset
20
+ });
21
+ export const mulmoVideoFilterColorBalanceSchema = z.object({
22
+ type: z.literal("colorbalance"),
23
+ rs: z.number().min(-1).max(1).optional().default(0), // red shadows
24
+ gs: z.number().min(-1).max(1).optional().default(0), // green shadows
25
+ bs: z.number().min(-1).max(1).optional().default(0), // blue shadows
26
+ rm: z.number().min(-1).max(1).optional().default(0), // red midtones
27
+ gm: z.number().min(-1).max(1).optional().default(0), // green midtones
28
+ bm: z.number().min(-1).max(1).optional().default(0), // blue midtones
29
+ rh: z.number().min(-1).max(1).optional().default(0), // red highlights
30
+ gh: z.number().min(-1).max(1).optional().default(0), // green highlights
31
+ bh: z.number().min(-1).max(1).optional().default(0), // blue highlights
32
+ });
33
+ export const mulmoVideoFilterVibranceSchema = z.object({
34
+ type: z.literal("vibrance"),
35
+ intensity: z.number().min(-2).max(2).optional().default(0), // vibrance intensity
36
+ });
37
+ export const mulmoVideoFilterNegateSchema = z.object({
38
+ type: z.literal("negate"),
39
+ negate_alpha: z.boolean().optional().default(false),
40
+ });
41
+ export const mulmoVideoFilterColorHoldSchema = z.object({
42
+ type: z.literal("colorhold"),
43
+ color: z.string().optional().default("red"), // color to keep (e.g., "red", "0xFF0000")
44
+ similarity: z.number().min(0).max(1).optional().default(0.01),
45
+ blend: z.number().min(0).max(1).optional().default(0),
46
+ });
47
+ export const mulmoVideoFilterColorKeySchema = z.object({
48
+ type: z.literal("colorkey"),
49
+ color: z.string().optional().default("green"), // color to make transparent
50
+ similarity: z.number().min(0).max(1).optional().default(0.01),
51
+ blend: z.number().min(0).max(1).optional().default(0),
52
+ });
53
+ // Blur filters
54
+ export const mulmoVideoFilterBlurSchema = z.object({
55
+ type: z.literal("blur"),
56
+ radius: z.number().min(1).max(50).optional().default(10),
57
+ power: z.number().min(1).max(10).optional().default(1),
58
+ });
59
+ export const mulmoVideoFilterGBlurSchema = z.object({
60
+ type: z.literal("gblur"),
61
+ sigma: z.number().min(0).max(100).optional().default(30),
62
+ });
63
+ export const mulmoVideoFilterAvgBlurSchema = z.object({
64
+ type: z.literal("avgblur"),
65
+ sizeX: z.number().min(1).max(100).optional().default(10),
66
+ sizeY: z.number().min(1).max(100).optional().default(10),
67
+ });
68
+ // Sharpen filters
69
+ export const mulmoVideoFilterUnsharpSchema = z.object({
70
+ type: z.literal("unsharp"),
71
+ luma_msize_x: z.number().min(3).max(23).optional().default(5),
72
+ luma_msize_y: z.number().min(3).max(23).optional().default(5),
73
+ luma_amount: z.number().min(-2).max(5).optional().default(1),
74
+ chroma_msize_x: z.number().min(3).max(23).optional().default(5),
75
+ chroma_msize_y: z.number().min(3).max(23).optional().default(5),
76
+ chroma_amount: z.number().min(-2).max(5).optional().default(0),
77
+ });
78
+ // Edge detection and effects
79
+ export const mulmoVideoFilterEdgeDetectSchema = z.object({
80
+ type: z.literal("edgedetect"),
81
+ low: z.number().min(0).max(1).optional().default(0.2),
82
+ high: z.number().min(0).max(1).optional().default(0.4),
83
+ mode: z.enum(["wires", "colormix", "canny"]).optional().default("wires"),
84
+ });
85
+ export const mulmoVideoFilterSobelSchema = z.object({
86
+ type: z.literal("sobel"),
87
+ planes: z.number().min(0).max(15).optional().default(15),
88
+ scale: z.number().min(0).max(65535).optional().default(1),
89
+ delta: z.number().min(-65535).max(65535).optional().default(0),
90
+ });
91
+ export const mulmoVideoFilterEmbossSchema = z.object({
92
+ type: z.literal("emboss"),
93
+ });
94
+ // Noise and grain
95
+ export const mulmoVideoFilterGlitchSchema = z.object({
96
+ type: z.literal("glitch"),
97
+ intensity: z.number().min(1).max(100).optional().default(20),
98
+ style: z.enum(["noise", "blend"]).optional().default("noise"),
99
+ });
100
+ export const mulmoVideoFilterGrainSchema = z.object({
101
+ type: z.literal("grain"),
102
+ intensity: z.number().min(1).max(100).optional().default(10),
103
+ });
104
+ // Transform filters
105
+ export const mulmoVideoFilterHFlipSchema = z.object({
106
+ type: z.literal("hflip"),
107
+ });
108
+ export const mulmoVideoFilterVFlipSchema = z.object({
109
+ type: z.literal("vflip"),
110
+ });
111
+ export const mulmoVideoFilterRotateSchema = z.object({
112
+ type: z.literal("rotate"),
113
+ angle: z.number().optional().default(0), // angle in radians (use degrees * PI/180)
114
+ fillcolor: z.string().optional().default("black"),
115
+ });
116
+ export const mulmoVideoFilterTransposeSchema = z.object({
117
+ type: z.literal("transpose"),
118
+ dir: z.enum(["cclock", "clock", "cclock_flip", "clock_flip"]).optional().default("clock"),
119
+ });
120
+ // Effects
121
+ export const mulmoVideoFilterVignetteSchema = z.object({
122
+ type: z.literal("vignette"),
123
+ angle: z
124
+ .number()
125
+ .min(0)
126
+ .max(Math.PI)
127
+ .optional()
128
+ .default(Math.PI / 5), // angle in radians
129
+ x0: z.number().min(0).max(1).optional(), // center x (0-1)
130
+ y0: z.number().min(0).max(1).optional(), // center y (0-1)
131
+ mode: z.enum(["forward", "backward"]).optional().default("forward"),
132
+ });
133
+ export const mulmoVideoFilterFadeSchema = z.object({
134
+ type: z.literal("fade"),
135
+ mode: z.enum(["in", "out"]).optional().default("in"),
136
+ start_frame: z.number().min(0).optional().default(0),
137
+ nb_frames: z.number().min(1).optional().default(25),
138
+ alpha: z.boolean().optional().default(false),
139
+ color: z.string().optional().default("black"),
140
+ });
141
+ export const mulmoVideoFilterPixelizeSchema = z.object({
142
+ type: z.literal("pixelize"),
143
+ width: z.number().min(1).max(1000).optional().default(16),
144
+ height: z.number().min(1).max(1000).optional().default(16),
145
+ mode: z.enum(["avg", "min", "max"]).optional().default("avg"),
146
+ });
147
+ export const mulmoVideoFilterPseudoColorSchema = z.object({
148
+ type: z.literal("pseudocolor"),
149
+ preset: z
150
+ .enum(["magma", "inferno", "plasma", "viridis", "turbo", "cividis", "range1", "range2", "shadows", "highlights", "solar", "nominal", "preferred", "total"])
151
+ .optional()
152
+ .default("magma"),
153
+ });
154
+ // Temporal effects
155
+ export const mulmoVideoFilterTmixSchema = z.object({
156
+ type: z.literal("tmix"),
157
+ frames: z.number().min(1).max(1024).optional().default(3),
158
+ weights: z.string().optional(), // e.g., "1 2 1"
159
+ });
160
+ export const mulmoVideoFilterLagfunSchema = z.object({
161
+ type: z.literal("lagfun"),
162
+ decay: z.number().min(0).max(1).optional().default(0.95),
163
+ planes: z.number().min(0).max(15).optional().default(15),
164
+ });
165
+ // Threshold and posterize
166
+ export const mulmoVideoFilterThresholdSchema = z.object({
167
+ type: z.literal("threshold"),
168
+ planes: z.number().min(0).max(15).optional().default(15),
169
+ });
170
+ export const mulmoVideoFilterElbgSchema = z.object({
171
+ type: z.literal("elbg"),
172
+ codebook_length: z.number().min(1).max(256).optional().default(256),
173
+ });
174
+ // Distortion
175
+ export const mulmoVideoFilterLensDistortionSchema = z.object({
176
+ type: z.literal("lensdistortion"),
177
+ k1: z.number().min(-1).max(1).optional().default(0),
178
+ k2: z.number().min(-1).max(1).optional().default(0),
179
+ });
180
+ // Chromatic effects
181
+ export const mulmoVideoFilterChromaShiftSchema = z.object({
182
+ type: z.literal("chromashift"),
183
+ cbh: z.number().min(-255).max(255).optional().default(0), // horizontal shift for Cb
184
+ cbv: z.number().min(-255).max(255).optional().default(0), // vertical shift for Cb
185
+ crh: z.number().min(-255).max(255).optional().default(0), // horizontal shift for Cr
186
+ crv: z.number().min(-255).max(255).optional().default(0), // vertical shift for Cr
187
+ edge: z.enum(["smear", "wrap"]).optional().default("smear"),
188
+ });
189
+ // Deflicker and denoise
190
+ export const mulmoVideoFilterDeflickerSchema = z.object({
191
+ type: z.literal("deflicker"),
192
+ size: z.number().min(2).max(129).optional().default(5),
193
+ mode: z.enum(["am", "gm", "hm", "qm", "cm", "pm", "median"]).optional().default("am"),
194
+ });
195
+ export const mulmoVideoFilterDctDenoiseSchema = z.object({
196
+ type: z.literal("dctdnoiz"),
197
+ sigma: z.number().min(0).max(999).optional().default(10),
198
+ });
199
+ // Custom filter
200
+ export const mulmoVideoFilterCustomSchema = z.object({
201
+ type: z.literal("custom"),
202
+ filter: z.string(),
203
+ });
204
+ export const mulmoVideoFilterSchema = z.union([
205
+ // Color adjustment
206
+ mulmoVideoFilterMonoSchema,
207
+ mulmoVideoFilterSepiaSchema,
208
+ mulmoVideoFilterBrightnessContrastSchema,
209
+ mulmoVideoFilterHueSchema,
210
+ mulmoVideoFilterColorBalanceSchema,
211
+ mulmoVideoFilterVibranceSchema,
212
+ mulmoVideoFilterNegateSchema,
213
+ mulmoVideoFilterColorHoldSchema,
214
+ mulmoVideoFilterColorKeySchema,
215
+ // Blur
216
+ mulmoVideoFilterBlurSchema,
217
+ mulmoVideoFilterGBlurSchema,
218
+ mulmoVideoFilterAvgBlurSchema,
219
+ // Sharpen
220
+ mulmoVideoFilterUnsharpSchema,
221
+ // Edge detection
222
+ mulmoVideoFilterEdgeDetectSchema,
223
+ mulmoVideoFilterSobelSchema,
224
+ mulmoVideoFilterEmbossSchema,
225
+ // Noise and grain
226
+ mulmoVideoFilterGlitchSchema,
227
+ mulmoVideoFilterGrainSchema,
228
+ // Transform
229
+ mulmoVideoFilterHFlipSchema,
230
+ mulmoVideoFilterVFlipSchema,
231
+ mulmoVideoFilterRotateSchema,
232
+ mulmoVideoFilterTransposeSchema,
233
+ // Effects
234
+ mulmoVideoFilterVignetteSchema,
235
+ mulmoVideoFilterFadeSchema,
236
+ mulmoVideoFilterPixelizeSchema,
237
+ mulmoVideoFilterPseudoColorSchema,
238
+ // Temporal
239
+ mulmoVideoFilterTmixSchema,
240
+ mulmoVideoFilterLagfunSchema,
241
+ // Threshold
242
+ mulmoVideoFilterThresholdSchema,
243
+ mulmoVideoFilterElbgSchema,
244
+ // Distortion
245
+ mulmoVideoFilterLensDistortionSchema,
246
+ // Chromatic
247
+ mulmoVideoFilterChromaShiftSchema,
248
+ // Deflicker
249
+ mulmoVideoFilterDeflickerSchema,
250
+ mulmoVideoFilterDctDenoiseSchema,
251
+ // Custom
252
+ mulmoVideoFilterCustomSchema,
253
+ ]);