Spaces:
Running
Running
Commit ·
2e90118
1
Parent(s): 87f9eb2
Fixes
Browse files- ffmpeg-fix.js +12 -3
- package-lock.json +0 -0
- package.json +8 -13
ffmpeg-fix.js
CHANGED
|
@@ -30,9 +30,18 @@ async function findAndCreateSymlink(targetExecutable, ffmpegPath) {
|
|
| 30 |
try {
|
| 31 |
// Find the target executable in the system's PATH
|
| 32 |
var ffmpegPath = ffmpegPath || await which(targetExecutable);
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
} catch (error) {
|
| 37 |
console.error('An error occurred while creating symlink ffmpeg:', error);
|
| 38 |
}
|
|
|
|
| 30 |
try {
|
| 31 |
// Find the target executable in the system's PATH
|
| 32 |
var ffmpegPath = ffmpegPath || await which(targetExecutable);
|
| 33 |
+
let remotionFolder = path.join(__dirname, 'node_modules', '@remotion')
|
| 34 |
+
const files = fs.readdirSync(remotionFolder);
|
| 35 |
+
files.forEach((file) => {
|
| 36 |
+
const filePath = path.join(remotionFolder, file);
|
| 37 |
+
const stat = fs.statSync(filePath);
|
| 38 |
+
if (stat.isDirectory() && file.startsWith('compositor-')) {
|
| 39 |
+
const symlinkPath = path.join(filePath, 'ffmpeg', 'remotion', 'bin', targetExecutable);
|
| 40 |
+
// await createSymlink(ffmpegPath, symlinkPath);
|
| 41 |
+
fs.copyFileSync(ffmpegPath, symlinkPath)
|
| 42 |
+
console.log('Coped to', symlinkPath)
|
| 43 |
+
}
|
| 44 |
+
});
|
| 45 |
} catch (error) {
|
| 46 |
console.error('An error occurred while creating symlink ffmpeg:', error);
|
| 47 |
}
|
package-lock.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
package.json
CHANGED
|
@@ -31,6 +31,13 @@
|
|
| 31 |
}
|
| 32 |
},
|
| 33 |
"dependencies": {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
"firebase-admin": "^11.9.0",
|
| 35 |
"firebase-functions": "^4.4.1",
|
| 36 |
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
|
@@ -57,18 +64,6 @@
|
|
| 57 |
"which": "^3.0.1",
|
| 58 |
"zod": "^3.21.4"
|
| 59 |
},
|
| 60 |
-
"devDependencies": {
|
| 61 |
-
"@remotion/cli": "4.0.19",
|
| 62 |
-
"@remotion/eslint-config": "4.0.19",
|
| 63 |
-
"@remotion/tailwind": "4.0.19",
|
| 64 |
-
"@types/react": "^18.0.26",
|
| 65 |
-
"@types/web": "^0.0.86",
|
| 66 |
-
"eslint": "^8.43.0",
|
| 67 |
-
"prettier": "^2.8.8",
|
| 68 |
-
"react": "^18.0.0",
|
| 69 |
-
"react-dom": "^18.0.0",
|
| 70 |
-
"remotion": "4.0.19",
|
| 71 |
-
"typescript": "^4.9.4"
|
| 72 |
-
},
|
| 73 |
"packageManager": "npm@8.19.4"
|
| 74 |
}
|
|
|
|
| 31 |
}
|
| 32 |
},
|
| 33 |
"dependencies": {
|
| 34 |
+
"@remotion/cli": "4.0.19",
|
| 35 |
+
"@remotion/eslint-config": "4.0.19",
|
| 36 |
+
"@remotion/tailwind": "4.0.19",
|
| 37 |
+
"@types/react": "^18.0.26",
|
| 38 |
+
"@types/web": "^0.0.86",
|
| 39 |
+
"remotion": "4.0.19",
|
| 40 |
+
"typescript": "^4.9.4",
|
| 41 |
"firebase-admin": "^11.9.0",
|
| 42 |
"firebase-functions": "^4.4.1",
|
| 43 |
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
|
|
|
| 64 |
"which": "^3.0.1",
|
| 65 |
"zod": "^3.21.4"
|
| 66 |
},
|
| 67 |
+
"devDependencies": {},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
"packageManager": "npm@8.19.4"
|
| 69 |
}
|