Sunday, 26 July 2009

Notes on making iTunes play nicely with an Airport Disk and Airtunes

OK, so six months later, along comes another post. This time it's practical, and a result of the experiences I had recently in trying to downsize my CD collection and shift all of my music onto a shared NAS drive. As it happens, our network at home is already based around an Airport Extreme sase station that supports the attachment and sharing of USB disks as network drives - so I purchased a cheap-arse Western Digital 1TB USB external drive, formatted it as HFS+ (non-journalled), shoved it into the back of the AEBS and away I went..

Setup: iTunes 8.2, Macbook 2nd Gen, OS X Tiger 10.4.11, Airport Extreme, Airport Express with Airtunes.

1. Telling iTunes what to do

Changing the location of the iTunes Library in the preferences and then using 'Consolidate Library..' is by far the easiest option for physically moving all your songs. See Apple's official guide here. All your metadata is preserved and it all Just Works. One pain - you have to copy over the network, so ideally, connect your Mac to the base station using a network cable rather than using wireless for this move as it'll be much, much quicker.

An alternative, do-it-yourself approach that gets you more control over where your music lives is manually editing the paths in the iTunes Music Library.xml file using a text editor. You still have to delete the actual library database and re-import the XML file into iTunes. This way you can connect the eventual NAS drive to your Mac's USB port, copy all the music across, connect it to the AEBS and hammer iTunes into doing the right thing by changing the paths in the XML file. However, for novices or people without much time on their hands, I wouldn't recommend this approach. YMMV.

2. Don't put everything on the NAS

Keeping your album art & iTunes databases on your Mac's local disk seems to be the smart option regardless of how you migrate your music (the Consolidate Library method works this way). You can't shove the whole of iTunes' working files on the NAS and expect that to be speedy - or, even worse, assume that you can share a single library between two instances of iTunes in this way. This is because iTunes continually updates its database files as it's working.

3. Check your wireless network

The performance of your wireless network is by far the biggest factor in making iTunes not suck donkey's balls with this setup. Connected via wired Ethernet, you should find day-to-day performance (including CD ripping) pretty much on par with having the library on local disk, with maybe a second or two of lag occasionally.

Over Airport, though, it's a different story. If your Airport network is not performing well - something you might not usually realise if all you ever do is access and download files from the Internet, as your Internet connection will always be much slower than the speed your wireless network ought to be capable of.

When iTunes attempts to play a file, it will buffer a certain amount of the file into memory before it starts playing it, so achieving low network latency is essential for this process to appear snappy enough to not be annoying - nothing's going to irritate you more than iTunes beachballing every time it moves from track to track.

Things to check:

  1. Your wifi mode - 802.11b/g/n ?
  2. Interference from nearby networks - use iStumbler or a similar wireless network tool to see if certain channels are crowded with networks, and move your network to a less busy channel.
  3. Overall signal strength - is your AEBS positioned optimally? Are all wireless clients getting a good signal? Use the statistics function of Airport Utility (hidden away in the 'Advanced' tab of 'Manual Setup') to see how your Airport network is performing and be prepared to move the base station(s) around to achieve better speeds/less interference.

4. Airtunes bumpiness

Solving point 3 should also solve any AirTunes performance issues you might be having. AirTunes works by streaming a losslessly-encoded version of the music stream to the Airport Express base station, which in itself should not tax a modern 802.11g (or better) network but a weak signal can increase drop-outs and stuttering. By moving the AEBS a little higher and the Express a little nearer to get the best signal-to-noise ratio, I've had it working pretty seamlessly.

An edge case to be aware of is if you have any music encoded in any non-iTunes native codecs - that is, any other than MP3, AIFF or AAC - it cannot be sent over AirTunes. Even through iTunes can play Ogg Vorbis, etc via Quicktime - it can't send files encoded in these formats over AirTunes, which is annoying when files such as these show up in playlists. Even more annoying is that if it's streaming to a set of remote speakers and encounters such a track, iTunes doesn't just skip it - it'll play it out loud on the local computer, whilst the remote speakers go silent! This is annoying, and I can't help wondering if it's more of a 'feature' to get you to migrate all your music into Apple's own formats rather than free, open-source codecs like Ogg Vorbis. That said, if I was that much of a militant open-sourcer I wouldn't be using iTunes in the first place, so I can't get too righteous about it.

5. Some things are just going to take longer

Wireless just isn't as good as wired for some things. With the convenience of sending data around wirelessly comes certain trade-offs. iTunes may feel less snappy when navigating your library and jumping between songs, as it waits for the wireless disk to catch up. This will annoy you for a week or two, but then the great adaptive nature of the human brain kicks in and you'll just get used to it.

Anyway, I hope that's of use to some people struggling to get this sort of setup working. It's still a little way off being the perfect wireless-music-anywhere nirvana I was gunning for, but it does feel like I've freed up my listening a bit.

1 comment:

  1. I have been using airtunes as well. Prior to that, I converted my old CD collection into digital format. I will be experimenting with iCloud's document storage mode.