Wednesday, January 16, 2008

Adventures in Musical Incompatibility

Naturally, the day I decide to start a blog is the day right before I start getting busy with assorted assignments.

Nevertheless, I have some interesting things lying around (physically, digitally and mentally) that I believe warrant posting:

The premise

I have a large batch of .aif files that I got from a family member. These are some of his CDs, ripped and encoded on his Mac. Some are his own tracks, some are music that I like that he happened to have lying around, so he just dumped a few hundred of them onto an external hard drive I had lying around and handed them over. It wasn't until I tried to listen to them in Amarok (One of the default music players on Ubuntu) that I realized it was an incompatible format. naturally, this meant that they were practically invisible to the Amarok-based MySQL database and, conversely, the php frontend that employed it.

This frustrated me at first, but I quickly realized that .aif was simply an unencoded raw file with the music on it, meaning that converting to mp3s should be as easy as running a command to encode them and boom, presto-chango: Relatively compatible mp3s at my fingertips.

It wasn't until I actually sat down and tried to figure out the best way to do it that I settled on some sort of shell script to perform this relatively simple task.

I now had two tasks: learn enough shell scripting to set this up and find the right command to encode .aif to .mp3

No comments: