Use AppleTV video caching for faster AirPlay viewing
By Dan Frakes, Macworld
One of my favorite features of iOS 4.2 (and later) and the
second-generation Apple TV is that if I’ve taken photos or video with my iPhone, I can use Apple’s
AirPlay technology to stream those bits of media directly from my iPhone to the Apple TV—I don’t have to first sync the media to iTunes or iPhoto. This makes it easy to, for example, show my mother-in-law the video I took of my daughter’s first “solo” bike ride at the park.
Notice I didn’t say “quickly show.” If you’ve ever streamed iPhone-captured video to an Apple TV
using AirPlay, you know the process can be quite slow. (If only there was a word for “as slow as you can imagine while still actually progressing.”) Video files are huge to begin with, the video on your iPhone hasn’t been compressed, and wireless networks present additional bandwidth challenges—the end result is that it can take five or ten minutes for the Apple TV to buffer a two-minute iPhone-filmed video. (And the Apple TV decides on its own when it’s received enough video to allow playback to begin.)
As I discovered over the weekend, when I attempted to show the aforementioned bike-ride video, this makes for a less-than-impressive demo. (Cut to scene of me telling the family, “Go ahead and do what you were doing; I’ll let you know when it’s ready.”) But what I also realized this past weekend is that there’s a way—with a few limitations—to “queue up” these videos for instant playback.
The latest Apple TV doesn’t have a hard drive, but it does have 8GB of internal memory. Some of that memory is used to store the Apple TV’s operating system and other software, but a big chunk of it is used to cache media—video, audio, or photos—for better performance. If you’ve ever streamed a movie from your Mac or from Netflix, you’ve seen the blue progress bar “fill up” as the Apple TV stores a chunk of that content (a technique often called buffering). When you’re watching the video, the Apple TV actually reads the stored data, rather than the data streaming over the network; as stored data is used, it’s discarded and replaced by new data. This is why you (usually) don’t see stutters and freezes in streamed video, even with a choppy network connection.
But this caching doesn’t just happen with media streamed over the Internet or from your Mac—it also happens when streaming, say, video from an iPhone. And, in fact, that video stays in the Apple TV’s cache until the memory is needed for something else.
Do you see where I’m going here? If you do, you’re a step ahead of where I was on Monday evening. That’s when my wife returned from a weekend trip, and I thought she’d enjoy watching the same bike-ride videos I’d showed her mom the day before. I warned her that it would take a while for the Apple TV to buffer enough of the first video to begin watching it, so she went off to start unpacking. Yet when I tapped the AirPlay button on my iPhone to start streaming the first video, it instantly started playing on the Apple TV. As did the second. And the third.
Of course, the reason is that the Apple TV had cached the videos the night before, and those videos were still in the cache. (The following day I used the Apple TV to watch some streaming video from Netflix and the NBA channel. This evidently overwrote the videos I’d streamed from my iPhone, as the next time I tried to watch them via AirPlay, I was back to slow-as-molasses buffering.)
The upshot is that if you’ve got some iPhone- or iPad-hosted video you want to show to your family or friends using your Apple TV, you can save precious time—and avoid uncomfortable tech moments—by streaming that video before the entire family gathers around the TV. When the time comes to watch, the video will be ready to go.
The caveats? Caching is obviously limited to the amount of free memory on the Apple TV, so you won’t be able to queue up an unlimited number of clips, and cached video remains on the Apple TV only until something else needs that memory. Also, in my testing, it appears the Apple TV only keeps cached iPhone-streamed video in memory if you let the video load completely. If I stopped AirPlay streaming before the Apple TV cached the entire video, that video was re-streamed from the beginning the next time I attempted to view it on the Apple TV.
But if you want the convenience of AirPlay streaming without the wait, this tip can come in handy—especially for those gather-the-family viewing opportunities.