我在一个文件夹中有视频,我希望每隔x秒获取一次帧,并将每个图像存储在另一个文件夹中。
var proc = new ffmpeg({ source: '/path/to/your_movie.avi' })
.withSize('150x100')
.takeScreenshots(5, '/path/to/thumbnail/folder', function(err, filenames) {
if(err){
throw err;
}
console.log(filenames);
console.log('screenshots were saved');
});
它说无法找到探测器。
var proc = new ffmpeg({ source: '/path/to/your_movie.avi' })
.takeScreenshots({
count: 2,
timemarks: [ '0.5', '1' ]
}, '/path/to/thumbnail/folder', function(err, filenames) {
console.log(filenames);
console.log('screenshots were saved');
});
它正在工作,但我每秒都想要截图,它存储在png中,但我想要在jpeg中。