View Single Post
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2005-05-06, 03:36

Some background:

Until QuickTime 7 was released, if you'd enabled "Save movies in disk cache" in the QuickTime pane of the System Preferences, iTunes Music Store and other services would temporarily save downloaded QT video streams:

Code:
/private/tmp/###/TemporaryItems/QTPluginTemp######
If you're still using QuickTime 6.x, you'll always be able to go to this directory to get that QTPluginTemp file. You can copy that file to somewhere else, add the .mov extension, and view it whenever you want. Life is good.

Enter QuickTime 7.

One of the many changes in QuickTime 7 is how it caches data. Apple calls it a persistent cache. Now, the cache is stored on a per-user basis in the ~/Library/Caches/QuickTime directory. Also, this brings a new cache format with files created with the .QTCH extension. This new file format is similar to a standard MOV file, but it lacks certain bits of information needed to play it independently.

What does all this mean? It means you can't resort to the old tricks for saving music videos from iTMS! Bummer, eh?

Well, last night I put myself to the challenge of getting around this and I've come up with a solution. It's not pretty, but it gets the job done.

Basically, I decided to use the tcpdump command to monitor transmissions from the iTunes application and Apple's servers. iTunes uses simple HTTP communication to relay its information back and forth. So, if you capture the right data, you can get a URL that you can plug directly into Safari or your web browser of choice!

Here's what you have to do.

Open iTunes and Terminal. In the Terminal window, enter the following command. You'll be asked to authenticate. If you're on an Ethernet connection, change the en1 to en0.

Code:
sudo tcpdump -i en1 -A -s 256 | grep 'GET .*mov HTTP'
Now, navigate the iTMS until you get to a video page. When the video starts downloading in iTunes, some data should pop up in the Terminal window similar to this:

Code:
1c.....nGET /Features/y2005/m03/d31/h16/dj.tsodbomz.mov HTTP/1.1
There's the key! Now press control-c to stop listening to the network traffic. Between the GET and the HTTP is the path to the video file on Apple's server. What server is it, though? Well, it may change, but right now that server is http://a1020.phobos.apple.com/. So, putting the two together, we get the URL for download:

Code:
http://a1020.phobos.apple.com/Features/y2005/m03/d31/h16/dj.tsodbomz.mov
Whew!

I hope you'll find this useful. It's taken a lot of arduous packet-reading to find the right information for this to work. I suppose it's inevitable for this little secret to get out, but please give credit where it's due and reference this page.

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote