Improved Movie Viewing in iTunes

by Matthew Russell

Related link:

In Have you looked at iTunes?, one of my O'Reilly brethren, François Joseph de Kermadec, got me to thinking about a particular point he made:

[The] full screen video playback, that is handled so smoothly by QuickTime Player, has iTunes stop, jitter, pixellate… It does not feature any controls in full screen mode whatsoever, it does not hide the cursor and, best of all, the screen saver has been known to go ahead and cover it.

Amen; I absolutely agree -- pretty poor effort there by the iTunes folks. Especially since any AppleScript amateur can script up an 80% solution to this problem in about 5 minutes. But for this very reason I think we can forgive Apple, at least for the time being, since they've made it so darn easy for us to fill the void.

Here's a quick and dirty first run at things:

tell application "iTunes"
set theList to (get selection of front window as list)
set trackCount to count of theList
if trackCount is 0 then
tell application "iTunes" to display dialog "No track selected. Try again" buttons {"OK"} default button 1
else --assuming only 1 movie selected
set theTrack to item 1 of theList
set thePath to the location of theTrack
tell application "QuickTime Player"
set show welcome movie automatically to false --remove annoyance
open thePath
present movie 1 scale screen --again, assuming 1 movie. full screen even without Pro
on error
tell application "iTunes" to display dialog "Oops. Some error occurred." buttons {"OK"} default button 1
end try
end tell
end if
end tell

Open up Script Editor, paste in the file, make sure it compiles, and then save it in your ~/Library/iTunes/Scripts folder (creating it if necessary.) Now, instead of clicking on a video (part of the missing 20% of our solution), you just run the video from the script menu from up in the menubar. Your video should run at fullscreen in QuickTime (even without Pro) and you'll also get access to those controls and nice things that come along with QuickTime.

Feel free to polish it up.


2006-01-19 20:44:45
If you'd rather view it double size
Great tip !

Though scaling small resolution movies to full screen might not give the best image. iTunes uses double size, and I find this is usually best balance of size/quality of scaled image. To do this, you can replace :
present movie 1 scale screen
present movie 1 scale double

The movie will still be presented on "full screen mode".

2006-01-20 10:41:37
Great tip.
Thank you so much. This is especially helpful when you want to show off SNL's Lazy Sunday and you don't want your co-workers left with the impression that iTunes can barely squeeze out a short video. :^)
Denis Lynch
2006-03-29 20:33:00
Thanks for this tip! The best iTunes script I've seen.