0

Is it possible to add multiple files as input to fluent-ffmpeg and get output for all provided files..?

Edit 1:

var commonPath = __dirname + '/path/to/file/'; 

ffmpeg() 
  .input(commonPath + 'file1.mp4')  
  .output(commonPath + 'newFile1.avi')
  .toFormat('avi')  
  .input(commonPath + 'file2.mp4')  
  .output(commonPath + 'newFile2.avi')
  .toFormat('avi')
  .on('error',function(err){
    console.log(err);
  })  
  .run();
Lalit Goswami
  • 798
  • 1
  • 8
  • 21

1 Answers1

0

Yes, if you go through the docs of fluent-ffmpeg, it's specified there that you can add multiple inputs and outputs using .input() and .output().

Abhyudit Jain
  • 3,640
  • 2
  • 24
  • 32
  • thanks for the fast reply.... i have edited my answer. I tried code mentioned in the question but it writes the file2.mp4 to all the output files. Do you have any idea regarding this problem...? – Lalit Goswami Nov 08 '16 at 10:22