Ipod Shuffle and Linux

Terry Klarich terry at klarich.net
Wed Oct 12 20:34:11 UTC 2005


Hello All:

The ipod Shuffle is very accessible and usable by the blind.  Hey, I'm living proof.  Mine works great.  If you already knew this or don't
care, don't bother reading further.

Unfortunately, it is time for me to head out to Guide Dogs again.  I'm going out to Oregon in November.  My guide Karo of 8 years
is getting old and is ready to take off the harness for good.  Unlike corporate America, she deserves  a good retirement.  She is my
faithful and trusty companion.  I'm sure there is a lot of you who know what it is like to retire a dog guide.  I could probably
write a book on guide dogs.

anyway, when deciding what I was going to take, I wanted to travel light.  I'll have to take my laptop for work related email.
Therefore, I didn't want to also pack a cd player with a bunch of cds or a tape player with a bunch of tapes.  You get the idea.
My wife was given an ipod shuffle as a gift.  When I asked her about it, I found that she was just using it as a usb storage
device.  She let me see what I could do with it.  Given a few days of persistance and web searching, I am happily listening to my
ipod.  It's sure a lot nicer than my old fm radio while I'm on the treadmill.  The sound is very good.

The first step was figuring out how to rip a cd onto my linux machine.  There are a few gui programs which do a nice job of this.
(so I'm told)  I did find a text base shell script which said it would do it.  The script name is ripext.  I was unable to make it
work and didn't feel like hacking it.  It looked like development on it had stoped 4 or 5 years ago.  So, I gave up on immediately
building my mp3 library until I got the ipod shuffle working.

So, I used cdparanoia to convert a cd into wav files on my hard disk.  I then obtained the source to lame.  Which compiled right
out of the tar ball.  At this point, I decided to do some listening tests of my newly created mp3's to see which bit rate I liked.
It seems that most folks like the 128 bit frames.  However, these files sounded dull.  The highs were dead.  The symbols were
grainy.  I then went up to 320 bit frames and the files sounded great.  I couldn't tell any difference from the cd.  Then, I got to
thinking, I wonder with the variable bit rate files sound like.  I knew I didn't want anything below 128; but, wanted to try and
save a little disk space from the 320 files.  Lame has a preset of extreme.  When using this setting, I couldn't tell the
difference between the 320 files and these vbr files.  So, I've settled on the extreme for my music.  Testing was done on my
soundblaster mp3+.  It is an external usb sound card.  It works great.  No rf from the computer.  My mp3 files seem to have an
average bit rate of 230 or 240.  I think this is a good compromise.

At this point, I had some mp3 files and an Ipod Shuffle.  The next logical step was to figure out what was needed to get these files
onto the unit.  When plugging the ipod into a usb port, linux immediately recognized it as a scsi drive.  (WAY COOL!)  So, I did
what any good old hacker would do.  It mounted under /mnt as a fat32 filesystem.  I thought I was home free.  All I needed to do
was to just copy the files onto the drive and life would be good.  Of course, things are not that simple.  It turns out that the
ipods need a database  of files to play.  You can't just put the files on the filesystem and expect the ipod to play then.  There
is a file called itunes.db.  This file needs to be kept in sync with what files to play.  Fortunately, there is a software package
written in perl from the gnu project called gnupod.  When using it to put the files on my ipod, all works.  This might make the
other ipods accessible if one can learn how to navigate play lists.

The only thing left was building my mp3 library.  As I said earlier, I was unable to find a satisfactory program to rip cds.  So, I
wrote a small ksh script.  It queries the freedb site to get the cd information, converts the data on the cd to wave files, encodes
them with lame into mp3's and fills in the mp3 header using mp3info.  Data obtained from freedb such as song title, year, album,
artist, and track number are populated.  I choose to build my library using /mp3/genre/artist/album structure.

If people are interested, I'll make the script available with the understanding that it is just a hack.  You get what you pay for.
To make the script run, you would need cdparanoia, lame, discid, wget  and mp3info.  It does not have a way of ripping cds which
are not in the freedb database.  If I run into one, I suppose I'll code a method to input the data manually.  I've ripped over 100
cds so far with out any trouble.

Terry




More information about the Blinux-list mailing list