zhuker / lamejs

mp3 encoder in javascript
Other
813 stars 200 forks source link

mp3 input #30

Open danteinzu opened 8 years ago

danteinzu commented 8 years ago

Hi, thanks for your perfect library :)

I know nothing about audio encoding and I am trying to use this library for low the bitrate of an mp3 file in browser. input: mp3 320kbps -> output: mp3 128kbps

I assigned a mp3 file as arraybuffer to the samples variable but i only obtain noise.

var samples = new Int16Array(mp3file);

is there something similar to WavHeader.readHeader() but for mp3? what should I do?

Can you help me please? I appreciate your help so much

zhuker commented 8 years ago

You need to decode your high bitrate mp3 first and then encode it with lamejs. You can use web audio api for it.