Monday, 1 May 2017

Why am I getting a 'withSize' of undefined error?

I am trying to simply covert an avi video to flv using the example in the fluent-ffmpeg documentation. I am doing this for my node.js app but for some reason no matter how I specify my video path I seem to keep getting "undefined" when I do thing like .setStartTime or .setDuration. I am aware of this post but I still seem to be getting this error. Could anyone help me just set up the basic starter code? Thank you

var ffmpeg = require('fluent-ffmpeg');


// path to my video file
var infs = fs.createReadStream('uwf.mp4');
infs.on('error', function(err) {
  console.log("u messed up");
});

var proc = new ffmpeg({ source: infs, nolog: true })
  .setFfmpegPath("ffmpeg") //Set the path to where FFmpeg is installed 
  .setStartTime(25)
  .setDuration(2)
  .saveToFile('test.mp4');

my console

my file tree



via Nick Garver

No comments:

Post a Comment