Hi there! This post is beyond ancient, and made sense back when the original Raspberry Pi Linux distributions didn’t have floating point support. With the multi-core Raspberry Pi 3, lame now runs at an acceptable rate. You should probably ignore this post unless you’re deliberately trying to recreate that bubbly old MP3 sound.
One thing the Raspberry Pi is not good at is encoding MP3s at any great speed. At best (using lame) you might get slightly better than 2× real time playback. If you’re using your Raspberry Pi to transcode to another format, that might be slow enough (with other system overhead) to make the output stutter.
While it would be nice to have the GPU as a general media encoder, we’re not there yet. If you must encode mp3s quickly on a Raspberry Pi, there are a couple of options:
- Comprec – http://unimut.fsk.uni-heidelberg.de/demi/comprec/index.html
This uses ARM assembly language. The code is a little fiddly to compile, but can encode to a 128 kbit/s mp3 in ~ 6× real time. I’ve used this for years. - Shine – https://github.com/savonet/shine
This is actually being maintained, and is portable between architectures. Not quite as fast as comprec, at 2.7× real time, but still a bit faster than lame.
Please note that both of these are based on the old ‘8hz’ mp3 encoder, which was a fairly literal interpretation of the original Fraunhofer code. They only start producing okay sounding files at high bitrates.
If you need to decode mp3s quickly, MAD is pretty good: http://www.underbit.com/products/mad. It’s in the repos as ‘madplay’.