0

I am trying to understand if this is valid, to add in the setStartTime option half way through merging my audio:

new FFmpeg({ source: '/path/to/part1.avi' })
    .setStartTime(120)
    .mergeAdd('/path/to/part2.avi')
    .mergeAdd('/path/to/part2.avi')
    .on('error', function(err) {
        console.log('An error occurred: ' + err.message);
    })
    .on('end', function() {
        console.log('Merging finished !');
    })
    .mergeToFile('/path/to/merged.avi', '/path/to/tempDir');
Stephen Kennedy
  • 20,585
  • 22
  • 95
  • 108
DarkArtistry
  • 434
  • 1
  • 6
  • 22
  • Syntax is a little bit strange. What do you want to achieve? You have 2 `.mergeAdd('/path/to/part2.avi')` ... – Business Tomcat Mar 03 '18 at 08:17
  • the second merAdd is as per documentation on their github page. hmmmm i also find it weird ... https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/tree/1.x @TheBusinessTomcat – DarkArtistry Mar 03 '18 at 15:29
  • Last time I read the docs of fluent-ffmpeg I didn't realize this o_O .. But I'm sure, you only pass it once. Look at this answer if you want to handle merge: https://stackoverflow.com/a/48379526/6472702 You can't setStartTime (seekInput) for two videos and merge them. You first have to handle them for their own and merge afterwards. Dragonborn made a hint in his comment to use setTimeout. – Business Tomcat Mar 03 '18 at 15:39

0 Answers0