I am using fluent-ffmpeg node module for getting codec data from a file. It works if I give an output but I was wondering if there is any option to run fluent-ffmpeg without giving to it an output. This is what I am doing:
readStream.end(new Buffer(file.buffer));
var process = new ffmpeg(readStream);
process.on('start', function() {
console.log('Spawned ffmpeg');
}).on('codecData', function(data) {
//get recording duration
const duration = data.duration;
console.log(duration)
}).save('temp.flac');
As you can see I am saving the file to temp.flac
so I can get the seconds duration of that file.