The amix merging the both audio work fine. But when I try to add the aloop filter, I got an error :
Error: ffmpeg exited with code 1: Cannot find a matching stream for unlabeled input pad 1 on filter Parsed_amix_1
My code:
ffmpeg()
.input(audio.path)
.input('assets/plateform-tags/default_tag_male.mp3')
.complexFilter
([
{ filter: 'aloop', options: { loop: -1, size: 100, start: 1 }},
{ filter: 'amix', options: { inputs: 2, duration: 'longest' }},
])
.on('error', (err) => {
console.log(err)
})
.on('end', async function (output) {
console.log(output, 'Files have been merged and saved')
}).saveToFile('assets/plateform-tags/tagged_version.mp3')
Any suggestions ? Thank's ! Up !