time to get MAD

The prime reason I bought the Sheevaplug is to run the automatic podcast. Every day, the script has to decode a bunch of mp3s to WAV format.On a normal computer, this takes a few seconds per file. On the Sheevaplug – with no floating-point instructions, things get painful:

$ time lame --mp3input 03-in_the_aeroplane_over_the_sea.mp3 03-in_the_aeroplane_over_the_sea.wav
ID3v2 found. Be aware that the ID3 tag is currently lost when transcoding.
LAME 3.98 32bits (http://www.mp3dev.org/)
Using polyphase lowpass filter, transition band: 16538 Hz - 17071 Hz
Encoding 03-in_the_aeroplane_over_the_sea.mp3
to 03-in_the_aeroplane_over_the_sea.wav
Encoding as 44.1 kHz j-stereo MPEG-1 Layer III (11x) 128 kbps qval=3
Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
7750/7750  (100%)|    8:45/    8:45|    8:46/    8:46|   0.3851x|    0:00
-------------------------------------------------------------------------------
kbps        LR    MS  %     long  %
128.0        2.1  97.9       100.0
Writing LAME Tag...done
ReplayGain: -8.9dB

real    8m46.408s
user    8m45.940s
sys    0m0.090s

That’s right – nearly 9 minutes to decode a song! My very first Pentium 75 could probably do better than that.

I’d heard that MAD was really fast on integer-only CPUs, so I tried it:

$ time madplay -o 03-in_the_aeroplane_over_the_sea.wav 03-in_the_aeroplane_over_the_sea.mp3
MPEG Audio Decoder 0.15.2 (beta) - Copyright (C) 2000-2004 Robert Leslie et al.
Title: In the Aeroplane Over the Sea
Artist: Neutral Milk Hotel
Album: In the Aeroplane Over the Sea
Track: 3
Year: 1998
Genre: Alternative
Comment:
7748 frames decoded (0:03:22.3), +1.2 dB peak amplitude, 1423 clipped samples

real    0m7.134s
user    0m6.500s
sys    0m0.580s

Seven seconds sure beats nearly nine minutes. Now, if only I could find an integer MP3 encoder …

awe-inspiring terminal output

sheevaplug terminal outputWell, not really that awe-inspiring. But it does show that the Sheevaplug boots and runs out of the box. Given that it has only 512MB of RAM and the same amount of Flash storage, it’s a fairly small system.

I really want to have this replace my Firefly Media Server installation on the laptop. First, I need to work out how to get it to boot from an external HD.