I want to split 10 minute audio mp3 file to 10 different 1 minute files using fluent-ffmpeg
package in nodejs
.
We can do this for ffmpeg
package using the following command
ffmpeg -i file.wav -f segment -segment_time 60 -c copy parts/output%09d.wav
But I want the same functionality in fluent-ffmpeg
for nodejs
. What is the name of the method?
return ffmpeg(audioFile)
.toFormat('wav')
.audioChannels(1)
.audioFrequency(44100)
.audioBitrate('128')
.on('error', (err) => {
//error
})
.on('progress', (progress) => {
//progress
})
.on('end', () => {
// on complete
})
I tried looking at documentation for the segment feature for fluent-ffmpeg
but couldn't get any solution.