@lee-jisoo/n8n-nodes-mediafx 1.6.0 → 1.6.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/fonts/DejaVuSans.ttf +0 -0
- package/dist/fonts/Inter-Regular.ttf +0 -0
- package/dist/fonts/NanumGothic-Regular.ttf +0 -0
- package/dist/fonts/NotoSansKR-Regular.ttf +0 -0
- package/dist/fonts/Pretendard-Regular.otf +0 -0
- package/dist/fonts/Roboto-Regular.ttf +0 -0
- package/dist/nodes/MediaFX/MediaFX.node.d.ts +12 -0
- package/dist/nodes/MediaFX/MediaFX.node.js +559 -0
- package/dist/nodes/MediaFX/mediafx.png +0 -0
- package/dist/nodes/MediaFX/operations/addSubtitle.d.ts +2 -0
- package/dist/nodes/MediaFX/operations/addSubtitle.js +146 -0
- package/dist/nodes/MediaFX/operations/addText.d.ts +2 -0
- package/dist/nodes/MediaFX/operations/addText.js +108 -0
- package/dist/nodes/MediaFX/operations/extractAudio.d.ts +2 -0
- package/dist/nodes/MediaFX/operations/extractAudio.js +57 -0
- package/dist/nodes/MediaFX/operations/imageToVideo.d.ts +5 -0
- package/dist/nodes/MediaFX/operations/imageToVideo.js +65 -0
- package/dist/nodes/MediaFX/operations/index.d.ts +13 -0
- package/dist/nodes/MediaFX/operations/index.js +29 -0
- package/dist/nodes/MediaFX/operations/merge.d.ts +2 -0
- package/dist/nodes/MediaFX/operations/merge.js +121 -0
- package/dist/nodes/MediaFX/operations/mixAudio.d.ts +2 -0
- package/dist/nodes/MediaFX/operations/mixAudio.js +141 -0
- package/dist/nodes/MediaFX/operations/multiVideoTransition.d.ts +2 -0
- package/dist/nodes/MediaFX/operations/multiVideoTransition.js +245 -0
- package/dist/nodes/MediaFX/operations/overlayVideo.d.ts +16 -0
- package/dist/nodes/MediaFX/operations/overlayVideo.js +240 -0
- package/dist/nodes/MediaFX/operations/separateAudio.d.ts +17 -0
- package/dist/nodes/MediaFX/operations/separateAudio.js +78 -0
- package/dist/nodes/MediaFX/operations/singleVideoFade.d.ts +2 -0
- package/dist/nodes/MediaFX/operations/singleVideoFade.js +60 -0
- package/dist/nodes/MediaFX/operations/speed.d.ts +12 -0
- package/dist/nodes/MediaFX/operations/speed.js +110 -0
- package/dist/nodes/MediaFX/operations/stampImage.d.ts +2 -0
- package/dist/nodes/MediaFX/operations/stampImage.js +146 -0
- package/dist/nodes/MediaFX/operations/trim.d.ts +2 -0
- package/dist/nodes/MediaFX/operations/trim.js +49 -0
- package/dist/nodes/MediaFX/properties/audio.properties.d.ts +2 -0
- package/dist/nodes/MediaFX/properties/audio.properties.js +394 -0
- package/dist/nodes/MediaFX/properties/font.properties.d.ts +2 -0
- package/dist/nodes/MediaFX/properties/font.properties.js +186 -0
- package/dist/nodes/MediaFX/properties/image.properties.d.ts +2 -0
- package/dist/nodes/MediaFX/properties/image.properties.js +333 -0
- package/dist/nodes/MediaFX/properties/resources.properties.d.ts +2 -0
- package/dist/nodes/MediaFX/properties/resources.properties.js +34 -0
- package/dist/nodes/MediaFX/properties/subtitle.properties.d.ts +2 -0
- package/dist/nodes/MediaFX/properties/subtitle.properties.js +306 -0
- package/dist/nodes/MediaFX/properties/video.properties.d.ts +2 -0
- package/dist/nodes/MediaFX/properties/video.properties.js +1135 -0
- package/dist/nodes/MediaFX/utils/ffmpegVersion.d.ts +14 -0
- package/dist/nodes/MediaFX/utils/ffmpegVersion.js +97 -0
- package/dist/nodes/MediaFX/utils.d.ts +43 -0
- package/dist/nodes/MediaFX/utils.js +410 -0
- package/package.json +1 -1
- package/CHANGELOG.md +0 -65
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.imageProperties = void 0;
|
|
4
|
+
exports.imageProperties = [
|
|
5
|
+
// Image Operations
|
|
6
|
+
{
|
|
7
|
+
displayName: 'Operation',
|
|
8
|
+
name: 'operation',
|
|
9
|
+
type: 'options',
|
|
10
|
+
noDataExpression: true,
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['image'],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
options: [
|
|
17
|
+
{
|
|
18
|
+
name: 'To Video',
|
|
19
|
+
value: 'imageToVideo',
|
|
20
|
+
description: 'Create a video from a static image for a specified duration',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Stamp',
|
|
24
|
+
value: 'stampImage',
|
|
25
|
+
description: 'Overlay an image (stamp/watermark) onto a video',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
default: 'imageToVideo',
|
|
29
|
+
},
|
|
30
|
+
// =============================
|
|
31
|
+
// == IMAGE TO VIDEO FIELDS ==
|
|
32
|
+
// =============================
|
|
33
|
+
{
|
|
34
|
+
displayName: 'Source Image',
|
|
35
|
+
name: 'sourceImage',
|
|
36
|
+
type: 'fixedCollection',
|
|
37
|
+
placeholder: 'Add Image Source',
|
|
38
|
+
displayOptions: {
|
|
39
|
+
show: {
|
|
40
|
+
resource: ['image'],
|
|
41
|
+
operation: ['imageToVideo'],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
default: {},
|
|
45
|
+
options: [
|
|
46
|
+
{
|
|
47
|
+
displayName: 'Source',
|
|
48
|
+
name: 'source',
|
|
49
|
+
values: [
|
|
50
|
+
{
|
|
51
|
+
displayName: 'Source Type', name: 'sourceType', type: 'options',
|
|
52
|
+
options: [{ name: 'URL', value: 'url' }, { name: 'Binary Data', value: 'binary' }],
|
|
53
|
+
default: 'url',
|
|
54
|
+
},
|
|
55
|
+
{ displayName: 'Value', name: 'value', type: 'string', default: '', placeholder: 'https://example.com/image.png', displayOptions: { show: { sourceType: ['url'] } } },
|
|
56
|
+
{ displayName: 'Binary Property', name: 'binaryProperty', type: 'string', default: 'data', displayOptions: { show: { sourceType: ['binary'] } } },
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
displayName: 'Duration (seconds)',
|
|
63
|
+
name: 'duration',
|
|
64
|
+
type: 'number',
|
|
65
|
+
default: 5,
|
|
66
|
+
required: true,
|
|
67
|
+
typeOptions: {
|
|
68
|
+
minValue: 0.1,
|
|
69
|
+
},
|
|
70
|
+
displayOptions: {
|
|
71
|
+
show: {
|
|
72
|
+
resource: ['image'],
|
|
73
|
+
operation: ['imageToVideo'],
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
description: 'The duration of the output video in seconds',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
displayName: 'Video Size',
|
|
80
|
+
name: 'videoSize',
|
|
81
|
+
type: 'collection',
|
|
82
|
+
placeholder: 'Add Size',
|
|
83
|
+
default: {},
|
|
84
|
+
displayOptions: {
|
|
85
|
+
show: {
|
|
86
|
+
resource: ['image'],
|
|
87
|
+
operation: ['imageToVideo'],
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
description: 'Specify the output video dimensions. Defaults to the image size.',
|
|
91
|
+
options: [
|
|
92
|
+
{
|
|
93
|
+
displayName: 'Width',
|
|
94
|
+
name: 'width',
|
|
95
|
+
type: 'number',
|
|
96
|
+
typeOptions: {
|
|
97
|
+
minValue: 1,
|
|
98
|
+
},
|
|
99
|
+
default: 1920,
|
|
100
|
+
description: 'Width of the video in pixels.',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
displayName: 'Height',
|
|
104
|
+
name: 'height',
|
|
105
|
+
type: 'number',
|
|
106
|
+
typeOptions: {
|
|
107
|
+
minValue: 1,
|
|
108
|
+
},
|
|
109
|
+
default: 1080,
|
|
110
|
+
description: 'Height of the video in pixels.',
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
displayName: 'Output Format',
|
|
116
|
+
name: 'imageOutputFormat',
|
|
117
|
+
type: 'options',
|
|
118
|
+
displayOptions: {
|
|
119
|
+
show: {
|
|
120
|
+
resource: ['image'],
|
|
121
|
+
operation: ['imageToVideo'],
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
options: [{ name: 'MP4', value: 'mp4' }],
|
|
125
|
+
default: 'mp4',
|
|
126
|
+
},
|
|
127
|
+
// =============================
|
|
128
|
+
// == STAMP IMAGE FIELDS ==
|
|
129
|
+
// =============================
|
|
130
|
+
{
|
|
131
|
+
displayName: 'Source Video',
|
|
132
|
+
name: 'sourceVideo',
|
|
133
|
+
type: 'fixedCollection',
|
|
134
|
+
placeholder: 'Add Video Source',
|
|
135
|
+
displayOptions: {
|
|
136
|
+
show: {
|
|
137
|
+
resource: ['image'],
|
|
138
|
+
operation: ['stampImage'],
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
default: {},
|
|
142
|
+
options: [
|
|
143
|
+
{
|
|
144
|
+
displayName: 'Source',
|
|
145
|
+
name: 'source',
|
|
146
|
+
values: [
|
|
147
|
+
{
|
|
148
|
+
displayName: 'Source Type', name: 'sourceType', type: 'options',
|
|
149
|
+
options: [{ name: 'URL', value: 'url' }, { name: 'Binary Data', value: 'binary' }],
|
|
150
|
+
default: 'url',
|
|
151
|
+
},
|
|
152
|
+
{ displayName: 'Value', name: 'value', type: 'string', default: '', placeholder: 'https://example.com/video.mp4', displayOptions: { show: { sourceType: ['url'] } } },
|
|
153
|
+
{ displayName: 'Binary Property', name: 'binaryProperty', type: 'string', default: 'data', displayOptions: { show: { sourceType: ['binary'] } } },
|
|
154
|
+
],
|
|
155
|
+
},
|
|
156
|
+
],
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
displayName: 'Stamp Image',
|
|
160
|
+
name: 'stampImage',
|
|
161
|
+
type: 'fixedCollection',
|
|
162
|
+
placeholder: 'Add Stamp Image Source',
|
|
163
|
+
displayOptions: {
|
|
164
|
+
show: {
|
|
165
|
+
resource: ['image'],
|
|
166
|
+
operation: ['stampImage'],
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
default: {},
|
|
170
|
+
options: [
|
|
171
|
+
{
|
|
172
|
+
displayName: 'Source',
|
|
173
|
+
name: 'source',
|
|
174
|
+
values: [
|
|
175
|
+
{
|
|
176
|
+
displayName: 'Source Type', name: 'sourceType', type: 'options',
|
|
177
|
+
options: [{ name: 'URL', value: 'url' }, { name: 'Binary Data', value: 'binary' }],
|
|
178
|
+
default: 'url',
|
|
179
|
+
},
|
|
180
|
+
{ displayName: 'Value', name: 'value', type: 'string', default: '', placeholder: 'https://example.com/stamp.png', displayOptions: { show: { sourceType: ['url'] } } },
|
|
181
|
+
{ displayName: 'Binary Property', name: 'binaryProperty', type: 'string', default: 'data', displayOptions: { show: { sourceType: ['binary'] } } },
|
|
182
|
+
],
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
},
|
|
186
|
+
// =============================
|
|
187
|
+
// == STAMP OPTIONS (Individual Properties) ==
|
|
188
|
+
// =============================
|
|
189
|
+
// Size Options
|
|
190
|
+
{
|
|
191
|
+
displayName: 'Width (pixels)',
|
|
192
|
+
name: 'width',
|
|
193
|
+
type: 'number',
|
|
194
|
+
default: 150,
|
|
195
|
+
displayOptions: {
|
|
196
|
+
show: {
|
|
197
|
+
resource: ['image'],
|
|
198
|
+
operation: ['stampImage'],
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
description: 'Width of the stamp image. Use -1 to keep aspect ratio.',
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
displayName: 'Height (pixels)',
|
|
205
|
+
name: 'height',
|
|
206
|
+
type: 'number',
|
|
207
|
+
default: -1,
|
|
208
|
+
displayOptions: {
|
|
209
|
+
show: {
|
|
210
|
+
resource: ['image'],
|
|
211
|
+
operation: ['stampImage'],
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
description: 'Height of the stamp image. Use -1 to keep aspect ratio.',
|
|
215
|
+
},
|
|
216
|
+
// Position Options
|
|
217
|
+
{
|
|
218
|
+
displayName: 'Position X',
|
|
219
|
+
name: 'x',
|
|
220
|
+
type: 'string',
|
|
221
|
+
default: '10',
|
|
222
|
+
displayOptions: {
|
|
223
|
+
show: {
|
|
224
|
+
resource: ['image'],
|
|
225
|
+
operation: ['stampImage'],
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
description: "Position from left. E.g., '10' (pixels) or '(main_w-overlay_w)-10' (right align).",
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
displayName: 'Position Y',
|
|
232
|
+
name: 'y',
|
|
233
|
+
type: 'string',
|
|
234
|
+
default: '10',
|
|
235
|
+
displayOptions: {
|
|
236
|
+
show: {
|
|
237
|
+
resource: ['image'],
|
|
238
|
+
operation: ['stampImage'],
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
description: "Position from top. E.g., '10' (pixels) or '(main_h-overlay_h)-10' (bottom align).",
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
displayName: 'Rotation (degrees)',
|
|
245
|
+
name: 'rotation',
|
|
246
|
+
type: 'number',
|
|
247
|
+
default: 0,
|
|
248
|
+
displayOptions: {
|
|
249
|
+
show: {
|
|
250
|
+
resource: ['image'],
|
|
251
|
+
operation: ['stampImage'],
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
description: 'Rotation angle of the stamp in degrees (clockwise).',
|
|
255
|
+
},
|
|
256
|
+
// Time Control Options
|
|
257
|
+
{
|
|
258
|
+
displayName: 'Enable Time Control',
|
|
259
|
+
name: 'enableTimeControl',
|
|
260
|
+
type: 'boolean',
|
|
261
|
+
default: false,
|
|
262
|
+
displayOptions: {
|
|
263
|
+
show: {
|
|
264
|
+
resource: ['image'],
|
|
265
|
+
operation: ['stampImage'],
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
description: 'Control when the stamp appears and disappears',
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
displayName: 'Start Time (seconds)',
|
|
272
|
+
name: 'startTime',
|
|
273
|
+
type: 'number',
|
|
274
|
+
default: 0,
|
|
275
|
+
displayOptions: {
|
|
276
|
+
show: {
|
|
277
|
+
resource: ['image'],
|
|
278
|
+
operation: ['stampImage'],
|
|
279
|
+
enableTimeControl: [true],
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
description: 'When the stamp should start appearing',
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
displayName: 'End Time (seconds)',
|
|
286
|
+
name: 'endTime',
|
|
287
|
+
type: 'number',
|
|
288
|
+
default: 5,
|
|
289
|
+
displayOptions: {
|
|
290
|
+
show: {
|
|
291
|
+
resource: ['image'],
|
|
292
|
+
operation: ['stampImage'],
|
|
293
|
+
enableTimeControl: [true],
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
description: 'When the stamp should stop appearing. Leave empty for entire video duration.',
|
|
297
|
+
},
|
|
298
|
+
// Opacity Control
|
|
299
|
+
{
|
|
300
|
+
displayName: 'Opacity',
|
|
301
|
+
name: 'opacity',
|
|
302
|
+
type: 'number',
|
|
303
|
+
default: 1.0,
|
|
304
|
+
typeOptions: {
|
|
305
|
+
minValue: 0,
|
|
306
|
+
maxValue: 1,
|
|
307
|
+
numberStepSize: 0.1,
|
|
308
|
+
},
|
|
309
|
+
displayOptions: {
|
|
310
|
+
show: {
|
|
311
|
+
resource: ['image'],
|
|
312
|
+
operation: ['stampImage'],
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
description: 'Opacity of the stamp (0.0 = transparent, 1.0 = opaque)',
|
|
316
|
+
},
|
|
317
|
+
// ===================
|
|
318
|
+
// OUTPUT FIELD NAME
|
|
319
|
+
// ===================
|
|
320
|
+
{
|
|
321
|
+
displayName: 'Output Field Name',
|
|
322
|
+
name: 'outputFieldName',
|
|
323
|
+
type: 'string',
|
|
324
|
+
displayOptions: {
|
|
325
|
+
show: {
|
|
326
|
+
resource: ['image'],
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
default: 'data',
|
|
330
|
+
description: 'Name of the binary property where the output video will be stored',
|
|
331
|
+
placeholder: 'data',
|
|
332
|
+
},
|
|
333
|
+
];
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resourceSelection = void 0;
|
|
4
|
+
exports.resourceSelection = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Resource',
|
|
7
|
+
name: 'resource',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
options: [
|
|
11
|
+
{
|
|
12
|
+
name: 'Video',
|
|
13
|
+
value: 'video',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'Audio',
|
|
17
|
+
value: 'audio',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'Text',
|
|
21
|
+
value: 'subtitle',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'Image',
|
|
25
|
+
value: 'image',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'Font',
|
|
29
|
+
value: 'font',
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
default: 'video',
|
|
33
|
+
},
|
|
34
|
+
];
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.subtitleProperties = void 0;
|
|
4
|
+
exports.subtitleProperties = [
|
|
5
|
+
// Subtitle Operations
|
|
6
|
+
{
|
|
7
|
+
displayName: 'Operation',
|
|
8
|
+
name: 'operation',
|
|
9
|
+
type: 'options',
|
|
10
|
+
noDataExpression: true,
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['subtitle'],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
options: [
|
|
17
|
+
{
|
|
18
|
+
name: 'Add Subtitle',
|
|
19
|
+
value: 'addSubtitle',
|
|
20
|
+
description: 'Add SRT subtitle file to video',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Add String',
|
|
24
|
+
value: 'addText',
|
|
25
|
+
description: 'Add custom text overlay to video',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
default: 'addText',
|
|
29
|
+
},
|
|
30
|
+
// ===================
|
|
31
|
+
// COMMON SOURCE FIELDS
|
|
32
|
+
// ===================
|
|
33
|
+
{
|
|
34
|
+
displayName: 'Video Source',
|
|
35
|
+
name: 'source',
|
|
36
|
+
type: 'fixedCollection',
|
|
37
|
+
placeholder: 'Add Video Source',
|
|
38
|
+
displayOptions: { show: { resource: ['subtitle'] } },
|
|
39
|
+
default: {},
|
|
40
|
+
options: [{
|
|
41
|
+
displayName: 'Source',
|
|
42
|
+
name: 'source',
|
|
43
|
+
values: [
|
|
44
|
+
{
|
|
45
|
+
displayName: 'Source Type', name: 'sourceType', type: 'options',
|
|
46
|
+
options: [{ name: 'URL', value: 'url' }, { name: 'Binary Data', value: 'binary' }],
|
|
47
|
+
default: 'url',
|
|
48
|
+
},
|
|
49
|
+
{ displayName: 'Value', name: 'value', type: 'string', default: '', placeholder: 'https://example.com/video.mp4', displayOptions: { show: { sourceType: ['url'] } } },
|
|
50
|
+
{ displayName: 'Binary Property', name: 'binaryProperty', type: 'string', default: 'data', displayOptions: { show: { sourceType: ['binary'] } } },
|
|
51
|
+
],
|
|
52
|
+
}],
|
|
53
|
+
},
|
|
54
|
+
// ===================
|
|
55
|
+
// SUBTITLE FILE SOURCE (only for addSubtitle)
|
|
56
|
+
// ===================
|
|
57
|
+
{
|
|
58
|
+
displayName: 'Subtitle File Source',
|
|
59
|
+
name: 'subtitleFileSource',
|
|
60
|
+
type: 'fixedCollection',
|
|
61
|
+
placeholder: 'Add Subtitle File Source',
|
|
62
|
+
displayOptions: {
|
|
63
|
+
show: {
|
|
64
|
+
resource: ['subtitle'],
|
|
65
|
+
operation: ['addSubtitle'],
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
default: {},
|
|
69
|
+
options: [
|
|
70
|
+
{
|
|
71
|
+
displayName: 'Source',
|
|
72
|
+
name: 'source',
|
|
73
|
+
values: [
|
|
74
|
+
{
|
|
75
|
+
displayName: 'Source Type',
|
|
76
|
+
name: 'sourceType',
|
|
77
|
+
type: 'options',
|
|
78
|
+
options: [{ name: 'URL', value: 'url' }, { name: 'Binary Data', value: 'binary' }],
|
|
79
|
+
default: 'url',
|
|
80
|
+
},
|
|
81
|
+
{ displayName: 'Value', name: 'value', type: 'string', default: '', placeholder: 'https://example.com/sub.srt', displayOptions: { show: { sourceType: ['url'] } } },
|
|
82
|
+
{ displayName: 'Binary Property', name: 'binaryProperty', type: 'string', default: 'data', displayOptions: { show: { sourceType: ['binary'] } } },
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
// ===================
|
|
88
|
+
// TEXT CONTENT (only for addText)
|
|
89
|
+
// ===================
|
|
90
|
+
{
|
|
91
|
+
displayName: 'Text',
|
|
92
|
+
name: 'text',
|
|
93
|
+
type: 'string',
|
|
94
|
+
default: 'Hello, n8n!',
|
|
95
|
+
displayOptions: {
|
|
96
|
+
show: {
|
|
97
|
+
resource: ['subtitle'],
|
|
98
|
+
operation: ['addText'],
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
description: 'Text content to display',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
displayName: 'Start Time (seconds)',
|
|
105
|
+
name: 'startTime',
|
|
106
|
+
type: 'number',
|
|
107
|
+
default: 0,
|
|
108
|
+
displayOptions: {
|
|
109
|
+
show: {
|
|
110
|
+
resource: ['subtitle'],
|
|
111
|
+
operation: ['addText'],
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
description: 'When the text should start appearing',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
displayName: 'End Time (seconds)',
|
|
118
|
+
name: 'endTime',
|
|
119
|
+
type: 'number',
|
|
120
|
+
default: 5,
|
|
121
|
+
displayOptions: {
|
|
122
|
+
show: {
|
|
123
|
+
resource: ['subtitle'],
|
|
124
|
+
operation: ['addText'],
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
description: 'When the text should stop appearing',
|
|
128
|
+
},
|
|
129
|
+
// ===================
|
|
130
|
+
// COMMON FONT & STYLE OPTIONS
|
|
131
|
+
// ===================
|
|
132
|
+
{
|
|
133
|
+
displayName: 'Font Key',
|
|
134
|
+
name: 'fontKey',
|
|
135
|
+
type: 'options',
|
|
136
|
+
typeOptions: { loadOptionsMethod: 'getFonts' },
|
|
137
|
+
default: 'noto-sans-kr',
|
|
138
|
+
displayOptions: {
|
|
139
|
+
show: {
|
|
140
|
+
resource: ['subtitle'],
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
description: 'Font to use for the text',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
displayName: 'Font Size',
|
|
147
|
+
name: 'size',
|
|
148
|
+
type: 'number',
|
|
149
|
+
default: 48,
|
|
150
|
+
displayOptions: {
|
|
151
|
+
show: {
|
|
152
|
+
resource: ['subtitle'],
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
description: 'Size of the text in pixels',
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
displayName: 'Color',
|
|
159
|
+
name: 'color',
|
|
160
|
+
type: 'string',
|
|
161
|
+
default: 'white',
|
|
162
|
+
displayOptions: {
|
|
163
|
+
show: {
|
|
164
|
+
resource: ['subtitle'],
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
description: 'Text color (e.g., white, #FF0000, red)',
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
displayName: 'Outline Width',
|
|
171
|
+
name: 'outlineWidth',
|
|
172
|
+
type: 'number',
|
|
173
|
+
default: 1,
|
|
174
|
+
displayOptions: {
|
|
175
|
+
show: {
|
|
176
|
+
resource: ['subtitle'],
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
description: 'Width of the text border/outline',
|
|
180
|
+
},
|
|
181
|
+
// ===================
|
|
182
|
+
// POSITION OPTIONS
|
|
183
|
+
// ===================
|
|
184
|
+
{
|
|
185
|
+
displayName: 'Position Type',
|
|
186
|
+
name: 'positionType',
|
|
187
|
+
type: 'options',
|
|
188
|
+
options: [
|
|
189
|
+
{ name: 'Alignment', value: 'alignment', description: 'Use preset alignment positions' },
|
|
190
|
+
{ name: 'Custom', value: 'custom', description: 'Set custom X/Y coordinates' },
|
|
191
|
+
],
|
|
192
|
+
default: 'alignment',
|
|
193
|
+
displayOptions: {
|
|
194
|
+
show: {
|
|
195
|
+
resource: ['subtitle'],
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
description: 'How to position the text',
|
|
199
|
+
},
|
|
200
|
+
// --- ALIGNMENT POSITION OPTIONS ---
|
|
201
|
+
{
|
|
202
|
+
displayName: 'Horizontal Alignment',
|
|
203
|
+
name: 'horizontalAlign',
|
|
204
|
+
type: 'options',
|
|
205
|
+
options: [
|
|
206
|
+
{ name: 'Left', value: 'left' },
|
|
207
|
+
{ name: 'Center', value: 'center' },
|
|
208
|
+
{ name: 'Right', value: 'right' },
|
|
209
|
+
],
|
|
210
|
+
default: 'center',
|
|
211
|
+
displayOptions: {
|
|
212
|
+
show: {
|
|
213
|
+
resource: ['subtitle'],
|
|
214
|
+
positionType: ['alignment']
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
description: 'Horizontal alignment of the text',
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
displayName: 'Vertical Alignment',
|
|
221
|
+
name: 'verticalAlign',
|
|
222
|
+
type: 'options',
|
|
223
|
+
options: [
|
|
224
|
+
{ name: 'Top', value: 'top' },
|
|
225
|
+
{ name: 'Middle', value: 'middle' },
|
|
226
|
+
{ name: 'Bottom', value: 'bottom' },
|
|
227
|
+
],
|
|
228
|
+
default: 'bottom',
|
|
229
|
+
displayOptions: {
|
|
230
|
+
show: {
|
|
231
|
+
resource: ['subtitle'],
|
|
232
|
+
positionType: ['alignment']
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
description: 'Vertical alignment of the text',
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
displayName: 'Horizontal Padding',
|
|
239
|
+
name: 'paddingX',
|
|
240
|
+
type: 'number',
|
|
241
|
+
default: 20,
|
|
242
|
+
displayOptions: {
|
|
243
|
+
show: {
|
|
244
|
+
resource: ['subtitle'],
|
|
245
|
+
positionType: ['alignment']
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
description: 'Horizontal padding in pixels from left/right edges',
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
displayName: 'Vertical Padding',
|
|
252
|
+
name: 'paddingY',
|
|
253
|
+
type: 'number',
|
|
254
|
+
default: 20,
|
|
255
|
+
displayOptions: {
|
|
256
|
+
show: {
|
|
257
|
+
resource: ['subtitle'],
|
|
258
|
+
positionType: ['alignment']
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
description: 'Vertical padding in pixels from top/bottom edges',
|
|
262
|
+
},
|
|
263
|
+
// --- CUSTOM POSITION OPTIONS ---
|
|
264
|
+
{
|
|
265
|
+
displayName: 'Position X',
|
|
266
|
+
name: 'x',
|
|
267
|
+
type: 'string',
|
|
268
|
+
default: '(w-text_w)/2',
|
|
269
|
+
displayOptions: {
|
|
270
|
+
show: {
|
|
271
|
+
resource: ['subtitle'],
|
|
272
|
+
positionType: ['custom']
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
description: "Custom X position. Use ffmpeg expressions (e.g., '100' or '(w-text_w)/2')",
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
displayName: 'Position Y',
|
|
279
|
+
name: 'y',
|
|
280
|
+
type: 'string',
|
|
281
|
+
default: 'h-th-50',
|
|
282
|
+
displayOptions: {
|
|
283
|
+
show: {
|
|
284
|
+
resource: ['subtitle'],
|
|
285
|
+
positionType: ['custom']
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
description: "Custom Y position. Use ffmpeg expressions (e.g., '100' or 'h-th-50')",
|
|
289
|
+
},
|
|
290
|
+
// ===================
|
|
291
|
+
// OUTPUT FIELD NAME
|
|
292
|
+
// ===================
|
|
293
|
+
{
|
|
294
|
+
displayName: 'Output Field Name',
|
|
295
|
+
name: 'outputFieldName',
|
|
296
|
+
type: 'string',
|
|
297
|
+
displayOptions: {
|
|
298
|
+
show: {
|
|
299
|
+
resource: ['subtitle'],
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
default: 'data',
|
|
303
|
+
description: 'Name of the binary property where the output video will be stored',
|
|
304
|
+
placeholder: 'data',
|
|
305
|
+
},
|
|
306
|
+
];
|