Tiny node.js module to concat multiple audio files using ffmpeg
audioconcat provides a programmatic interface to do basically the same as calling ffmpeg
via CLI like:
ffmpeg -i "concat:audio1.mp3|audio2.mp3" -acodec copy out.mp3
- ffmpeg with additional compilation flags
--enable-libmp3lame
You can download static builds of ffmpeg from here.
If you want to use audioconcat
in Heroku, you could use the ffmpeg2 buildpack
npm install audioconcat
var audioconcat = require('audioconcat')
var songs = [
'beatles.mp3',
'greenday.mp3',
'u2.mp3'
]
audioconcat(songs)
.concat('all.mp3')
.on('start', function (command) {
console.log('ffmpeg process started:', command)
})
.on('error', function (err, stdout, stderr) {
console.error('Error:', err)
console.error('ffmpeg stderr:', stderr)
})
.on('end', function (output) {
console.error('Audio created in:', output)
})
Take a look to the programmatic API for more details
Return: audioconcat
audioconcat constructor. You should pass an array<string>
with the desired audio files,
and optionally passing the video render options
object per each image.
Supported audio formats: mp3
, acc
, ogg
(based on your ffmpeg compilation)
Concat files and generate the output audio to the given file path.
Add custom options to ffmpeg
Type: string
Current package semantic version
Type: function
fluent-ffmpeg API constructor
MIT © Tomas Aparicio