post icon

Setting up an automated workflow to convert files for Apple TV on OS X

With the arrival of my Apple TV yesterday I needed a solution to get my Xvix/WMV/Divx files converted and imported into iTunes so that I can watch them. I already have Quicktime Pro, which with the recent release added the ability to “Export to Apple TV”. Since I have a lot of files, and no desire to sit around and convert these one at a time, it seemed like a perfect job for automator. I figured someone out there at some point had to have done something similar so I did a bit of google searching and found the required automator actions. Using the actions I found combined with the sample workflow they have already created for you, it is trivial to set-up a workflow that will convert to the Apple TV format and then import the file into your iTunes library. With a slight modification you can set it up a plug-in and attach it to a folder action. Now I have a simple drop folder on my desktop that launches quicktime pro and converts the file to an Apple TV viewable format, imports the file into iTunes, and cleans up after itself.

Here is a simple step-by-step guide to walk you through what I did:

1) Install xvid, divx, and wmv codecs.

These can be found here:

Divx
Xvid
WMV

2) Install the automator actions for compressing and importing into iTunes.

Download Quick Time Compression Actions and Workflow

3) Once installed you will have a directory on your desktop called “QuickTime Compression Workflow resources”. In this folder you will find a sample automator workflow called “Convert videos and add to iTunes”. Open this workflow in automator.

4) Delete the first step of the workflow which is “Ask for Finder Items”. Instead of being prompted for which items to convert, we want to setup a folder action that will automatically convert the files dropped in our folder.

5) Add a new first step to the workflow called “Get Selected Finder Items”. This action can be found under the “Finder” application.

6) Under the “Compress QuickTime Using Most Recent Settings” step change “Choose directory for converted files” to the desktop (or any other temporary folder you want to use).

7) Create a new folder on your desktop. This will be your drop folder, so call it something relevant. I called mine “Convert to AppleTV”.

8 ) Back in automator, click on file and choose “Save as plug-in”, choose “Folder Actions” from the “plug-in for” drop down. Give the plug-in the same name as your folder. Select your newly created folder for the “Attached to folder” option. Click save.

9) Since the script will convert whatever file you drop in your conversion folder using the last settings you used in QuickTime you’ll need to launch QuickTime with a test file and then choose “Export” from the file menu. Assuming you have the most recent version of QuickTime Pro you should have an option “Export Movie to Apple TV”.

10) That’s it!!! Now just close out of everything and drop your files into your new folder and watch as they are converted and imported to iTunes. It works great to leave your Mac on and then drop a bunch of files in the folder before you go to bed. When you get to your PC in the morning everything should be all ready to go.

To find out more about folder actions, check this page out:

Folder Actions

40 Comments

Leave a comment
  1. Mac vs PC
    March 24, 2007 at 4:29 am #

    Great advice for all the Apple TV buyers in the same boat as you, sure wish Apple would just ad the support in iTunes for these codecs or maybe have the ability to point the Apple TV to a specified non iTunes folder that hold these files, of course the Apple TV would then have to be able to play them…

    http://www.switchingtomac.com/

  2. G5Man
    March 24, 2007 at 7:03 am #

    Hey…just wanted to send out a big thank you for posting this great advice!

    I’m getting a 42″ flat screen TV and AppleTV in April, so my conversions are beginning now. Hopefully by the time that beauty arrives through the door, most of my content will be ready to roll.

    Again thanks for taking the time to post! This method will make my life so much easier.

    Best!

    -G5Man

  3. Jim
    March 24, 2007 at 8:46 am #

    Seems that Apple has chosen to make AppleTV *very* open, and some smart free-thinking hackers have already figured out how to allow AppleTV to play x-vid, divx, and a host of other formats (No Matroska, yet, though :( )

    You can find this info out at:

    http://forums.somethingawful.com/showthread.php?s=&threadid=2391956

    So far the steps are not pretty or easy, but they are working on it and it should be no time before they are able to do all of it without having to open the appletv up. :)

  4. Rhett Maxwell
    March 24, 2007 at 3:50 pm #

    Cool story. Automator is a really cool application that’ underrated in my opinion. I was thinking of making something like this for when the iphone is finally released.

    I made some automator actions just for converting movies to other formats. one uses quicktime, the other ffmpeg. http://rhettmaxwell.org/automator

  5. Richard Harris
    March 24, 2007 at 5:28 pm #

    See – this is the kind of thing I needed ages ago, as I have a large library of DivX and XviD encoded avi files. I tried to convert them in QT Pro but always got really crappy output. Even in H.264 at like 2500KBit/s.

    I’m gonna give this a whirl see how I get on

    pac

  6. Lawerance Oak
    March 24, 2007 at 6:41 pm #

    Make sure when you do this:

    8 ) Back in automator, click on file and choose “Save as plug-in”, choose “Folder Actions” from the “plug-in for” drop down. Give the plug-in the same name as your folder. Select your newly created folder for the “Attached to folder” option. Click save.

    That you click on enable folder action check box, once you do that it works. took me a little bit, might be a noob

  7. dalvin112
    March 25, 2007 at 2:04 pm #

    This is great! Since I live in Canada, iTunes does not offer any movies or TV shows in their store for us canucks. As a result, I saw no need to get an Apple TV.

    All my video comes from bittorrent and I have to watch them on my 15″ screen. But I want to watch on my large screen with friends/family, instead of hovering around my laptop.

    With this tutorial, I can no reconsider getting an Apple TV.

    Thanks!

  8. lufcpdx
    March 25, 2007 at 4:57 pm #

    Thanks this worked great

  9. tektoni
    March 26, 2007 at 8:47 am #

    Can one of you talented hackers make an automated program that does the same for XPPro users? I’d like to be able to convert .wmv, .avi. and .dv files to Apple TV.
    Or else a hack that does what reviewers are claiming for ATV; that it ‘finds all the videos and music on your computer.’ Wrong! As we know, it only finds them in your iTunes folder, and there’s no way the average person is going to go through the transcoding process with any and all videos they may have downloaded…such a news stories from local news web sites that inevitably are ‘wmv files. Or DVD files they’ve got on their computers from DVD Ripper or similar.

  10. Thayne
    March 26, 2007 at 9:11 am #

    This method works in theory, but I’ve tested it a bunch and I found a major flaw.

    When you use the automator action, “Compress QuickTime Using Most Recent Settings” it occasionally will encode your files incorrectly, even if the most recent settings were “export to apple tv.” I’m not quite sure why, but I think it has to do with the fact that when you export to appletv, it outputs several different resolutions and framerates depending on the source video. This automator action isn’t smart enough to tell quicktime to use the “export to apple tv” preset, but instead uses some other custom indicators sent directly to quicktime pro. I’ve tested this a bunch and ended up having to bag it because only about half of my videos came out with the proper resolution. In fact, some of them came out very blurry and horribly compressed, as if they weren’t even using the proper settings at all!

    All in all, I think for this method to work, you’re going to have to have the developer of the compression quicktime automator action do some revisions to the code. I can’t say I can trust this method now because if I can’t get the proper results 100% of the time, then automator actually WASTES my time instead of saves it.

    For apple tv compression, just use ffmpegx. It’s much faster than quicktime pro and you can tweak exactly how you want it to look when it’s done.

  11. Darleen
    March 26, 2007 at 9:31 am #

    Thanks! I just followed your instructions and am test converting an episode of BSG that is in .avi format. I don’t have QT pro but the regular QT seems to be working just fine. We’ll see. If not, then I guess I’ll pop for another license. Of course, last time I did that they updated QT about 2 weeks later and my license was no longer valid.

  12. Leo
    March 26, 2007 at 9:50 am #

    Doesn’t work for med. If I run the script directly in automator (without modifying it) I get an error saying QuickTime can’t find some file. :/

  13. Leo
    March 26, 2007 at 9:53 am #

    me*

    The error message:
    “QuickTime Player got an error: a file could not be found (-43)”

  14. Jason
    March 26, 2007 at 9:55 am #

    Leo,

    The problem you are seeing is because the temporary location on the “Compress with recent settings” step is not set correctly. Change that to your desktop (or elsewhere) and it should work from within automator.

  15. Leo
    March 26, 2007 at 10:18 am #

    Yay, it works now. Thanks. :P

  16. sporobolus
    March 26, 2007 at 2:13 pm #

    you may not need a QuickTime Pro license; you can export from QuickTime Player to many formats using AppleScript; i don’t know exactly what spec “Export to Apple TV” outputs, but there are options that should work with Apple TV

  17. Ryan
    March 26, 2007 at 4:37 pm #

    For some reason the script works to the extent that it converts files dropped into the folder and exports them to the desktop in the proper format. However, it is not automatically importing the files into iTunes. Any thoughts on where I may have gone wrong?

  18. marc
    March 28, 2007 at 2:44 am #

    I use a freeware tool called iSquint to convert all my DIVX files to *.mp4 format. Works great and delivery great quality as well.

  19. Anthony
    April 9, 2007 at 3:11 am #

    Suggested reading:
    http://www.roughlydrafted.com/RD/RDM.Tech.Q1.07/147048D8-D8B7-45E7-9A97-3CD5B4C2B75A.html
    and scroll down to:
    Pirate 5.1 using DivX and XviD

  20. Motorcycle Guy
    April 22, 2007 at 6:47 am #

    I wish I had something like this to convert videos for my xbox.

  21. Wiley Wiggins
    May 3, 2007 at 8:50 pm #

    Great post! What I am looking for is a way to automate FFMPEG X, since it’s the only way I know to convert DivX files and also add SRT subtitle files. (I have a ton of subtitled DivX movies). Any ideas?

  22. James
    June 12, 2007 at 12:05 pm #

    What a great tutorial! As an Apple TV Owner myself, this information is really useful. Thanks.

    http://www.dvd-to-wmv.com

  23. Jeffrey Engle
    November 21, 2007 at 9:26 pm #

    This recipe doesn’t work in Leopard… Can I get an update for it with updated “Download Quick Time Compression Actions and Workflow” Thank you! Jeff

  24. Anthony
    December 5, 2007 at 10:54 pm #

    Doesn’t work for me either I am trying to run this under leopard I am getting the following error.

    “QuickTime Player got an error: a file could not be found (422517408)”
    I already modified the temporary location to point to my desktop, anyone have any ideas.
    I have also tested different video files(AVI,mpg4)

  25. Tim
    December 31, 2007 at 11:40 am #

    Wow. I just found this (where have I been?), and as the author of the QuickTime Compression Actions, I’m thrilled to hear how all of you have been using it. Like some of you, I’m a bit frustrated at the moment that the Compress Quicktime Using Most Recent Settings action doesn’t seem to be working. I’m poring over the code to try to figure it out. Is it working for ANYONE with Leopard?

  26. Peter
    March 2, 2008 at 8:15 pm #

    Tim,

    I’m running a similar automator script on Leopard and when I run it manually it works. When I run it with an Automator script that uses Compress Quicktime Using Most Recent Settings the audio tracks are out of sync. Note that I’m converting TOD (JVC MPEG2) to MOV using apple intermediate codec. Any suggestions would be appreciated.

  27. Jeff
    March 18, 2008 at 5:50 am #

    Running Leopard, this works up to a point: the files are not put into iTunes. Conversion is fine, though.

  28. Billy
    March 18, 2008 at 12:37 pm #

    Yeah I set the scrip up to convert a divix file to apple tv through automator just like the top of the post says. The whole process seemed to work, but the file was never put in itunes. Actually I cannot find it anywhere on my hard drive. Can somebody give me some help. I am running tiger, itunes 7. So I would think it would work fine.

    thanks for your help.

  29. max
    July 22, 2008 at 6:42 pm #

    is there a way to drag and drop into the apple tv? I want a lot of movies on the apple tv, but dont want them all on my computer…so instead of sync. i can just drag and drop and then it wont matter if I have deleted them on the computer

  30. Daniele Zanvettor
    July 23, 2008 at 8:34 am #

    Hello.
    I have a question:
    I donwloaded the automator actions for compressing and importing into iTunes and follow the steps that are mentioned in the procedure, the procedure starts perfect and the movie is converted, but when I see the output the file the resolution is not correct (I think is 320×480)
    When I export the same movie direct from Quick Time the result file is converted perfect.
    Can any help with this issue?
    Thank you.

  31. Bazza
    November 24, 2008 at 10:19 am #

    Hi,This system(convert files for apple tv)is fantastic.But I have a little problem,I cant install it!!!!(not very good with computers).I have apple tv and the latest mac desktop but keep getting stuck installing the system.Anyone out there have the patience to help me out???Baz

  32. Oscar
    November 30, 2008 at 4:28 pm #

    Maybe this has been covered somewhere, but I just found this workflow, and it does just what I want so that I can add content to my Apple TV, and automatically do the conversion overnight.

    I had to tweak it a little to get it to work in Leopard. First, I installed the Compression Actions, but then I had to go to ~/Library/Automator/ and double click “Compress QuickTime Using Most Recent Settings.action” after which it asked me if I wanted to install this action, which I did. Then it all worked. Dunno, maybe I would only have had to log out and back in, but anyway, that made it work.

    Then, I went through the various actions and found that the conversion folder needed to be updated to mine in several places. Just check them all, and you’ll see what I mean.

    Also, I downloaded the Change Extensions action and placed it right after Get Folder Contents AFTER the compression, and had it change all files in my “conversions” folder to the .m4v extension (otherwise, they will be .mp4) so my system would see them as playable and suitable for iTunes.

    I also dumped the auto-add to iTunes serioes of actions just so I could review the files first and copy them over myself, at least for now.

    Anyway, works great on Leopard.

  33. Clement
    November 1, 2010 at 2:36 am #

    Hi,

    I realise that Mac OS X has moved on since 2007 and wondered if the workflow described would somehow replicable nowadays.

    I have Mac OX X Snow Leopard
    iTunes 10.1
    Lates QT

    Cheers

  34. Steve
    April 25, 2011 at 4:21 pm #

    No need to convert anything if you use atv flash and jail break the apple tv it works a treat

  35. sweetshanghai
    July 1, 2012 at 8:10 am #

    Hot porn Asian Chinese porn video pics viagra adults.

    http://www.sweetshanghai.com

Trackbacks/Pingbacks

  1. El Automator para convertir vídeos para el AppleTV at Harnack Blog - March 26, 2007

    [...] Via: http://vallery.net/2007/03/23/setting-up-an-automated-workflow-to-convert-files-for-apple-tv-on-os-x… [...]

  2. the-mickelsons.net » Blog Archive » Automator Workflow for Apple TV Video Conversion - March 27, 2007

    [...] a blog post about setting up anAutomator workflow for converting videos to an Apple TV format. Haven’t tried it yet, but sounds [...]

  3. USB und mehr Hacks am AppleTV at HDTV Space - March 30, 2007

    [...] Wer die 40 GB Fujitsi 2,5″ Festplatte austauschen und eine größere einsetzen möchte, dazu gibt es auch schon eine Anleitung. Als System von AppleTV dient natürlich Mac OS X 10.4.7. Die Aktivierung von SSH, die Installation von “Perian” (für Filme im Format von Xvid und DivX) findet man alles im AwkwardTV-Wiki. Firefox und VLC sollen auch schon laufen. Um DivX, Xvid und WMV-Filme für AppleTV vorzubereiten ist auch schon eine Anleitung zu finden. [...]

  4. OS X automator workflow for converting Xvid, Divx, WMV files for Apple TV « Mauro Blog - May 6, 2007

    [...] read more | digg story [...]

  5. iPod Noticias - Análisis: Apple TV - June 13, 2007

    [...] tenemos Quicktime Pro podemos también, hacer nuestro propio script en automator como nos enseñan aquí y meterle nuestra coleccion de [...]

Leave a Reply