Node-fluent-ffmpeg: Merging Audio and video

Created on 21 Jun 2014  路  1Comment  路  Source: fluent-ffmpeg/node-fluent-ffmpeg

I was about to merge an audio and video file, According to docs, there is a method name "mergedAdd" that is supposed to merge multiple media streams, But it did not work for me. Am I missing something?

new FFmpeg({ source: '/media/myVideo.avi' })
.mergeAdd('/media/myAudio.mp3')
.on('error', function(err) {
console.log('An error occurred: ' + err.message);
})
.on('end', function() {
console.log('Final video created!');
})

Thanks

Question

Most helpful comment

You'd have to call mergeToFile to start processing. But this is not what you want to use.

mergeAdd and mergeToFile actually have misleading names. They are used to concatenate videos into a single video file.

You should use addInput to add your audio file and then use saveToFile to save the merged output.

>All comments

You'd have to call mergeToFile to start processing. But this is not what you want to use.

mergeAdd and mergeToFile actually have misleading names. They are used to concatenate videos into a single video file.

You should use addInput to add your audio file and then use saveToFile to save the merged output.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joergbirkhold picture joergbirkhold  路  5Comments

TomKaltz picture TomKaltz  路  5Comments

345ml picture 345ml  路  6Comments

odigity picture odigity  路  4Comments

baoxiangyang picture baoxiangyang  路  3Comments