Home > other >  Compressing mp3 audio in javascript
Compressing mp3 audio in javascript

Time:12-27

Is there any way to compress mp3 audio in react js

I record audio using AudioReactRecorder and save the url as mp3. Then, I upload the audio in react-s3 aws. In my webpage, I recorded an audio for just 24 seconds, but the size of this audio is 4.5mb. How can I reduce the bitrate of mp3 audio while saving to aws.

CodePudding user response:

Not sure that there’s good solution to do it in browser. Use Lambda Function before save it to s3.

You can try this one: https://github.com/zhuker/lamejs

Or try to limit bitRate before recording

CodePudding user response:

i dont know if that helps but try another package check this tutorial: https://medium.com/front-end-weekly/recording-audio-in-mp3-using-reactjs-under-5-minutes-5e960defaf10

hope helps :)

  • Related