@ferchy/n8n-nodes-aimc-toolkit 0.1.25 → 0.1.26
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.
|
@@ -60,6 +60,21 @@ function resolveOptional(moduleName) {
|
|
|
60
60
|
}
|
|
61
61
|
return undefined;
|
|
62
62
|
}
|
|
63
|
+
function findSystemBinary(name) {
|
|
64
|
+
// Common paths where ffmpeg/ffprobe might be installed
|
|
65
|
+
const commonPaths = [
|
|
66
|
+
`/usr/bin/${name}`,
|
|
67
|
+
`/usr/local/bin/${name}`,
|
|
68
|
+
`/opt/homebrew/bin/${name}`,
|
|
69
|
+
`/snap/bin/${name}`,
|
|
70
|
+
];
|
|
71
|
+
for (const p of commonPaths) {
|
|
72
|
+
if (fs.existsSync(p)) {
|
|
73
|
+
return p;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return undefined;
|
|
77
|
+
}
|
|
63
78
|
function configureFfmpeg() {
|
|
64
79
|
if (ffmpegConfigured) {
|
|
65
80
|
return;
|
|
@@ -68,15 +83,25 @@ function configureFfmpeg() {
|
|
|
68
83
|
const envFfprobe = process.env.FFPROBE_PATH;
|
|
69
84
|
const staticFfmpeg = resolveOptional('ffmpeg-static');
|
|
70
85
|
const staticFfprobe = resolveOptional('ffprobe-static');
|
|
86
|
+
// Also check for system-installed ffmpeg (common in Docker)
|
|
87
|
+
const systemFfmpeg = findSystemBinary('ffmpeg');
|
|
88
|
+
const systemFfprobe = findSystemBinary('ffprobe');
|
|
89
|
+
// Priority: env var > system > static package
|
|
71
90
|
if (envFfmpeg) {
|
|
72
91
|
fluent_ffmpeg_1.default.setFfmpegPath(envFfmpeg);
|
|
73
92
|
}
|
|
93
|
+
else if (systemFfmpeg) {
|
|
94
|
+
fluent_ffmpeg_1.default.setFfmpegPath(systemFfmpeg);
|
|
95
|
+
}
|
|
74
96
|
else if (staticFfmpeg) {
|
|
75
97
|
fluent_ffmpeg_1.default.setFfmpegPath(staticFfmpeg);
|
|
76
98
|
}
|
|
77
99
|
if (envFfprobe) {
|
|
78
100
|
fluent_ffmpeg_1.default.setFfprobePath(envFfprobe);
|
|
79
101
|
}
|
|
102
|
+
else if (systemFfprobe) {
|
|
103
|
+
fluent_ffmpeg_1.default.setFfprobePath(systemFfprobe);
|
|
104
|
+
}
|
|
80
105
|
else if (staticFfprobe) {
|
|
81
106
|
fluent_ffmpeg_1.default.setFfprobePath(staticFfprobe);
|
|
82
107
|
}
|