Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A shell command to save iTunes Music Store videos UNIX
So I was watching a music video in the iTunes Music Store a while back (Go with the flow by Queens of the Stone age) and each time I went to watch it I'd have to load it again. I like that video.

So I whipped up this little shell script. As long as the video is open in iTunes (I'd let it finish loading, too), it will be able to copy it to your desktop. You'll have to rename it yourself.

cp -v `lsof |grep -i QTP| grep iTunes|awk '{ print $9 }'` ~/Desktop/currentmusicvideo.mov

[robg adds: There have been other hints here on saving the QuickTime temporary queue, but this seems like an easy solution.]
    •    
  • Currently 1.80 / 5
  You rated: 1 / 5 (5 votes cast)
 
[59,306 views]  

A shell command to save iTunes Music Store videos | 68 comments | Create New Account
Click here to return to the 'A shell command to save iTunes Music Store videos' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A shell command to save iTunes Music Store videos
Authored by: ifjake on Apr 30, '04 11:11:23AM

awesome hint! yeah this is so handy.



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: Nagilum on Apr 30, '04 07:02:05PM

Hmm I found (hard)linking the file way better than copying, it's quicker and I don't have to worry whether the file has already finished downloading before doing so.



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: gdsimms on May 10, '04 02:40:42PM

Correct, but hard linking only works on the same partition. If you store media files on an external or secondary drive, you will have to copy.



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: willoneal on Jul 21, '04 09:34:11AM

This hint no longer works in Tiger.

Actually, none of these hints work in Tiger.

The /tmp/501 directory doesn't seem to be used anymore, now the stuff is saved in ~/QuickTime/downloads and a bit deeper.

And once you find the file, cp'ing it to the desktop doesn't make it playable in QuickTime anymore. The file is there, and it opens and plays in QuickTime player, and the length is right, just no audio or vide. Quicktime is up to 6.6 in Tiger, though.

Anyone have a clue how to do this again under Tiger?



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: Fofer on Apr 30, '04 12:15:35PM

Hey, it works for Movie Trailers too!

I saved this as an AppleScript so it's easily accessible from iTunes' script menu:

do shell script "cp -v `lsof |grep -i QTP| grep iTunes|awk '{ print $9 }'` ~/Desktop/currentmusicvideo.mov"

Next step is to create a dialog so it requests the desired filename.



[ Reply to This | # ]
okay
Authored by: aedgarrube on Apr 30, '04 01:36:35PM

set theFileName to choose file name with prompt "Save movie as:" default name "itunesvideo.mov"
do shell script "cp -v `lsof |grep -i QTP| grep iTunes|awk '{ print $9 }'` " & POSIX path of theFileName


[ Reply to This | # ]
okay
Authored by: DougAdams on Apr 30, '04 02:04:57PM

Excellent. "Fofer" emailed me and I posted a version as well, but I much prefer this one.



[ Reply to This | # ]
Hey theres a simpler way...
Authored by: trevbucky on May 11, '04 04:08:49AM

all you have to do is click the drop down arrow at the far right of the movie
and up pops " save as quicktime movie"



[ Reply to This | # ]
Hey theres a simpler way...
Authored by: Fofer on Jun 30, '04 09:53:08PM

Sorry, but that old trick doesn't work on Music Videos or Trailers presented in the iTunes Music Store. The AppleScript in the hint, however, does.



[ Reply to This | # ]
Hey theres a simpler way...
Authored by: Fofer on Jun 30, '04 09:58:10PM

Actually, I take that back. The old trick doesn't work in Music Videos... but it does work fine for Movie Trailers. Go figure.



[ Reply to This | # ]
How to bookmark
Authored by: luhmann on Apr 30, '04 01:48:22PM

How about if you just want to bookmark a music video? I'm surprised Apple doesn't seem to make this easier. Suppose you want to send your friend to the music video directly, without making them find it for themselves? Anyone know how to do this?



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: DougAdams on Apr 30, '04 02:03:25PM
This is an AppleScript that asks for a name for the mov:
set newName to text returned of (display dialog "Enter name for this movie:" default answer "iTunesVideo.mov")
if newName does not end with ".mov" then set newName to newName & ".mov"

do shell script "cp -v `lsof |grep -i QTP| grep iTunes|awk '{ print $9 }'` ~/Desktop/" & newName
Put it in your iTunes Scripts folder and fire whenever you want.

[ Reply to This | # ]
OK, I''m a little slow...
Authored by: Dale Sorel on Apr 30, '04 04:20:19PM

I don't see a script menu in my iTunes v4.5.

Can someone tell me where I can find it?



[ Reply to This | # ]
OK, I''m a little slow...
Authored by: neoguri on May 01, '04 03:41:19AM
From Apple's own site: iTunes Scripts for Mac OS X. To install the scripts for iTunes on a computer running Mac OS X, follow these steps:
  • Download the iTunes for Mac OS X script collection
  • Quit the iTunes application
  • Locate and open the iTunes folder in the Library folder in your Home folder
  • Inside this folder, create a new folder named "Scripts"
  • Place the script files in the newly created Scripts folder
  • Launch iTunes. An iTunes Script menu displaying the script collection will now be available in the menu bar


[ Reply to This | # ]
Thanks for the reply...
Authored by: Dale Sorel on May 02, '04 03:07:56PM

...but I still can't get the menu to show up in iTunes.



[ Reply to This | # ]
Thanks for the reply...
Authored by: maratone on Jun 29, '04 05:43:52PM

It didn't work for me either at first until I:

1. opened the script in Script Editor
2. saved it with a .scpt extension
3. restarted iTunes

It might also work if you skip step 1.
btw, I'm using Panther with iTunes 4.6



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: CaptDeuce on Apr 30, '04 04:40:56PM

The line

do shell script "cp -v `lsof |grep -i QTP| grep iTunes|awk '{ print $9 }'` ~/Desktop/" & newName

will die a most horrible death if newName contains a space or other characters unfriendly to Unix. This version works for me:

set newName to text returned of (display dialog "Enter name for this movie:" default answer "iTunesVideo.mov")

if newName does not end with ".mov" then set newName to newName & ".mov"
do shell script "cp -v `lsof |grep -i QTP| grep iTunes|awk '{ print $9 }'` ~/Desktop/" & "'" & newName & "'"

My apologies for any ugly line wraping.

---
--
"Where's my other sock?" - A. Einstein

[ Reply to This | # ]

A shell command to save iTunes Music Store videos
Authored by: cudaboy_71 on Apr 30, '04 02:53:20PM

glad i dropped by the comments. i was thinking "man, all i gotta do now is make an applescript." but i got beat to the draw.

all that's left for me to do is make a nice icon for the thing and its ready for the dock.

go to my filesharing page at http://homepage.mac.com/cudaboy_71/FTP/and download the 73k iTunesMovie file. it's just the icon. you'll have to copy/paste it to your script of choice.

---
if it aint broke, break it!



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: reconbot on Apr 30, '04 03:06:36PM
I took DougAdams's apple script and updated it with a faster version of my script.


set newName to text returned of (display dialog "Enter name for this movie:" default answer "iTunesVideo.mov")
if newName does not end with ".mov" then set newName to newName & ".mov"

do shell script "cp -v `lsof -c iTunes |grep -i QTP|awk '{ print $9 }'` ~/Desktop/" & newName
Enjoy!
-Francis

[ Reply to This | # ]
An again modified shell command to save iTunes Music Store videos
Authored by: fracai on Apr 30, '04 04:05:01PM
and this will preserve spaces that are entered in the file name
set oldName to (do shell script "lsof -c iTunes |grep -i QTP|awk '{ print $9 }'")
set newName to text returned of (display dialog "Enter name for this movie:" default answer "iTunesVideo.mov")
if newName does not end with ".mov" then set newName to newName & ".mov"
set command to "cp " & oldName & " ~/Desktop/\"" & newName & "\""
do shell script command

---
i am jack's amusing sig file

[ Reply to This | # ]

An again modified shell command to save iTunes Music Store videos
Authored by: cudaboy_71 on Apr 30, '04 04:07:25PM

thanks, i was hoping someone would address that :D

---
if it aint broke, break it!



[ Reply to This | # ]
Modified AppleScript version again...
Authored by: eriklager on Apr 30, '04 04:15:15PM
Supports spaces and other special characters, makes sure there really is a movie before trying to save, doesn't choke if there are multiple movies for some reason, and allows you to cancel when selecting file name.

set originalFile to do shell script "lsof |grep -i QTP| grep iTunes|head -1|awk '{ print $9 }'"
if length of originalFile is greater than 0 then
	set newFile to POSIX path of (choose file name with prompt "Save movie as:" default name "iTunes Video.mov")
	if length of newFile is greater than 0 then
		if newFile does not end with ".mov" then set newFile to newFile & ".mov"
		do shell script "cp -v '" & originalFile & "' '" & newFile & "'"
	end if
else
	display dialog "No movie found." buttons {"OK"} default button "OK"
end if


[ Reply to This | # ]
Modified AppleScript version again...
Authored by: reconbot on Apr 30, '04 06:15:52PM
I really like your script, I hope you don't mind I gave you a mention (and a copy of your script) on my website.

[ Reply to This | # ]
Modified AppleScript version again...
Authored by: useEvil on May 01, '04 01:47:38AM

Excellent! You can add the following to make sure the file creator and type are correct.

do shell script "/Developer/Tools/SetFile -t 'MooV' -c 'TVOD' '" & newFile & "'"

---
--
Fingerprint: 6196 6907 1E47 880A 76AA B6FD E9B6 A5D9 5D83 87BA
Public Key ID: 5D8387BA



[ Reply to This | # ]
Didn't work for me, but...
Authored by: kendallpb on May 01, '04 02:01:31AM
...something else did. First, using the last script posted & iTunes 4.5, cp -v didn't work (complained about -v); maybe that's because I'm still using Jaguar?

Then, when I removed the -v, it said there was no movie. I double-checked lsof and that was correct, nothing there had QTP in it.

I looked and found the video in /private/tmp/501/Temporary Items -- the file was named QTPluginTemp328932. I'm guessing the number at the end is a random number to keep the filename unique. I wonder why, while the movie was playing (it was fully-downloaded though) it wasn't listed as an open file.

Anyway, I copied the file to my desktop (cp QTPluginTemp328932 ~/Desktop/blah.mov) and double-clicked it, and it worked great.

So, thanks for the tip (though it didn't exactly work for me). :-)

[ Reply to This | # ]

Didn't work for me, but...
Authored by: Chapel7 on May 01, '04 06:57:48AM

How about something simpler like using the application "iGetMovies".
Start the app and once the music video or movie trailer has fully loaded, you simply click the button on the floating app window and it immediately downloads the video file and saves it to whichever folder you specified in preferences.
The app can be downloaded at url listed below.

http://www.versiontracker.com/dyn/moreinfo/macosx/21533

A much easier and user friendly option for people who may be intimidated by the Terminal.

Enjoy!



[ Reply to This | # ]
A more efficient version
Authored by: eriklager on May 01, '04 07:00:03AM
The first script took a long time to find the movie file on my computer. This one should limit the search a little. As already mentioned, save it in Library/iTunes/Scripts for easy access from the Script menu in iTunes.

set originalFile to do shell script "lsof -wa -Fn -c iTunes +D /tmp | grep -i QTP | head -1 | cut -c 2-"
if length of originalFile is greater than 0 then
	set newFile to POSIX path of (choose file name default name "iTunes Video.mov")
	if length of newFile is greater than 0 then
		if newFile does not end with ".mov" then set newFile to newFile & ".mov"
		do shell script "/bin/cp -v '" & originalFile & "' '" & newFile & "'"
		do shell script "/Developer/Tools/ttt -t 'MooV' -c 'TVOD' '" & newFile & "' || true"
	end if
else
	display dialog "No movie found. Please make sure that the movie is currently visible in iTunes." buttons {"OK"} default button "OK"
end if


[ Reply to This | # ]
A more efficient version
Authored by: jpchoisne on May 01, '04 03:31:14PM

I'm lazy so I use an even more efficient version.

It's called iGetMovies and you can get it at :

http://homepage.mac.com/djodjodesign/

Ok it's in French but easy to understand. Once the movie has been downloaded you just click on the OK button of the app and the file will save to your desktop.

Works with iTunes 4.5

Enjoy !



[ Reply to This | # ]
A more efficient version
Authored by: koncept on May 01, '04 09:22:28PM
Made a few modifications according to what others have posted here. I Could not test the cp -v issue in Jaguar as I am running Panther.

(*
+------------------------------------------------+
Based on script by Erik Lagercranyz
Adapated by koncept@nonamescriptware.com

Info:
- Accounts for spaces in file names
- Choose output location 
- Use setFile if avail. 
- Choose between iTunes or Safari streams
- Opens finished movie in QuickTime Player
+------------------------------------------------+
*)

activate me
set hasSetFile to (do shell script "/bin/test -x /Developer/Tools/SetFile;echo $?") as number
set theApp to button returned of (display dialog "What app should I record from?" buttons {"Safari", "iTunes"})
set theCmd to "lsof -wa -Fn -c " & theApp & " +D /tmp | grep -i QTP | head -1 | cut -c 2- "
set testForStream to (do shell script theCmd)
if length of testForStream < 1 then
  display dialog "Could not detect a valid movie stream." with icon stop
else
  with timeout of 1200 seconds
    display dialog 
      "Please click proceed when the video is fully loaded." 
      buttons {"Proceed"} default button 1
  end timeout
  set saveTarget to quoted form of (POSIX path of 
    (choose file name with prompt 
      "Where shall I save the recorded stream?" 
      default name "iTunesVideo.mov" 
      default location (path to music folder)))
  try
    do shell script ("cp -v $(" & theCmd & ") " & saveTarget)
    if saveTarget is 0 then do shell script "/Developer/Tools/SetFile -t 'MooV' -c 'TVOD' " & saveTarget
    do shell script ("usr/bin/open -a QuickTime\\ Player " & saveTarget)
  on error err number num
    display dialog "( " & num & ") Could not copy the movie because : " & return & err
  end try
end if


[ Reply to This | # ]
Script causes Classic to load?!
Authored by: maddys_daddy on May 10, '04 03:55:39PM

The script above worked flawlessly, except for the fact that it caused Classic to launch. I'm not sure, but I think that it might have something to do with Quicktime on my system, since some quicktime files try to open in classic quicktime. Any ideas how to fix this?
Thanks for the great script, though!



[ Reply to This | # ]
A more efficient version
Authored by: eriklager on May 02, '04 07:15:27AM

And of course /Developer/Tools/ttt should have been /Developer/Tools/SetFile. I don't know how "ttt" got in there. Oh well.



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: coogan1971 on May 01, '04 05:28:11PM

Is there a way to make this work in Safari? I'd like to save some full screen versions of the trailers on Apple's website.



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: 153957 on May 02, '04 05:30:42PM

Easy thing would be to:
- open the window with the movie
- open the 'Activity' window in Safari
- look for the link which ends with .mov or anything else that means it the a movie
- selects that line, copy it and paste it in the 'Downloads' window...
-it should download it now

---
153957 - TheNumberMan - MacFreak



[ Reply to This | # ]
Not all files are quicktime .mov
Authored by: mark hunte on May 02, '04 06:21:40AM

Using a Past hint to save from the temp file, a short while back,
I tried to save a full track video from the apple quicktime music page. (not the iTunes Store)

I found out after some trial and error that not all files they use are .mov

so the script worked but appended the wrong file type, The movie was actually an mp4, so this meant the script was also only saving the small 4k(ish ) file that linked to the real mp4 file.

Once I worked this out, adding the correct extention to the correct temp file worked .

---
mh



[ Reply to This | # ]
Sweet Hint!
Authored by: RichB on May 02, '04 06:20:41PM

Now I have saved the more efficient script (Safari and iTunes capable) as an AppleScript with the cool icon and it's available from the iTunes script menu. Thanks everyone. Sweet! :)

Going the next step I exported the movie from QuickTime Pro without the video and added it to my iTunes library. The 27 MB movie had a 3 MB audio track. With an extension of mp4 or mp3 it played but wouldn't allow artwork to be added. Making it m4p did allow artwork and it is a "Protected AAC" format but it seems without protection? Awesome!



[ Reply to This | # ]
m4a
Authored by: RichB on May 02, '04 06:58:47PM

OK, I see m4a is the proper file name extension instead of m4p!



[ Reply to This | # ]
You don't need Quicktime Pro to convert
Authored by: jhonny on May 03, '04 01:31:48AM

An easier (or atleast cheaper) way to convert the Quicktime movie to audio is to drag it to you iTunes library and select "Convert selection to MP3" (or whatever you have configured from the Importing preferences) from the Advanced menu.



[ Reply to This | # ]
You don't need Quicktime Pro to convert
Authored by: RichB on May 03, '04 05:02:19PM

I didn't know that! Thanks.



[ Reply to This | # ]
Safari Script
Authored by: Degheygh on Jun 26, '04 11:48:52AM

Yes, but where do you put it in Safari?
If the iTunes script works from the ~/Library/iTunes/Scripts folder, why can't it work the same way if I put the Safari script into the ~/Library/Safari/Scripts folder?
Do you know where it should go, so that Safari can have the script menu similar to iTunes?



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: Jahnoth on May 04, '04 06:37:39AM
I just use iGetMovies.

[ Reply to This | # ]
A perl script to make things easier
Authored by: Skurfer on May 12, '04 03:48:26PM
AppleScript? Pfft. If you want to do it the man's way, here's a perl script that will prompt for an artist and song name and save it in the current user's Movies directory.

#!/usr/bin/perl

use File::Copy;

print "Artist: ";
$artist = <STDIN>;
chomp( $artist );
print "Title: ";
$title = <STDIN>;
chomp( $title );
$filename = "${artist} - ${title}.mov";

$lsof_output = `lsof`;
@ofiles = split( "\n", $lsof_output );
foreach $file ( @ofiles ) {
  if ( $file =~ /^iTunes.* (\/.*QTPluginTemp.*)$/i ) {
    $temp_file = $1;
  }
}
print "Source: $temp_file\n";
print "Copying ${filename} ...\n";
$username = `echo \${USER}`;
chomp( $username );
$out_file = "/Users/$username/Movies/$filename";
copy( $temp_file, $out_file ) or die "Copy failed: $!";


[ Reply to This | # ]
Kiosk Mode
Authored by: cllcomputers on May 17, '04 12:19:57PM

I think that there is a way for apple to program the web pages (embedded in iTunes but also any website) for them to enable "Kiosk Mode" by page or by file - This removes the little downward arrow that lets you save the movies if you had QT Pro - In QuickTime Preferences in System Prefs, there is a checkbox labeled "Enable Kiosk Mode" which I think takes out the little Arrow, which apple has set a similar boolean switch somewhere in the code of the pages in iTMS containing music videos that does the same thing on a per-file basis.

If there were some kind of preference or resource hack that completely disables Kiosk Mode under all circumstances, you could save it as a quicktime movie directly, only if you have quicktime pro (or so I remember that way). I had purchased QT Pro awhile ago to do this on webpages, but also because I needed QT Pro for it's inteded features as well.

However, I noticed that on movie trailers, that arrow wasn't missing, even in iTMS. I think this is because Artists don't wan't their music videos "stolen" from iTMS but Movie producers don't care.

This hint's great! It works very well and even made a .command shell script and put it in my dock so I can quickly swipe any movie from iTunes.

---
------------------
CLL
www.cllcomputers.com
forums.cllcomputers.com



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: Hes Nikke on Jun 04, '04 04:59:37AM
my 2 cents: (Requires Quicktime Pro)

1. open the file in QuickTime Player:
open -a /Applications/QuickTime\ Player.app/ `lsof | grep -i QTP | grep iTunes | awk '{ print $9 }'`
1a. if that doesn't work:
open -a /Applications/QuickTime\ Player.app/ /tmp/501/TemporaryItems/QTPluginTemp* (change the 501 to your UID)
2. (optional) trim movie as necessary
3. choose File -> Export
4. choose Movie to MPEG-4 from the Export: list
5. click options
6. choose None under video Track
7. (importaint!) choose Pass through under Audio Track
8. click OK
9. name your file and click ok.

if you didn't choose pass through on step 7, quicktime will recomposes the already compressed audio. by choosing pass through, it'll be a lossless copy. add the 96kbps, 32khz AAC file to your iTunes library. (what you thought it was CD quality?)

---
vacuums do not suck. they merely provide an absence that allows other objects to take the place of what becomes absent.

[ Reply to This | # ]

A shell command to save iTunes Music Store videos
Authored by: snow white on Jul 01, '04 01:13:35PM

But iGetMovies seems not work either on a standard Jaguar installation with iTunes 4.6. (Neither is a music video in iTunes 4.6 stored in the /private bag.) Oh well.

---
snow white



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: Arif on Jul 20, '04 03:29:51PM

The Shell script doesnt work on my computer, whether done manually into terminal or via any of the applescripts. OS 10.2.8

p.s. don't ever use codenames, they suck.



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: gaialive on Oct 20, '04 05:11:30PM
On my G5 the location was slightly different. I copied the temporary file here
cp /private/tmp/503/TemporaryItems/ ~/Desktop/itunes-video.mov
tim x

[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: gaialive on Nov 05, '04 06:18:21PM
Actually the location of the file was
/private/tmp/503/TemporaryItems/503/QTPluginTemp*****.mov
I guess it may be in different subfolders of
/private/tmp/*/
tim x

[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: Andru on Oct 27, '04 01:04:03PM

The script no longer works in iTunes 4.7. Looks like Apple got wise and moved the location of the temporary video file. So I'm now looking for a new solution to hijacking the videos in iTunes. Anyone?

---
--
Andrew Wong



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: jer2665 on Nov 03, '04 07:55:15AM

My temps are still in the same place /private/tmp/<uid>/TemporaryItems but the script doesn't seem to work. I remember I had to edit it before to just go directly into that folder, but i can't remember now,

anyone know how to do that?

instead of searching, just have it go right to the folder and choose the QTP* file?

If anyone knows, please let me know.,

thank you.



[ Reply to This | # ]
Itunes 4.7 music video workaround
Authored by: azfreakboy on Nov 19, '04 02:14:18AM

There is a workaround on itunes 4.7, it's a tad bit of work, but it lets you save the movie.

First thing make sure you have the quicktime cache turned on. Next you go to Itunes Music store and find the music video you want. go all the way to the point where it starts to load, only let it load for a second or two.

Next navigate to ~/library/caches/quicktime/downloads/

then organized the contents by date you will then find the most recent modified directory, under it there will be another numbered directory, and in that directory should be a new .qtch file.

Open that file with a text editor, textedit will work fine, in the first line of the file is a url that you can copy and paste into a web browser, i used firefox.

it will then download the .mov file perfectly and you can save it using the quicktime menu, or "file menu" save page as.

I won't be making a script to do this cause i am still learning even the basics when it comes to programing. but feel free to make one, i would love for this to be really easy to do.

have fun!

url example: http://a1913.phobos.apple.com/Features/y2004/m07/d20/h13/dj.ujvqfbnn.mov



[ Reply to This | # ]
Itunes 4.7 music video workaround
Authored by: Eihwaz on Apr 20, '05 07:04:58AM

I've found the right .qtch file, opened it in TextEdit and in SubEthaEdit but... no URL is written in the file.
I think they've crypted it somewhere, but i cannot find it.



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: admford on Apr 06, '05 08:19:28PM

Ok, there's a real simple way to get around this new problem with iTunes. The videos are saved in Quicktime's cache (if it's activated from the System Preferences Menu).

The folder these videos are saved in is "/tmp/501/". In Finder, just go to the "Go" menu, and then "Go to folder". Put in /tmp/501/ in the window and press enter. Then go to the "TemporaryItems" folder. In this folder you have a number of files, of those look for ones with names like "QTPluginTempxxxxxxxx", where the x represents numbers. The file with the highest number is the one you're looking for, since it's the last opened file in Quicktime. Just open this file with quicktime, and select "Save As", put in the name you want, and check the "make movie self contained" box, and you've got yourself a new music video.



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: Nagilum on Apr 30, '05 12:25:44PM

It seems Tiger/iTunes4.7.1/Quicktime7 work a bit different, they store the video in a .qtch file in a path like that:
~/Library/Caches/QuickTime/downloads/01/15/1a5f2ee3-1ce22faa-1f3bd6f2-a4c7fbd
c.qtch
unfortanately I haven't yet figuered out what to do with the file since it's no ordinary quicktime.
Maybe someone with a bit more insight on Quicktime can help out here.
Hardlinking the file still works of cause (contrary to what others may said, just make sure to stay in the same fs).



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: JimMueller on Apr 30, '05 05:41:55PM

Yeah, I just cached the full screen trailer for Serenity and I cannot open its 40Mb .qtch file in either QT7, VLC or iTunes (which was launched to play it in.)



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: Anonymous on May 04, '05 04:30:10PM
You can copy the cache file to the desktop using
do shell script "cp -pv `lsof |grep iTunes|awk '{ print $9 }'|grep /Users/*/Library/Caches/QuickTime/downloads/` ~/Desktop/currentmusicvideo.mov"


[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: Anonymous on May 04, '05 04:42:07PM
To simplify a bit,
do shell script "cp -v `lsof |grep iTunes|awk '{ print $9 }'|grep Library/Caches/QuickTime/downloads/` ~/Desktop/currentmusicvideo.qtch"
also works.

[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: danieljscott on May 13, '05 04:56:37PM

That script line is great, except quicktime can't open the QTCH file, whether it's .mov or .qtch. So, neither that script, nor the simplified script posted as a reply to it, are a complete solution. They copy the file to the desktop, which is very helpful, but they do not convert the QTCH file to anything that we can use.

Something that can do this would provide a complete solution for use with iT 4.7 and QT7. Anybody?

---
"Pain is temporary, tape is perminant." -Bobby Z.



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: shortfuse on May 14, '05 12:10:49PM

Under Tiger with Quicktime 7 and iTunes 4.8, the video's are stored in

/var/tmp/folders.501/TemporaryItems/QTXXXXXXXXXX
(where XXXXXXX is a bunch of numbers)

They won't play when copied out or renamed.
If you read the file in BBEdit or something the first 4 chars of the file are qtch, the file itself is as you'd expect about 35mb.

Now I'm thinking that either the file header is missing, or there is an extra header tagged on to prevent QuickTime recognising the format.

Any Idea's?



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: uochris on May 14, '05 12:50:09PM

Pretty much a totally different work around but this does work for me. I use tcpflow http://www.entropy.ch/software/macosx/#tcpflow

I start out by going to the page in iTunes where it asks what size you want the video to play at. I then switch to the terminal and enter

$ sudo tcpflow -c

Then I click on the large video link and then switch back to the terminal and hit control-c to stop tcpflow. I then hit command-F and search for .mov which is the video file. You'll see something like this GET /Features/y2005/m04/d14/h16/dj.vkcolxlk.mov

Just below that you should see a line that says something like Host: a1695.phobos.apple.com

Now I put the pieces together and use curl to download the movie.

$ curl -O http://a1695.phobos.apple.com/Features/y2005/m04/d14/h16/dj.vkcolxlk.mov

And I now have the music video.

This is with 10.4 and iTunes 4.7.1



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: harperska on May 20, '05 05:07:28PM

this hint works perfectly for me, using tiger 10.4.1 and iTunes 4.8 (all the latest). Now maybe someone with a bit more scripting experience can make this automated?

I compared the .qtch file from /var/tmp/ and the .mov file that I downloaded directly in BBEdit. The headers are completely different, but the body of the files appear to be identical, so there does not appear to be any encryption of content.



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: readparse on Jun 10, '05 11:47:56AM

This hint seems to no longer work, at least as of iTunes 4.8. Apparently it used to be a clear quicktime file that was spooled in a temporary directory. The file is still easily found, but it no longer contains the string QTP (rather, it's just QT) and it's certainly not a clear quicktime file. It's encoded or encrypted or something, but certainly unusable by Quicktime.



[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: yugiohdan6 on Jun 11, '05 05:25:51PM
Here is a tool to save the videos by just giving it the url (detailed instructions are on the page)

[ Reply to This | # ]
Any way 2 DL without QT pro?
Authored by: Martial_Dragon on Jun 17, '05 08:55:08PM

I followed that link and it brought up the video in Safari but i still can't DL it because i don't have QT pro. Anyway 2 download it without Pro?



[ Reply to This | # ]
Save iTunes Music Store videos with Quicktime Pro and OS X 10.3.9
Authored by: euskir on Jun 13, '05 09:42:16PM

Just go here
http://homepage.mac.com/kkirkster/.Public/Get_iTunes_Movies.dmg
Easy as it sounds.
And Apple...relax, none is going to make money from downloading videos with that size. Make it easy with iTunes 4.9



[ Reply to This | # ]
Save iTunes Music Store videos with Quicktime Pro and OS X 10.3.9
Authored by: mithridain on Jul 06, '05 03:23:01PM

I'm running Mac OS X 10.3.9 with iTunes 4.9 and this script does not work. If it matters, I'm also running QT 7 Pro.



[ Reply to This | # ]
Save iTunes Music Store videos with Quicktime Pro and OS X 10.3.9
Authored by: euskir on Jul 09, '05 01:07:36AM

The script is no longer working with iTunes 4.9.



[ Reply to This | # ]
Save iTunes Music Store videos with Quicktime Pro and OS X 10.3.9
Authored by: ssevennm on Aug 29, '05 01:39:51PM
You can try this.

[ Reply to This | # ]
A shell command to save iTunes Music Store videos
Authored by: cashxx on Jul 14, '06 06:27:08AM

This is more when streaming movies using Quicktime over the web.....

How about this:
1) When streaming the movie select "Show Movie Info"
2) Copy the "Source" URL
3) Open "Safari" and open Safari's "Downloads" window
4) Hit the Apple Key+V to paste the URL you copied into Safari's download window and it should start downloading.

Thanks,

Dan



[ Reply to This | # ]