Make videos always repeat in QuickTime Player

Aug 09, '07 07:30:00AM

Contributed by: Anonymous

I am a recent Mac convert, and one of the Windows apps I missed was the wonderful Media Player Classic (MPC). While this was not ported to Mac OS X, QuickTime Player offers almost all of the functions I needed except one. I am a huge fan of loading a music or video file and having it automatically repeat over and over. QuickTime supports looping in this fashion, but does not support a global loop for every file, as such I had to select loop each time. Thanks to some suggestions in the forums ("capitalj" in particular), I came up with an AppleScript droplet to do the job:

on open of target_files
  set theMovie to target_files
  tell application "QuickTime Player"
    activate
    open theMovie
    set the looping of document 1 to true
    play document 1
  end tell
end open
However, this was only partially successful. It mean't I had to drag each file onto the droplet in order for it to work. After some poking around, I discovered that I needed to compile it into an application bundle using Xcode. This way, I could associate it with certain file types (e.g. mp4), and as a result, I could double-click those files and have them open in QuickTime with the loop setting checked.

I also took the time to update the info.plist with the file extensions list from the popular VLC player (I chose not to use it because I don't like the video window being seperate). Thus, files types associated with the application are now more detailed than just "wmv" » "Windows Media Video." You could also copy the icons (*.icns) from the VLC package into the new app's resources, and you would get a complete set of icons as well. My final step was to update the application icon to the QuickTime icon.

The final result is a compiled application (for copyright purposes, the icons are not included but you can do this yourself if you want). I attached the file to the forums thread linked above, or you can download the 35KB file by clicking here.

[robg adds: I haven't tested this one.]

Comments (0)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20070808022503730