1
我試圖在AWS中包含ffmpeg
庫。在AWS中包含ffmpeg庫Lambda
drwxrwxrwx 2 root root 0 Dec 22 13:04 bin
-rwxrwxrwx 1 root root 40166912 Dec 22 11:50 ffmpeg.exe
-rwxrwxrwx 1 root root 30 Dec 22 13:04 version.sh
drwxrwxrwx 2 root root 0 Dec 22 16:35 node_modules
-rwxrwxrwx 1 root root 594 Dec 22 13:03 package.json
-rwxrwxrwx 1 root root 818 Dec 30 11:04 SplitFrames.js
下面是什麼在主js文件,SplitFrames.js
var execute = require('lambduh-execute');
var validate = require('lambduh-validate');
process.env['PATH'] = process.env['PATH'] + ':/tmp/:' + process.env['LAMBDA_TASK_ROOT']
exports.handler = function(event, context, callback) {
var exec = require('child_process').exec;
var cmd = 'ffmpeg -version';
exec(cmd, function(error, stdout, stderr) {
console.log(stdout);
callback(null, stdout);
});
}
我測試功能的λ,它什麼也不輸出。想知道如何在AWS和節點j中包含ffmpeg庫。任何幫助是極大的讚賞。