I am trying to generate video thumbnail but I am not getting an idea how to do that, I tried using fluent-ffmpeg & Video-thumbnail libraries but I don't know how to use them. Please, someone, help me Note I cannot usersocket.io in my project
I have tried this
const ffmpeg = require('fluent-ffmpeg');
const ffmpeg_static = require('ffmpeg-static');
ffmpeg(req.file.path)
.screenshots({
timestamps: [0.0],
filename: 'xx.png',
folder: upload_folder
}).on('end', function() {
console.log('done');
});
getting this error
events.js:183
throw er; // Unhandled 'error' event
^
Error: Cannot find ffmpeg
You should install ffmpeg >= 0.9
on the host machine in order to use fluent-ffmpeg
package.