使用NPM的ffmpeg
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user