Dear Aunt TUAW: Can I AirPlay to my Mac?
Dear Aunt TUAW,
Do you think a Mac will be able to accept an AirPlay feed in the future? Here's why I ask -- I'm considering getting a Mac mini for my home theater. But I realized that a great feature of AppleTV is the AirPlay functionality. It seems strange that the mini (that costs 7x more) lacks this functionality. Have you heard any rumblings that accepting an AirPlay stream could come to Mac OS X?
Love & snuggles,
Your adoring nephew Todd V.
Darling Nephew Todd,
There's no reason that the Mac cannot accept and play an AirPlay video or photo stream, other than that Apple has yet to get around to implementing it and there aren't yet third-party 'catcher' apps available. AirPlay is basically a standard Bonjour service that advertises itself and accepts playback requests through simple URLs.
The problem lies in reverse engineering the service. I've poked around under the covers and have discovered that AirPlay is built using a reverse-HTTP protocol, which allows a client to connect to a host and then flip the way that the connection (called a "socket") works. The client becomes the host and the host becomes the client.
In practical terms it means this: your AirPlay-ready device (or iTunes running on your Mac or PC) searches for playback systems like Apple TV, Airport Express or stereo systems supporting AirPlay. Once it finds one, it opens a connection to that system and then reverses the normal interaction style. Instead of requesting data from the Apple TV, the Apple TV takes control and it starts requesting information (like what file to play) from the iPhone or iPad or whatever. It's a pretty cool way of going about things.
Unfortunately, I've barely scratched the surface of how this works. There are a bunch of technical details that I haven't yet figured out, such as the TXT record that accompanies the Bonjour service, and how the handshaking takes place, and what authentication is required, and so forth. Once that's figured out, you could theoretically be able to stream from any app on a Mac to your Apple TV or from your handheld iDevice to a Macintosh.
If you want to get a wee little peek at what's going on with AirPlay, you can do so via your command-line Terminal application. Telnet over to your Apple TV and connect via port 7000. Send the bolded text over requesting the reverse HTTP connection and you'll receive a confirmation back from the system. The scrub command is another valid request that I stumbled over.
% telnet 192.168.0.100 7000
Trying 192.168.0.100...
Connected to 192.168.0.100.
Escape character is '^]'.
POST /reverse HTTP/1.1
Upgrade: PTTH/1.0
Connection: Upgrade
Content-Length: 0
User-Agent: MediaControl/1.0
HTTP/1.1 101 Switching Protocols
Date: Wed, 08 Dec 2010 18:28:45 GMT
Upgrade: PTTH/1.0
Connection: Upgrade
POST /scrub?position=0.000000 HTTP/1.1
Content-Length: 0
User-Agent: MediaControl/1.0
HTTP/1.1 200 OK
Date: Wed, 08 Dec 2010 18:28:54 GMT
Content-Length: 0
Connection closed by foreign host.
%
Other commands seem to include stop, photo, volume, rate, play, authorize, and event. Play is, in particular, interesting for the Mac application-to-AppleTV component of the puzzle.
POST /play HTTP/1.1
Content-Length: 112
User-Agent: MediaControl/1.0
Content-Location: http://192.168.0.113:7001/1/2ba99476-421e-5c9a-bb1f-c45dd7e233d8.mp4
Start-Position: 0.004067
This is what a typical on-device play request looks like. Off-device requests like those from YouTube have non-local URLs, such as from v7.lscache2.googlevideo.com.
There's obviously a lot left to do in the reverse engineering department. (Feel free to join in over at irc.moofspeak.net in #awkwardtv.) This reply should, however, give you a taste of what's to come.
Hopefully we'll be able to build a Mac-side client that handshakes over AirPlay, accepts the content URL (like the one shown above) automatically and opens a playback window either in Safari or QuickTime when that playback request comes through. AppleScript will further help automate device-side control of the the Mac-side playback.
For now, Auntie's sciatica is acting up; she was up all night hacking and is just exhausted. So that's where we'll stop for now.
Hugs & love,
Auntie T.
Share
Source: http://tuaw.com/tag/aunttuaw
Dear Aunt TUAW, Do you think a Mac will be able to accept an AirPlay feed in the future? Here's why I ask -- I'm considering getting a...
Add a Comment
Aunt TUAW,
I recently made the transition to SSD. I put in a OCZ Vertex 2 in my 2009 27" i5 iMac. I love it! I want to make sure I do the right things to make sure my SSD stays healthy and lives a long and fulfilling life. With Apple now having SSD options across their product line, I was wondering if there are things that can and should be changed to Snow Leopard. I've read a bunch of different tips and terminal mods that are supposed to do this, but who would know better than my dear old Auntie?
One thing I have already done is moved my home directory off my primary drive (SSD) onto the once stock 1TB drive which is now my secondary. I used the instructions found here: http://chris.pirillo.com/how-to-move-the-home-folder-in-os-x-and-why/
I think it's a great tip for anyone, not just those of us using an SSD.
Thanks and Happy Holidays,
Your Loving Nephew Paik
I too would really like this. I have a Mini in my AV setup and would like to be able to take a home movie from my iPhone 4 and stream it in. My Marantz AV7005 pre-amp/processor can take the audio via AirPlay, but I guess it can't accommodate the video.
December 14 2010 at 10:53 PM Report abuse Permalink rate up rate down ReplySo, what about pushing video from the iPad (my app) to a large monitor/tv through an Apple TV or a MacBook?
I was hoping that Apple would expose some kind of an AirPlay SDK, but Google searches only turn up the gaming SDK.
Does anyone have any ideas for how this would work?
Thanks!
I have had a Mac mini-as-HTPC since the mini came out, and it keeps getting faster and better through each subsequent generation. With Elgato EyeTV hardware & software I record OTA HD TV programs, and now compress them with Turbo.264 HD. Wireless bluetooth mouse and keyboard for surfing, or the remote for Plex or Front Row. It can even talk to my home automation system via a python script.
However, there are sometimes CPU-intensive tasks (like encoding) that cause playback on the mini to stutter. Also, not all members of my family feel that it's as easy to use.
This article mentions one of my pet peeves about Apple: just because the Mac mini *could* be a recipient for AirPlay content, doesn't mean they necessarily think it *should*. Similarly, I wish my iPad could be told, 'here, play this.'
But because it can't, and because of the other factors above, I bit the bullet. Now the ATV2 is on a different input to my TV and stereo, and it is great for simply sitting down and browsing Netflix, playing back content (including 720p @ 30) out of the mini's (networked) library, or accepting incoming AirPlay streams. And we can still use the mini for surfing or other tasks.
And it's easy for everyone to use - I have had very few complaints.
Except for when the TV turns on after the ATV2 and I get that goofy scrunched, magenta-background look where I have to either pull& reseat the HDMI cable, or have the ATV2 sleep and then wake again to fix it. But that's why there's tech support and firmware updates, I guess.
Otherwise, it's been great. Totally worth the $99.
For audio-only, Rogue Amoeba has a collection of Windows and Mac software under the Airfoil moniker that can both stream from a computer (from any program, not just iTunes) and can receive an audio stream. Their Airfoil Speakers program (which receives an audio stream) is also available on iOS, allowing music to stream from computer to iPhone/iPad/iPod Touch.
December 08 2010 at 3:34 PM Report abuse Permalink rate up rate down ReplyI think you need to bold the first "POST" command too.
December 08 2010 at 3:18 PM Report abuse Permalink rate up rate down ReplyI would absolutely love it if this got released.. I mainly use my iPad in the front room while the TV is running through my Mac Mini media center. It would be great to flick a video up from the internet onto the big screen and share it with the whole room.. not to mention photos from your iPhone.
December 08 2010 at 2:59 PM Report abuse Permalink rate up rate down ReplyFun! One feature I was pining for this weekend was the ability to stream a DVD to my ATV. 'If only DVD Player.app supported AirPlay' I was thinking. Given this, perhaps something even cooler like VLC could support AirPlay.
Seth
Alternatively, you can share your library from your main Mac/PC, and access it on iTunes from the homeTheaterMini, then control it with the Remote app or even with a normal Apple Remote.
December 08 2010 at 2:22 PM Report abuse Permalink rate up rate down ReplyForget iTunes. Use Plex, which is great and plays any video format, not only Apple's blessed ones. Plus it brings in synopsis and information about the movies/shows you add to it. Your media can be anywhere. In another computer, on a NAS, etc.
I love Plex 8, but having a hard time using the latest version 9. In my opinion they made the library part of the application very awkward to use. Before it was all self contained and manageable in the Plex application, now it's quite confusing.
Deals of the Day
more deals- Apple iPod nano Multi-Touch 8GB MP3 Player for $100 + $8 s&h
- Cases for New iPad at HandHeldItems: Extra 20% off, $2 credit, from $3 + $3 s&h
- $15 Apple iTunes Gift Card for $8 for new Saveology customers
- Retro 80's Case for iPhone for $11 + $2 s&h
- HHI 360 Dual-View Stand Case for new iPad w/ $2 credit for $12 + $3 s&h
- HHI ReElegant Smart Cover Companion Case for new iPad from $5 + $3 s&h
10 Comments