I’m not totally one of those anti-anything kind of people. I don’t think all corporations or Republicans or synthetic chemicals are bad for us, though many are. I tend to consider myself open minded. But damn if Bill Gates just doesn’t want to force everyone to buy his crap. Here’s two situations to help illustrate this.

First, I’d like to defend any *nix-based operating system (like OS X– incidentially created by BG’s arch-nemesis who chooses apparently not to be defensive) for making it possible to use ANY file system, whether it was made on a Mac, a PC, or a *nix box. They don’t care whether or not you’re using their OS to use someone else’s software, they just want you to enjoy using their OS. Simple enough.

But no, Windows machines are horribly opposed to anything else. For one, they hate Apple-formatted drives. Well, Mac users, guess what your iPod is? That’s right, if you want to plug your music player into a Windows machine– nuh uh. Sure you could reformat it to a Windows format and then it would work on a Mac, too, but why would you want to do that? There is a good solution but it’s not an inexpensive one. It’s called MacDrive and with it your iPod will appear as just another drive and you can drag and drop with glee– after you drop the money on the piece of software. In addition to MacDrive, though, you’ll need to download this driver for those of you cursed with the worst OSs of all: Windows 98/ME. Otherwise the machine won’t even recognize it!

Luckily (sarcasm) this is what we’re blessed with at Bike Friday. Like our bikes, we have a totally customized database built out of the Windows 98 edition of Microsoft Access. Our eventual goal is to port it all over to something more Open Source, perhaps even something as simple as an intranet database with a variety of webapps. However, we have other priorities and that is no small undertaking. So meanwhile we must suffer. Lynette and I both have figured out ways to nearly avoid using our Windows machines all together, choosing instead to bring our Macs to work. Kind of sad when you think about it. It’s not Bike Friday’s fault though. It’s Bill’s fault for forcing Windows on the world!
I digress.

The other thing that’s driving me nuts is WMA files. I downloaded a song in said proprietary format only to find that though they claim iTunes can handle them, it doesn’t seem to want to whether you try to Import or Add to Library. So off I went looking for a good conversion solution. Surprisingly not a lot of freeware options. I did find ffmpegX, done by some of the same people that do the awesome command line/GUI Open Source alternative to Quick Time: MPlayer. ffmpegX literally does any a/v format under the sun, but it was big and ultimately Shareware. So I thought I’d give the command line ffmpeg a shot. It worked really well in the version installed under ffmpegX, so I got rid of ffmpegX (I might add I used the very efficient AppZapper for this– one of the very few pieces of software I would pay for [though I won it in a contest]– since OS X software so rarely has an uninstaller) and set out to install ffmpeg.

There are pretty easy to follow OS X instructions that basically has you install LAME (MP3 Encoder), Fink (which, like DarwinPorts makes it easy to install *nix packages on OS X though it does require installation of latest Xcode Tools which you can get for free from the Apple Developers Connection) and Subversion (keeps track of changes to the source code). All this works pretty smoothly. Only not for our particular application. For one thing, it lacks the option to actually enable the WMA decoder. Secondly, it lacks the option to encode to the wonderful AAC format Apple developed. Here’s how to fix this. I will provide a revised HOW-TO that further smooth out the rest of the process:

  1. Get Xcode Tools. See above.
  2. Get FAAC so you can encode AACs.
    1. This is a very problematic install though the software is wonderful, so you’ll need to follow these steps after downloading and opening up the archive.
    2. Go to Terminal and go to the appropriate directory and type:
      1. aclocal -I .
      2. autoheader
      3. glibtoolize --automake
      4. automake --add-missing
      5. autoconf
      6. sed -i '' "s/^M//g" configure (instead of ^M hold the CTRL key and type vm — the result should look like the code here)
      7. ./configure
      8. make
      9. sudo make install
  3. Get Fink:
    1. Mount the disk image, run the installer. Give it permission to change your config files.
    2. Open Terminal and issue the following commands:
      1. fink scanpackages; fink index
      2. fink selfupdate
  4. Stay in the Terminal and use Fink to get LAME and Subversion:
    1. fink install lame
    2. fink install subversion
  5. Use Subversion to get ffmpeg:
    1. cd /Applications
    2. svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
    3. cd ffmpeg
    4. ./configure --enable-mp3lame --enable-decoder=wmav2 --enable-faac --enable-shared --disable-vhook
    5. make
    6. sudo make install

Furthermore if you want to make it really easy you can open up your favourite text editor and make a script to help out. I’m going to give you all the commands you would need to do this with the great *nix editor vim since it’s got a bit of a steep learning curve. The 1st indent indicates we are within vim and the 2nd indicates we’re entering input into vim:

  1. vim wma2aac
    1. i
      1. #! /bin/bash
      2. ls | grep ".*wma$" > foo
      3. sed -e "/.*.wma$/s/.wma//" foo > foo2
      4. for i in $( cat foo2 ); do
      5. ffmpeg -i $i.wma -ac 2 -ab 128 $i.aac
      6. done
      7. rm foo foo2
    2. hit the ESC key
    3. ZZ
  2. chmod a+x wma2aac
  3. ./wma2aac

All this goes to show that the versatility of Macs allow them to be capable of such elegant work arounds to what would otherwise be a very vexing problem. Oh, and Bill– lighten up! Learn to play nice with the other boys. You might have more fun that way.

Advertisements