G5 Optimized LAME

LAME is my perferred MP3 encoder, but it’s kind of slow, even on my dual-cpu G5. Now, the G4 and G5 processors have a special instruction set called Altivec which should, in theory, speed up certain tasks. Photoshop, Final Cut Pro and even Apple’s own iTunes take advantage of this. LAME does not, but I was thinking that it should. I’m currently using LAME installed from sources from Fink, so I thought I was getting a somewhat optimized version. I was wrong. After a little searching I found this page that has some flags to use when you compile LAME from source (it’s really easy, don’t worry). You don’t have to use the ones in the main article there, scroll down a bit and there’s a simplified version:

./configure –enable-static –disable-shared CFLAGS=”-fast”

Then a “make” and “sudo make install” and you’re all set. Here’s the results of a test I performed on a 2:14 .wav file (rock song, fairly complex) with various encoding settings (CPU time in minutes:seconds. lower is better, kbps shown for VBR modes):

Fink Version (3.93)
preset standard – 1:35 (217.2 kbps)
preset fast standard – 0:46 (210.0 kbps)
preset extreme – 1:30 (240.0 kbps)
preset fast extreme – 0:48 (235.2 kbps)
preset insane – 0:43
preset cbr 128 – 0:56
preset cbr 192 – 0:53
preset 128 – 0:57 (123.6 kbps)
preset 192 – 0:52 (189.7 kbps)

G5 Optimized (3.96.1)
preset standard – 0:16 (204.7 kbps)
preset fast standard – 0:11 (226.0 kbps)
preset extreme – 0:15 (249.3 kbps)
preset fast extreme – 0:11
preset cbr 128 – 0:12
preset cbr 192 – 0:12
preset 128 – 0:13 (125.5 kbps)
preset 192 – 0:11 (191.8 kbps)

As you can see, there’s a 4-6x speed up across the board. This is not taking into account any additional speedups in the code from version 3.93 to 3.96.1, but I can’t see it making that big of a difference.

Why I live in Vermont…

This is the only place where people will vote at the town meeting to:

1. Approve measures to fix coyote problem that is having a negative effect on the deer population (all the deer are going to die!).

Then, ten minutes later:

2. Approve more relaxed rules for deer hunting season to fix the deer over-population problem (there’s too many deer, we need to be able to shoot more).

Top 10 of 2004

Right, so I’m a month late. But I finally figured out that iTunes could make me a list of what really were my favorite songs of 2004. Just create a smart playlist with Year=2004 limit to 10 songs sorted by most often played. Rob Gordon would be so proud.

10. Verse Chorus Verse (Outtake, 1991) – Nirvana – With The Lights Out (11x)

09. Ain’t It A Shame (Demo, 1989) – Nirvana – With The Lights Out (11x)

08. Blandest (Demo, 1988) – Nirvana – With The Lights Out (12x)

07. Horn Intro/world at Large – Modest Mouse – Good News for People Who Love Bad News (12x)

06. I Fought the Law – Green Day – I Fought the Law – Single (13x)

05. Got to Get You Trapped Under Ice – Beatallica – Beatallica (13x)

04. Blackened the USSR – Beatallica – Beatallica (13x)

03. Float on – Modest Mouse – Good News for People Who Love Bad News (15x)

02. Stand Up (Fatboy Slim Remix) – Ludacris – Stand Up (Enhanced) [CD-SINGLE] [IMPORT] (17x)

01. Kids Rock (Sean Paul vs. Queen) – Loo & Placido – Mash Up The Tops (18x)

Stuff that almost made it in: Gold Medal The Donnas, Take Me Out Franz Ferdinand, And I’m Evil Betallica, Do Re Mi (Solo Acoustic, 1994) Nirvana

Close