我正在尝试在存储中上传视频时获取图像的缩略图。似乎无法正常工作,给我一个错误。
const tempThumbnailFilePath=path.join(os.tmpdir(), 'neew.jpg');
return bucket.file(thumbnailName).download({
destination: tempThumbnail,
}).then(()=>{
return spawn('ffmpeg', ['-ss', '0', '-i', tempThumbnail, '-f', 'image2', '-vframes', '1', '-vf', 'scale=512:-1', tempThumbnailFilePath], { capture: [ 'stdout', 'stderr' ]}).then((writeResult) => {
console.log('thumnail created');
console.log('[spawn] stdout: ', writeResult.stdout.toString());
}).catch(function (err) {
console.log('[spawn] stdout: ', err);
});
我收到这样的错误
[spawn]标准输出:{错误:spawn ffmpeg ENOENT 在exports._errnoException(util.js:1020:11)