@lee-jisoo/n8n-nodes-mediafx 1.6.19 → 1.6.20

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/README.md CHANGED
@@ -10,7 +10,7 @@ This is a custom n8n node for comprehensive, local media processing using FFmpeg
10
10
 
11
11
  ## 🆕 What's New in This Fork
12
12
 
13
- ### v1.6.19
13
+ ### v1.6.20
14
14
  **New Features**
15
15
 
16
16
  - **🔍 Get Metadata (Probe)**: Extract comprehensive metadata from video/audio files
@@ -20,9 +20,9 @@ This is a custom n8n node for comprehensive, local media processing using FFmpeg
20
20
  - Tags: title, artist, album, and other embedded metadata
21
21
 
22
22
  - **🔤 System Font Support**: Use fonts installed on your system
23
- - Scan system fonts with Font > List operation (enable "Include System Fonts")
24
- - Directly specify system font path in Text/Subtitle operations
23
+ - System fonts automatically appear in Font dropdown (Text/Subtitle operations)
25
24
  - Supports macOS, Linux, and Windows system font directories
25
+ - Use Font > List with "Include System Fonts" to browse all available fonts
26
26
 
27
27
  ### v1.6.14
28
28
  **Subtitle Enhancements (v1.6.1 ~ v1.6.14)**
@@ -170,7 +170,18 @@ Example output:
170
170
 
171
171
  ### Using System Fonts (New!)
172
172
 
173
- First, list available system fonts:
173
+ System fonts are automatically available in the Font dropdown. Just select any font with `(system)` suffix:
174
+ ```json
175
+ {
176
+ "resource": "subtitle",
177
+ "operation": "addSubtitle",
178
+ "fontKey": "system-helvetica",
179
+ "size": 48,
180
+ "color": "white"
181
+ }
182
+ ```
183
+
184
+ To browse all system fonts, use Font > List:
174
185
  ```json
175
186
  {
176
187
  "resource": "font",
@@ -182,18 +193,6 @@ First, list available system fonts:
182
193
  }
183
194
  ```
184
195
 
185
- Add subtitles with a system font:
186
- ```json
187
- {
188
- "resource": "subtitle",
189
- "operation": "addSubtitle",
190
- "fontSource": "system",
191
- "systemFontPath": "/System/Library/Fonts/Helvetica.ttc",
192
- "size": 48,
193
- "color": "white"
194
- }
195
- ```
196
-
197
196
  ### Speed Adjustment
198
197
  Create a 2x speed video:
199
198
  ```json
@@ -66,10 +66,11 @@ class MediaFX {
66
66
  };
67
67
  this.methods = {
68
68
  loadOptions: {
69
- // Load available fonts from API
69
+ // Load available fonts from API (including system fonts)
70
70
  async getFonts() {
71
71
  try {
72
- const allFonts = (0, utils_1.getAvailableFonts)();
72
+ // Include system fonts in the dropdown
73
+ const allFonts = (0, utils_1.getAvailableFonts)(true);
73
74
  return Object.entries(allFonts).map(([key, font]) => ({
74
75
  name: `${font.name || key} (${font.type})`,
75
76
  value: key,
@@ -336,11 +337,8 @@ class MediaFX {
336
337
  await subFileCleanup();
337
338
  };
338
339
  // Collect style options from individual parameters
339
- const fontSource = this.getNodeParameter('fontSource', i, 'bundled');
340
340
  const style = {
341
- fontSource,
342
- fontKey: fontSource === 'bundled' ? this.getNodeParameter('fontKey', i, 'noto-sans-kr') : undefined,
343
- systemFontPath: fontSource === 'system' ? this.getNodeParameter('systemFontPath', i, '') : undefined,
341
+ fontKey: this.getNodeParameter('fontKey', i, 'noto-sans-kr'),
344
342
  size: this.getNodeParameter('size', i, 48),
345
343
  color: this.getNodeParameter('color', i, 'white'),
346
344
  outlineWidth: this.getNodeParameter('outlineWidth', i, 1),
@@ -368,11 +366,8 @@ class MediaFX {
368
366
  const startTime = this.getNodeParameter('startTime', i, 0);
369
367
  const endTime = this.getNodeParameter('endTime', i, 5);
370
368
  // Collect style options from individual parameters
371
- const textFontSource = this.getNodeParameter('fontSource', i, 'bundled');
372
369
  const textOptions = {
373
- fontSource: textFontSource,
374
- fontKey: textFontSource === 'bundled' ? this.getNodeParameter('fontKey', i, 'noto-sans-kr') : undefined,
375
- systemFontPath: textFontSource === 'system' ? this.getNodeParameter('systemFontPath', i, '') : undefined,
370
+ fontKey: this.getNodeParameter('fontKey', i, 'noto-sans-kr'),
376
371
  size: this.getNodeParameter('size', i, 48),
377
372
  color: this.getNodeParameter('color', i, 'white'),
378
373
  outlineWidth: this.getNodeParameter('outlineWidth', i, 1),
@@ -190,26 +190,12 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
190
190
  async function executeAddSubtitle(video, subtitleFile, style, itemIndex) {
191
191
  var _a, _b, _c, _d, _e;
192
192
  const outputPath = (0, utils_1.getTempFile)(path.extname(video));
193
- // 1. Get Font (support both bundled and system fonts)
194
- const fontSource = style.fontSource || 'bundled';
195
- let font = null;
196
- if (fontSource === 'system') {
197
- const systemFontPath = style.systemFontPath;
198
- if (!systemFontPath) {
199
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'System font path is required when using system fonts.', { itemIndex });
200
- }
201
- font = (0, utils_1.getFontByPath)(systemFontPath);
202
- if (!font) {
203
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), `System font not found at path '${systemFontPath}'. Please check the path and ensure it's a valid font file (TTF, OTF, TTC).`, { itemIndex });
204
- }
205
- }
206
- else {
207
- const allFonts = (0, utils_1.getAvailableFonts)();
208
- const fontKey = style.fontKey || 'noto-sans-kr';
209
- font = allFonts[fontKey] || null;
210
- if (!font || !font.path) {
211
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Selected font key '${fontKey}' is not valid or its file path is missing.`, { itemIndex });
212
- }
193
+ // 1. Get Font (includes bundled, user, and system fonts)
194
+ const allFonts = (0, utils_1.getAvailableFonts)(true);
195
+ const fontKey = style.fontKey || 'noto-sans-kr';
196
+ const font = allFonts[fontKey];
197
+ if (!font || !font.path) {
198
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Selected font '${fontKey}' is not valid or its file path is missing.`, { itemIndex });
213
199
  }
214
200
  const fontName = font.name || 'Sans';
215
201
  const fontSize = style.size || 48;
@@ -62,26 +62,12 @@ function getPositionFromAlignment(horizontalAlign, verticalAlign, paddingX, padd
62
62
  }
63
63
  async function executeAddText(video, text, options, itemIndex) {
64
64
  var _a, _b, _c, _d;
65
- // Support both bundled and system fonts
66
- const fontSource = options.fontSource || 'bundled';
67
- let font = null;
68
- if (fontSource === 'system') {
69
- const systemFontPath = options.systemFontPath;
70
- if (!systemFontPath) {
71
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'System font path is required when using system fonts.', { itemIndex });
72
- }
73
- font = (0, utils_1.getFontByPath)(systemFontPath);
74
- if (!font) {
75
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), `System font not found at path '${systemFontPath}'. Please check the path and ensure it's a valid font file (TTF, OTF, TTC).`, { itemIndex });
76
- }
77
- }
78
- else {
79
- const allFonts = (0, utils_1.getAvailableFonts)();
80
- const fontKey = options.fontKey || 'noto-sans-kr';
81
- font = allFonts[fontKey] || null;
82
- if (!font || !font.path) {
83
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Selected font key '${fontKey}' is not valid or its file path is missing.`, { itemIndex });
84
- }
65
+ // Get font (includes bundled, user, and system fonts)
66
+ const allFonts = (0, utils_1.getAvailableFonts)(true);
67
+ const fontKey = options.fontKey || 'noto-sans-kr';
68
+ const font = allFonts[fontKey];
69
+ if (!font || !font.path) {
70
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Selected font '${fontKey}' is not valid or its file path is missing.`, { itemIndex });
85
71
  }
86
72
  const fontPath = font.path;
87
73
  // Set default values for text options
@@ -130,23 +130,7 @@ exports.subtitleProperties = [
130
130
  // COMMON FONT & STYLE OPTIONS
131
131
  // ===================
132
132
  {
133
- displayName: 'Font Source',
134
- name: 'fontSource',
135
- type: 'options',
136
- options: [
137
- { name: 'Bundled/Uploaded Fonts', value: 'bundled', description: 'Use fonts bundled with MediaFX or uploaded by user' },
138
- { name: 'System Font Path', value: 'system', description: 'Specify path to a system font file' },
139
- ],
140
- default: 'bundled',
141
- displayOptions: {
142
- show: {
143
- resource: ['subtitle'],
144
- },
145
- },
146
- description: 'Choose font source type',
147
- },
148
- {
149
- displayName: 'Font Key',
133
+ displayName: 'Font',
150
134
  name: 'fontKey',
151
135
  type: 'options',
152
136
  typeOptions: { loadOptionsMethod: 'getFonts' },
@@ -154,24 +138,9 @@ exports.subtitleProperties = [
154
138
  displayOptions: {
155
139
  show: {
156
140
  resource: ['subtitle'],
157
- fontSource: ['bundled'],
158
- },
159
- },
160
- description: 'Font to use for the text',
161
- },
162
- {
163
- displayName: 'System Font Path',
164
- name: 'systemFontPath',
165
- type: 'string',
166
- default: '',
167
- placeholder: '/System/Library/Fonts/AppleSDGothicNeo.ttc',
168
- displayOptions: {
169
- show: {
170
- resource: ['subtitle'],
171
- fontSource: ['system'],
172
141
  },
173
142
  },
174
- description: 'Full path to system font file (TTF, OTF, TTC). Use Font > List operation with "Include System Fonts" to find available fonts.',
143
+ description: 'Font to use for the text (includes bundled, user-uploaded, and system fonts)',
175
144
  },
176
145
  {
177
146
  displayName: 'Font Size',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lee-jisoo/n8n-nodes-mediafx",
3
- "version": "1.6.19",
3
+ "version": "1.6.20",
4
4
  "description": "N8N custom nodes for video editing and media processing (Enhanced fork with Speed control and Subtitle fixes)",
5
5
  "license": "MIT",
6
6
  "author": {