Video From iPhone Straight to Apple TVShare
Note: This was posted before Airplay. But it still applies to the old Apple TV.
I was thinking it would be nice to watch a video I’d just recorded with my iPhone on the Apple TV. But it’s kind of a pain to do that. I’d have to run the iPhone upstairs, plug it in, wait for it to sync, add the video to a playlist…
Alternative: I could upload the video to YouTube, but you have to fill out the fields to upload and it seems sometimes my Apple TV loses track of my YouTube account. Or at least loses access.
So I’ve got a Rube Goldberg alternative that makes it really simple from a user perspective – once you’ve done the upfront legwork. Just email the video to yourself, if it’s short enough. Let your Mac automatically grab the video from your email and drop it into iTunes. My Apple TV seems to immediately sync on its own when new content is added to a Playlist that’s set to sync.
I’m using a pretty straightforward AppleScript and a rule configured in my Mac’s Mail program. Here’s what happens:
- I email the video to myself with the subject atv.
- The email arrives.
- A Mail-based rule sees the subject and kicks off an AppleScript that copies the video file to the Automatically Add to iTunes folder in my iTunes Music folder.
- The video gets added to my iTunes Library.
- The video is added to a Smart Playlist.
- The Apple TV is set to sync with the Smart Playlist.
- The video is synced to my Apple TV.
That looks like a lot of stuff but the Mac will do all the work. There are only a couple things you need to set up:
- Create a Smart Playlist and tell Apple TV to sync with it
- Create a rule in mail and have it run the AppleScript when a matching email comes in.
Then all you do is email yourself the video. If you open Finder and look around in your iTunes Music folder you’ll see a folder called Automatically Add to iTunes. Anything that gets dropped in there gets added to your library, so that’s where the script copies the file.
I threw this script together quickly, there’s nothing fancy, no error checking – so feel free to post any enhancements. My intention is to provide an example of what can be done easily with AppleScript and Mail rules. It might help someone accomplish other tasks similar to this one.
Here’s a link to the script and screenshots of a Mail rule and sample Smart Playlist settings. The script was saved as a text file. You need to change the path in the third line of script to reflect your user name. You also need to save it as an AppleScript using AppleScript Editor.
In the Mail rule you need to change the path to where you saved your AppleScript.
Mail Rule Screenshot:
Smart Playlist Screenshot:
You might come up with something more sophisticated for the Smart Playlist…
Finally – here’s a look at the AppleScript, which you can download.