【问题标题】:Concat audio and video on fluent-ffmpeg在 fluent-ffmpeg 上连接音频和视频
【发布时间】:2023-04-06 06:14:02
【问题描述】:

我正在尝试使用库 fluent-ffmpeg 连接音频和视频,但它无法正常工作。谁能帮帮我?

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);

【问题讨论】:

标签: node.js ffmpeg fluent-ffmpeg


【解决方案1】:

使用mergeToFile方法调用后的事件。

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);
    })

【讨论】:

  • Cannot find a match stream for unlabeled input pad 3 on filter Parsed_concat_0 这不起作用..我也遇到同样的错误
猜你喜欢
  • 2012-03-09
  • 2016-09-06
  • 2015-08-16
  • 2012-10-02
  • 2016-05-25
  • 1970-01-01
  • 2017-04-26
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多