我正在使用 ffmpeg 生成屏幕截图。它生成缩略图,但花费的时间太长(超过 2 分钟)。
我已经提到了这个链接
但我必须在我的nodejs代码中设置
ffmpeg(main_folder_path)
.on('filenames', function(filenames) {
console.log('Will generate ' + filenames.join(', '))
})
.on('end', function() {
console.log('Screenshots taken');
})
.screenshots({
pro_root_path+'public/uploads/inspection/'+req.body.clientID+'/images/'
timestamps: [30.5, '20%', '01:10.123'],
filename: 'thumbnail-at-%s-seconds.png',
folder: pro_root_path+'public/uploads/inspection/'+req.body.clientID+'/images/',
size: '320x240'
});
Run Code Online (Sandbox Code Playgroud)
我使用了时间戳,但即使它花费了超过 2 分钟。我该如何解决这个问题。