by zhuker

zhuker / lamejs

mp3 encoder in javascript

494 Stars 99 Forks Last release: over 3 years ago (1.2.0) Other 60 Commits 1 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:


Fast mp3 encoder written in JavaScript. On my machine it works 20x faster than realtime (it will encode 132 second long sample in 6.5 seconds) both on node and chrome. lamejs is a rewrite of jump3r-code which is a rewrite of libmp3lame.


To install via Bower or npm, simply do the following:

$ bower install lamejs --save
$ npm install lamejs

Quick Start

To use lamejs in Node.js build, you can install it from

npm install lamejs

Then use it:

var lamejs = require("lamejs");

Real Example

Either see example.html for full example of wav file encoding in browser or use this:


If you want to encode stereo mp3 use separate sample buffers for left and right channel

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.