iTunes + iPod + Shared Disks: Managing A Large, Shared Library

Most folks that have Macs own a notebook version. If you have a significant music / video library, you won't have the disk space on your notebook. This is one thing I never understood about iTunes. Any significant music collection is going to swamp the notebook's disk. The defaults are all set to store the library on the local disk, and to actually make copies of files you add to the library in the iTunes folder. For the latter, if you don't actually understand what's going on, you could wind up with multiple copies of files hanging around.

Another point is that most people want to share their library between users in their household. I think there's a way to share your iTunes library from your Mac (I've never tried it), but that assumes that any consumer of the media is also using iTunes. iTunes is not a general purpose media player. I have a lot of formats it won't consume, so I use other players like VLC in some cases.

After being an early adopter of several different types of digital audio players, the iPod model was a hard pill to swallow.  The basic approach is the iPod is a read-only device to everything except iTunes, and who's format and content is completely managed by iTunes. There's only one reason the iPod works this way: control. Apple can force you to go through iTunes, which is as much a storefront as anything else, to manage your library. The iPod could easily have been a standard USB mass storage device, and allow files to dragged and dropped onto it. But then you wouldn't be forced through iTunes, and the iTunes Store. To be fair, this would require more logic on the iPod to index the library, which might have been a technically harder problem. Also, the iPod only plays AAC format, so even if you import MP3 files into your iTunes library, they are converted to AAC before they are copied to the iPod. Again, this allows the iPod to be simpler in that it doesn't need to understand anything other than AAC.  It can rely on iTunes for that. This probably makes importing music slower, but that is not an everyday thing for most people. The only good thing here is that iTunes hides this detail from you.

Unfortunately, the iPod model is used by most other digital audio manufacturers (there are a few exceptions). The difference is that for them, the software is not iTunes, it's Windows Media Player. So when I was faces with the choice of purchasing on oddball brand that supports USB mass storage, a player that requires Windows, or an iPod, I chose the lesser of the three evils.

But anyway, back to the problems of disk space and sharing media. This is my best solution ...

To get around the limited disk space / sharing problem, the actual content of my library is stored on a large shared disk. I use a neat little NAS device which is essentially a drive enclosure that runs a slimmed down version of Linux with the purpose of running an SMB and FTP server (only, that's all it does). This particular device has been pretty darn stable for me. I chose it because it's an enclosure, not a sealed unit already containing a drive. This allowed me to buy a cheap 500GB drive and keep the cost down. The only drawback is that it is an ATA-100 interface, not SATA. You'd think this would be an advantage. ATA-100 is older, and the drives should be cheaper. However, it's so old that the drives are getting hard to find and they are about the same price. SATA is much faster, but that doesn't matter as ATA-100 is very much fast enough to keep up with either the USB or network interfaces to the drive.

A drawback of "all on the shared disk" is that the library doesn't leave the house with you. It not on your notebook. Well, that's why I carry the iPod around with me.

With the NAS, I can mount the SMB drive on any computer in the house and access the media in any way I want. For example, an integral part of my "media center" is an older Windows PC connected to my "TV" and some cheap computer speakers. I use this to play music and  video .avi, .mpg, streamed content from the internet, etc., movies. Of course the PC plays DVDs also so I could throw out my DVD player too. The PC just mounts the shared disk and plays the files from there. You don't need a powerful, "media PC" for this, and it doesn't have to be a high-tech expensive solution. Just about any PC manufactured in the last 6 years can play DVDs, .mp3s, and .avi files. It's a PC simply because I had one lying around. It could also be an Mac Mini.

As a side note, I purchased a nifty wireless keyboard for the PC. I set the fonts big, and I can sit on my couch and control everything. Very nice, even if the keyboard makes a rather large remote. This model is pretty small, and has a built in trackball mouse so the keyboard and mouse are one single unit. It's worked flawlessly, although you wouldn't want to do a lot of work with it as it's small and the trackball isn't the best. FYI, if you're looking at wireless keyboards, there are models w/ a range of "up to 10 feet" then there's the "up to 50 feet" models. Get the latter, even if you're within 10 feet of your media center, they get flaky at 3-5 feet.

For iTunes, I mount the drive via SMB and import the media from the shared drive. This must be slower, but I don't know how much because I've never done it any other way. I imagine it's a lot slower, as in this case it is accessing the shared drive over a wireless connection. Anyway, with about 20G on the iPod, it take about 5 minutes to do a no-op sync operation from iTunes. That's okay by me, as I can just connect it and walk away, and it's always done by the time the iPod is charged anyway.

One problem I ran into recently ... the shared drive is just a DHCP client, so it can potentially get any of the IP addresses in the block that is made available on my router. I could go into the router and force it to assign a particular IP address to the NAS each time, but the problem with that is I've needed to "reset" my router several times which makes it lose this type of configuration, and it's a pain in the arse to configure, so I just don't like to add any complex config to it.

So the other day, I needed to reboot the router. My NAS picked up a different IP, which was a different automount point (I am automounting the NAS SMB point). iTunes could no longer resolve any of my library. Neat. There is no way to fix this through iTunes itself, except by "locating" each individual file. There are no utilities I could find to do it either.

In retrospect, I should have created a symlink to the mount point, and then imported from that location. Then if the IP of the NAS changes, I can just change the link. I did this now, but I didn't think of that initially.

As it turns out, it's pretty easy to muck w/ the iTunes library. There's a binary formatted version, but there's also a XML backup. To solve this, I sed'd the XML library file and changed the "location" of all of the media to the symlink.

sed -e "s#file://localhost/private/Network/Servers/192.168.0.10[10]/PUBLIC#file://localhost/Users/jtb/mnt/PUBLIC#g" "iTunes Music Library.xml" > ../new.xml 

(Noticed that I used a different separator in the sed expression to avoid escaping all of the /'s) 

Then I removed all of the iTunes files, restarted iTunes, and did a File->Import Library operation on the new XML library I created. This took a long time to re-import everything and calculate "gapless playback" (whatever) but it seems to have worked.

One think that stuck for for a while was the "location" in the XML library. It's a file:// URL, so I originally tried ...

file://Users/jtb/mnt/PUBLIC (this is my symlink to /Network/Servers/...)

As it turns out, iTunes wants a HOST NAME in the FILE URL, like this:

file://localhost/Users/jtb/mnt/PUBLIC

Not what you'd expect.

Of course, the key to using iTunes this way is to set your preferences to NOT copy files, and NOT rename them (see Preferences->Adavanced). Basically, tell iTunes to leave the media files alone and just use them from their original imported location.
 

 

 


 

Comments:

Your article is interesting, and I am facing the same challenges. You do have one technical error, however. The iPod does play mp3, and iTunes does not convert mp3 files on your computer to aac when it copies them onto your iPod.

Posted by Scott Flowers on July 11, 2007 at 03:39 AM PDT #

Thanks for the correction Scott, maybe my information was based on a much older generation of iPod+iTunes.

Posted by Jeffrey Blattman on July 11, 2007 at 04:06 AM PDT #

I've got similar issues. 450 CDs is about 30GB :-) I've had a file server for a long time and my current one is a PC running Solaris 10 with 4 500GB drives formatted with ZFS in a RAIDZ. Give that NAS a static IP already! Your DHCP server should be able to give an IP based on the MAC address or there should be some addresses outside the DHCP range and you can set the NAS to be static. I'm currently running iTunes on a Mac with the library on a share, but I have run gtkpod, Floola, yamipod and a few others to manage it. gtkpod lets you pull things off the iPod if needed too. I miss being able to just drag & drop stuff onto the iPod like my older MP3 player. But I also think the database in the iPod makes sense. I have a MacOS application (applescript?) that rates songs based on number of plays/skips/etc that the iPod has collected. I don't think that information would be easy to collect on the iPod w/o a database that synced with an application on the computer side. Interesting information about editing XML files. I'll have to play with it.

Posted by Tom on July 11, 2007 at 07:04 AM PDT #

By default, iTunes imports to AAC - it has the benefit of being small - but you can change that (preferences -> advanced -> importing). I think Jobs anti-DRM statements are genuine, but of course he has to drag the music industry along with him. EMI seem to be following, hopefully the rest will see sense soon. also, you should look into some way of using bonjour / zeroconf on your NAS box. It's a very unappreciated part of OSX.

Posted by Dick Davies on July 11, 2007 at 08:20 PM PDT #

Ah. I'm only using iTunes for organizing and syncing. I used Grip to rip my cds. It took a week and 3 computers. If Jobs succeeds in getting the industry to do DRM free with AAC (or MP3) it really weakens Microsoft's WMA protected format. AAC is as open as MP3 with lower royalty fees so other vendors can add it to their players. And that's a good thing. My NAS box is Solaris 10 and I have only 1 Mac. I'm mostly Linux :-)

Posted by Tom on July 11, 2007 at 11:16 PM PDT #

That sounds familiar - I've spent a morning ripping CDs on Ubuntu (my iMac DVD drive just died) only to find they're all bloody OGGs :) Will redo them and rsync them over. Ubuntu does the zeroconf dance now (through Avahi) and the NWAM project is adding zeroconf to Solaris Express, so it's not that alien. It's handy when you want to run services, but are too lazy to run a DNS Server: http://number9.hellooperator.net/articles/2005/11/21/local-hero

Posted by Dick Davies on July 11, 2007 at 11:25 PM PDT #

Interesting article but not 100% correct. I believe you can drag and drop music file into your iPod from Winamp application if you have it on PC. I have done it many times, as simple as drag and drop. My wife is doing it right now. It will recognize the iPOD and everything will be fine. However you can't extract and drag & drop files back from the iPod once they are already there. So there are ways to 'avoid' Apple's wish to control everything iPod related via iTunes.

Posted by Lungo on January 07, 2009 at 07:49 AM PST #

hard to believe, but i found this,
http://www.slyck.com/story1632_iPod_without_iTunes

so it seems you are correct. however, in this case, winamp is now the managing software, and my assumption is that if you did go back to itunes and sync it'd either erase the files you dropped from winamp, or it'd simply fail to recognize them. i moved away from PC sometime ago, but as i recall, winamp was getting fairly bloated.

choose your poison i guess.

Posted by jeffrey Blattman on January 07, 2009 at 08:26 AM PST #

Alain commented on my previous post that the solution there was problematic as it allowed access to arbitrary view which may depend on objects being set up in other views

Posted by links of london on December 13, 2009 at 02:05 PM PST #

jean style jean style jeans stylejeans style mens jean style mens jean style skinny jean style skinny jean style blue jeans style blue jeans style seven jeans style seven jeans style new jean style new jean style latest jean style latest jean style jeans styles jeans styles boy style jeans boy style jeans men jean style men jean style jean style 

Posted by jean style on December 17, 2009 at 02:22 PM PST #

The select items have object values. http://www.watchgy.com/ All is good. When I submit the form, I see "Validation Error: Value is not valid". My first reaction was that I didn't have any validation on the page, so how could a value be not valid? http://www.watchgy.com/tag-heuer-c-24.html
http://www.watchgy.com/rolex-submariner-c-8.html

Posted by rolex replica on December 29, 2009 at 12:01 AM PST #

a good ipod to mac transfer ( http://www.iskysoft.com/syncpod.html#187 ), it can help us transfer music, movies and photos from iPod/iPhone to Mac;copy music, movies and photos from Mac to iPod/iPhone.

FLV to iPod converter for Mac ( http://www.iskysoft.com/article/flv-converter-mac.html#187 ), it can help us convert youtube flv videos to ipod very easily.

Posted by Jasime Heard on February 28, 2010 at 02:28 PM PST #

Thanks Jeffrey,
exactly the information I was googling for!

Posted by tillo on April 23, 2010 at 03:14 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

jtb

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today