var fs = require('fs');
var ffmpeg = require('fluent-ffmpeg');
var outStream = fs.createWriteStream('output.mp4'); //output path
ffmpeg('input.mp4')
.duration(600) //trim
.on('error', function(err) {
console.log('An error occurred: ' + err.message);
})
.on('end', function() {
console.log('Processing finished !');
})
.pipe(outStream, { end: true });
I installed fluent-ffmpeg in my working directory, can anybody tell me what are the other requirements? I'm working on a windows machine.