简体   繁体   中英

Concat audio and video on fluent-ffmpeg

Im triyng to concat audio and video with the library fluent-ffmpeg but it is not workyng. Anyone can help me?

var proc = ffmpeg(firstFile)
    .input(secondFile)
    .input(thirdFile)
    .input("./musicas/1.wav")
    //.input(...)
    .on('end', function() {
      console.log('files have been merged succesfully');
    })
    .on('error', function(err) {
      console.log('an error happened: ' + err.message);
    })
    .mergeToFile(outPath);

Use the events after the mergeToFile method is called.

var proc = ffmpeg(firstFile)
    .input(secondFile)
    .input(thirdFile)
    .input("./musicas/1.wav")
    .mergeToFile(outPath);
    .on('end', function() {
      console.log('files have been merged succesfully');
    })
    .on('error', function(err) {
      console.log('an error happened: ' + err.message);
    })

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM