@lee-jisoo/n8n-nodes-mediafx 1.6.7 → 1.6.8
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.
|
@@ -97,10 +97,24 @@ function isASSFile(filePath) {
|
|
|
97
97
|
* Convert SRT content to ASS format with full styling support
|
|
98
98
|
*/
|
|
99
99
|
function convertSRTtoASS(srtContent, fontName, fontSize, primaryColor, outlineColor, outlineWidth, backColor, enableBackground, alignment, marginV, marginL, marginR, videoWidth, videoHeight) {
|
|
100
|
-
// BorderStyle
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
// BorderStyle=3 with large Outline creates a background box effect
|
|
101
|
+
// OutlineColour is used as the box color when BorderStyle=3
|
|
102
|
+
let borderStyle;
|
|
103
|
+
let outline;
|
|
104
|
+
let shadow;
|
|
105
|
+
let effectiveOutlineColor;
|
|
106
|
+
if (enableBackground) {
|
|
107
|
+
borderStyle = 3;
|
|
108
|
+
outline = 15; // Large outline creates box effect
|
|
109
|
+
shadow = 0;
|
|
110
|
+
effectiveOutlineColor = backColor; // Use background color as outline
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
borderStyle = 1;
|
|
114
|
+
outline = outlineWidth;
|
|
115
|
+
shadow = 0;
|
|
116
|
+
effectiveOutlineColor = outlineColor;
|
|
117
|
+
}
|
|
104
118
|
const header = `[Script Info]
|
|
105
119
|
Title: Generated by MediaFX
|
|
106
120
|
ScriptType: v4.00+
|
|
@@ -111,7 +125,7 @@ PlayResY: ${videoHeight}
|
|
|
111
125
|
|
|
112
126
|
[V4+ Styles]
|
|
113
127
|
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
|
|
114
|
-
Style: Default,${fontName},${fontSize},${primaryColor},${primaryColor},${
|
|
128
|
+
Style: Default,${fontName},${fontSize},${primaryColor},${primaryColor},${effectiveOutlineColor},${backColor},0,0,0,0,100,100,0,0,${borderStyle},${outline},${shadow},${alignment},${marginL},${marginR},${marginV},1
|
|
115
129
|
|
|
116
130
|
[Events]
|
|
117
131
|
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
|
package/package.json
CHANGED