Closed jamesstaub closed 3 years ago
This does not seem to be a problem for the oggvorbis encoder. It worked fine on much larger mp3s with the same settings.
Thanks for reporting. I've published version 0.6.4
which hopefully will fix this issue. Please try it out and let me know.
As a workaround for the older library versions, you can break up your input buffer into chunks smaller than 2500000 samples and call encode()
multiple times, reassembling the returned buffers afterwards.
I cannot seem to successfully encode large mp3s. I was able to encode a buffer of around 2500000 samples, but once I try a buffer over 10000000 samples I get the following error
Which seems to be due to
this.module.enc_encode(this.ref, pcm[0].length);
returning-1
inencoder.ts
.Please advise if there are any strategies for handling larger mp3s. I am more or less using the exact implementation of
createMp3Encoder
from the readme with sample rate 44100 2 channels and 128 bitrate. The error happens the first timeencoder.encode(pcmChannels)
is called.