Tag Archives: x264

[MacOS] Add Avi Files to iTunes Library

I. Abstract

As some of us have already realized: iTunes by default does not allow adding AVI files to its library. This is very sad, but there are several solutions for this problem.

II. Converting or going Commercial?

One might be converting all files to something that QuickTime allows to play. As this is not a convenient solution for people having a lot of AVI files, we might give Aroona’s VideoDrive app a try. VideoDrive allows adding AVI files to the iTunes library with a simple click. This is nice. But it costs 15€.

III. Using a freeware Apple script

But you might also try a custom script for free. Since as long as QuickTime can play your file, iTunes is also able to do so. And you know it: QuickTime on the Mac plays AVI, XviD, DivX, x264 movie files and a whole bunch of interesting codecs just beautifully using Perian.

Anyway the solution provided here has originally been publicly released by a guy going under the nick Nevyn on the MacRumors Forums. Aroona’s VideoDrive appeared much later on the markets. By the way: Arroona’s VideoDrive also uses Apple scripts for their things… so yes, the universe is full of funny coincidences.

Nevyn’s script does a simple thing. It adds the movie-type meta-data to the AVI file. And this basically could also be done via terminal:

  • testuser$ SetFile -t "MooV" /path/to/movie.avi

But the nice thing is Nevyn put this idea in tiny Apple Script, that allows creating a nice Apple Script Droplet. Thus allowing us to just drop the files or folders on the Droplet and have the AVI files instantly available in iTunes’ movie library – ready for sharing on the local net via Bonjour…

As said this script has originally been released on the MacRumors Forums:

(*add movie to iTunes

The script will add OSList file-type information to a list of files. This identifies them as movie files, the files are then imported into iTunes.

TO DO:
Verification of file list passed as video files
Growl integration (if installed)
Move repeat loop into separate object script to clean-up code.
*)

--Folder Action [Attach to a folder in Finder]
on adding folder items to this_folder after receiving file_list
repeat with each_file in file_list
try
tell application "Finder" to set file type of file each_file to "MooV"
end try
end repeat
tell application "iTunes" to add file_list
end adding folder items to

--Droplet [Compile and drop items onto application]
on open file_list
repeat with each_file in file_list
try
tell application "Finder" to set file type of file each_file to "MooV"
end try
end repeat
tell application "iTunes" to add file_list
end open

Yes this is basically it. In case you are too lazy to copy and paste. You’ll find the script already put into a Droplet ready for download here. Shouts to Navyn. Nice script…

Enjoy and yes: happy new year to all of you :-)

Links

»MacRumors Forums: Add AVI to iTunes
»Aroona.net: VideoDrive Download
»MegaUpload: Download AVI to iTunes Droplet for free ;-)…
»Perian.org: Download Perian for QuickTime