Tuesday, February 15th, 2005
Faster LAME for TiVo AAC Playback
In my previous post, I was hoping to speed up the AAC-to-MP3 transcoding by compiling LAME on my own. This turned out to be very easy and gave quite an impressive performance improvement.
Here are the steps on the command line for a G4 (from the blacktree forum). Note that the multi-line commands should be entered on one line.
$ cd ~
$ mkdir tmp
$ cd tmp
$ curl http://internap.dl.sourceforge.net/sourceforge/lame/lame-3.96.1.tar.gz -o lame-3.96.1.tar.gz
$ tar xvzf lame-3.96.1.tar.gz
$ cd lame-3.96.1
$ ./configure CFLAGS="-O3 -falign-loops-max-skip=15 -falign-jumps-max-skip=15 -falign-loops=16 -falign-jumps=16 -falign-functions=16 -malign-natural -ffast-math -fstrict-aliasing -funroll-loops -floop-transpose -mpowerpc-gpopt -fsched-interblock --param max-gcse-passes=3 -fno-gcse-sm -mcpu=G4 -mtune=G4"
$ make
$ sudo make install
$ cd ~
$ rm -rf tmp
After compiling, I compared the resulting binary program in /usr/local/bin/lame to the fink-compiled lame and found that the optimized version was 3.6x faster (7 versus 25 seconds) at compressing an mp3 with the default options.
This optimization reduced my processor usage while transcoding with TiVo from 80% to 25%.
