Following the documentation exactly, I'm attempting to use a stream to write a video conversion to file.
var FFmpeg = require('fluent-ffmpeg');
var fs = require('fs');
var outStream = fs.createWriteStream('C:/Users/Jack/Videos/test.mp4');
new FFmpeg({ source: 'C:/Users/Jack/Videos/video.mp4' })
.withVideoCodec('libx264')
.withAudioCodec('libmp3lame')
.withSize('320x240')
.on('error', function(err) {
console.log('An error occurred: ' + err.message);
})
.on('end', function() {
console.log('Processing finished !');
})
.writeToStream(outStream, { end: true });
This conversion works perfectly when I use .saveToFile(), but returns
An error occurred: ffmpeg exited with code 1
When I run this code. I'm on Windows 8.1 64 bit using a 64 bit ffmpeg build from here.