diff --git a/package.json b/package.json index 3ffb383..9cd8f23 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "cors": "^2.8.5", "dotenv": "^16.4.5", "express": "^4.19.2", + "ffmpeg-static": "^5.2.0", "fluent-ffmpeg": "^2.1.3", "ws": "^8.13.0" } diff --git a/server.js b/server.js index bdb6fc4..939f24c 100644 --- a/server.js +++ b/server.js @@ -6,10 +6,15 @@ const path = require('path'); const http = require('http'); const WebSocket = require('ws'); const ffmpeg = require('fluent-ffmpeg'); +const ffmpegStatic = require('ffmpeg-static'); const { S3Client, ListBucketsCommand, ListObjectsV2Command, GetObjectCommand } = require('@aws-sdk/client-s3'); dotenv.config(); +if (ffmpegStatic) { + ffmpeg.setFfmpegPath(ffmpegStatic); +} + const app = express(); const PORT = process.env.PORT || 3000; const HOST = process.env.HOST || process.env.LISTEN_ADDRESS || '0.0.0.0';