iTunes slowdowns with Google DNS

Last night we tried to rent an iTunes movie on our newish Apple TV. Instead of starting right away, the Apple TV said it would be 2+ hours before we could start watching. I’ve got a healthy 15-20Mb/s connection and a clean wire to the Apple TV, so this shouldn’t be happening.

A little bit of research turned up a surprising fix: Don’t use Google DNS.

The iTunes Store has thousands of entrances. Everyone using Google DNS is trying to get in through the same door.

Some anecdotal evidence:

This totally makes sense. iTunes’ video content is delivered by Akamai who has distributed massive datastores around the world so those large files originate from nearby servers and spend less time getting switched around the network. Akamai somehow uses our DNS routing to determine our location. If Google DNS or OpenDNS routes everyone to Akamai the same way, then those Akamai nodes and the pipes leading to them get overwhelmed.

Since most people don’t know what a DNS server is, this problem primarily affects the “tech-vanguard” and those fortunate/unfortunate enough to be inside our circles of helpfulness.

I switched to my ISP’s DNS servers and now HD rentals on Apple TV are ready to watch in 10-20 seconds.

Go figure…

(I’d forgotton, but I wrote about a similar iTunes-DNS problem in March 2009: iTunes Store DNS Connection Problems)

iTunes Store DNS Connection Problems

Recently I’d been having some bizarre network problems, the most consistent of which was that I couldn’t connect to the iTunes Store. After a short round of testing, I was quickly able to determine that the problem was DNS servers I was using.

Yes, I’m one of those people who uses those 4.2.2.x DNS servers, for probably 10 years they’ve worked perfectly.

While DNS servers can be set in the Mac’s System Preferences, that requires a lot of clicking and it’s faster to just use the networksetup command line tool. Since we’ll also be flushing the Directory Services cache with dscacheutil, switching servers can be condensed to one line making testing faster. Here’s an example of the command I’m using:

sudo networksetup -setdnsservers "AirPort" && \
dscacheutil -flushcache

I repeated the above for each of the six known 4.2.2.x DNS servers. After individually setting each DNS server, I switched over to iTunes and attempted to access a different section of the iTunes Store.

Results,,,, and all failed to connect to iTunes. Each of the servers appeared to be online and responded to pings with an average response time of about 12 ms.

When I switched to any of the top three recommended DNS servers on, I was able to connect to the iTunes Store instantly.

There have been a few tweets with similar problems, but I couldn’t find anything related to upgrades or other problems with the 4.2.2.x servers. I haven’t yet been able to test this on other connections but will post an addendum once I have.

Home movies as iTunes TV Shows

Update: At some point, probably with iTunes 8 though I didn’t notice at the time, iTunes added support for batch changing video format, making the script featured in this post obsolete… as it should be.


Original post follows.

We usually keep our home movies in iPhoto, but recently I’ve started moving some select clips into iTunes. Unfortunately, the list of Movies quickly becomes unmanageable. These kinds of videos are much easier to work with when grouped as TV shows, but unfortunately iTunes won’t batch convert Video Kind.

So I wrote a script. In addition to defining selected movies as a show, it also tags their season with the current year and sets the Show Title. Here’s the script: (Open in Script Editor)

set showTitle to display dialog “Enter TV Show Title” default answer “Family Videos” buttons {“Cancel”, “Ok”} default button 2

set theYear to year of (current date) as integer

tell application “iTunes”

copy selection to tracklist

repeat with theTrack in tracklist

set show of theTrack to text returned of showTitle

set season number of theTrack to theYear

set video kind of theTrack to TV show

end repeat

end tell


To use that, just select some movies in iTunes and run the script. Whatever’s selected will be tagged and grouped under the title you entered.

Now our home movies are all grouped together and easily synced to iPhones or other iTunes fed products like iPods and Apple TVs. To view videos on any of those devices, the movies will need to be converted to iPod compatible format. QuickTime can do it, but iSquint/VisualHub can do it much faster.

This could have been done with AtomicParsley, but AppleScript is easier and pre-installed on every Mac.

What would be really great is if iTunes and iPhoto could talk to one another and pull video content out. iPhoto has supported movies for years now, why can’t they talk to each other? (because neither was designed for handling video formats?)

There’s plenty of room to improve this, if you do please post a link in the comments.

Make custom iPhone ringtones work with iTunes 7.4.1

Update: Amazingly, iPhone 1.1.2 update re-enabled the m4r-rename hack. This all works again!

I just tested it quickly by renaming a previous home-made ringtone file to m4r and double-clicking. It imported, synced to and played on my iPhone without any other steps.

Currently there are no known ringtone hacks for iPhone 1.1.1.

Apple, you’re pissing off your fans. Don’t do this. [we’ll just be over here pretending you listened!]

This totally seems like it shouldn’t work.

If you’re seeing “cannot be played on this iPhone errors” like this:

[file] was not copied to the iPhone

Open your iTunes Library folder and find the Ringtones folder: iTunes Music/Ringtones.

Select your ringtone and change the file extension back to m4a. Yes, m4a.

Sync again and your custom ringtone should be working on your iPhone. Nice.

Update: Confirmed for Windows XP & Vista

Thanks to commenter Robbie, building on steps from Jason Choi, here’s how to get custom ringtones working in Windows:

  1. Put m4r files into a ringtones folder on my desktop
  2. Opened iTunes
  3. Edit > Preferences > Advanced
  4. Check “Keep iTunes Music folder organized”
  5. Check “Copy files to iTunes Music folder when adding to library”
  6. Create playlist called “Ringtones” in iTunes
  7. Drag the Ringtones folder from my desktop to the playlist I created in iTunes
  8. Made sure they appeared when in the list on the Ringtones tab in iTunes
  9. Opened the “Ringtones” folder that iTunes created in MusiciTunesiTunes MusicRingtones
  10. Renamed all the m4r files to m4a
  11. Try to sync but it fails because it cannot find the m4r files (this is good)
  12. Look at playlist created in iTunes with a bunch of Xs next to each ringtone
  13. Double click each ringtone (hit browse for the file, and selected each m4a file from the folder in my MusiciTunesiTunes MusicRingtones)
  14. Hit sync again
  15. Verify they are in your Settings>Sounds>Ringtones

iPod photo Cache, deleted

Apple Support Document 300225: Photo Sync creates iPod photo Cache:

When using iTunes to sync photos to iPod photo, iTunes creates a folder called iPod photo Cache in the top level of the folder you selected for your photos. Picking another folder to sync does not erase the previous iPod photo Cache.

Depending on how many photos are being synced, the hard drive could fill up.

Drag the folder named iPod photo Cache to the Trash or Recycle Bin.

Sure enough, poking around in there I found cache files from 2005. so I moved some of that clutter over from my old PowerBook to the new MacBook Pro.

Juggling free space is always an issue for me, deleting this folder recovered almost 3 GB.

I noticed this folder while showing Disk Inventory X to a friend.