I am trying to add audio on top video using ffmpeg
ffmpeg -i sample.mp4 -i sample.mp3 -c copy -map 0:v:0 -map 1:a:0 output.mp4
Above code works in my terminal but I would like to use this via ffmpeg node wrapper fluent-ffmpeg
This code is not working and it also not throwing any error
ffmpeg()
.input('DATA/sample.mp4')
.input('DATA/sample.mp3')
.videoCodec('copy')
.outputOptions(['-map 0:v:0', '-map 1:a:0'])
// .outputOption('-map 1:a:0')
.save('node.mp4')
.on('error', function (err, stdout, stderr) { console.log(err.message); });to log possible error.