Adding AirPlay to a Receiver without an Apple TV - Raspbmc and the Raspberry Pi
I'm continually amazed at the usefulness of a small but complete $35 computer that is the size of a deck of cards. I'm coming up with all sorts of uses for the three Raspberry Pi devices in our house. I talk about our experiences in Top 10 Raspberry Pi Myths and Truths, but right now I want to share what I did with a Raspberry Pi over lunch today.
I've got a lot of video on my iPad and iPhone and I've always wanted to be able to use "AirPlay." Basically AirPlay is a simple way to "throw" video or music at a device. I'm always plugging my iPad into the TV with an HDMI cable.
At some point in the future more receivers and TVs will include AirPlay built-in. I could buy an Apple TV for $99 as it includes AirPlay. However, I don't want AirPlay $99-dollar-bad. Maybe $35-dollar-bad. Since a Raspberry Pi with Ethernet is $35, ahem. It's on.
Back during the original Xbox days when folks were rooting their Xboxen left and right, the most useful thing you could install on it was XBMC. It turned your Xbox into a complete, flexible and modular Media Center. Fast-forward almost 10 years to today and XBMC is an ecosystem on its own, long separated from the Xbox. You can get XBMC for Android, even! There's XBMCs for Mac, Linux, Windows, iOS and more. Even Apple TVs themselves can be rooted and run XBMC.
The most promising new entry into the XBMC space is Raspbmc. Yes, a complete XBMC install for a the tiny Raspberry Pi. The most amazing part is the clean Windows installer for Raspbmc in my opinion. You run it on your Windows machine with an SD card plugged in and the installer does all the work of downloading, formatting and prepping your SD Card to run on the Raspberry PI. The whole operation took a few minutes. Then I put the SD Card in the Pi and waited maybe 15 and then I was looking at the boot screen. Very painless.
Raspbmc is full featured and virtually includes all the XBMC functionality - which is an amazing feat given the limitations of the hardware. The most recent Raspbmc Release Candidate 4 added a lot of new improvements that made this the perfect time to jump in.
I just want AirPlay, so note that while there's WAY WAY more in Raspbmc and XBMC than this ONE feature (and technically I could probably make a very stripped down distro that included only this one feature if I wanted to be a purist) I'm only interested in AirPlay. I want AirPlay with a high WAF (Wife Acceptance Factor.) That means she needs to press a button on the Receiver, hit play on her iPad and it needs to Just Work©.
After installing Raspbmc I used a USB keyboard to go into the System > Network menu and checked "Allow XBMC to receive AirPlay content."
If you want to use your iOS or Android device as a remote control to control your Raspbmc you can ditch the keyboard after initial setup. There are iOS and Android versions of the Official XBMC Remote. Just make sure you've enabled your Raspbmc in System > Network to be controlled by a Remote application. If you are feeling extra snazzy you can even get a real remote control and use one of those via USB IR. Perhaps you have a remote control lying around from an older Xbox or ATI Video Card like I did.
After setup, I needed to setup video, power, and networking. Here's what I ended up with.
- Video - Just plugged a 3 foot HDMI cable from the Raspberry Pi directly into an unused HDMI on my Onkyo Receiver. I used the "PC" input as that would make sense to my wife, then I used the Onkyo setup to make the onscreen label say "AirPlay."
- Power - I was going to pull a long USB cable to the Pi when I realized that I have a lot of devices (PS3, Xbox, Tivo, etc) that already have USB. I used a 2 foot USB cable and just leached power off the Tivo's built in USB! If your cable box's USB can do 500 mA you can likely do the same! Amazing.
- Ethernet - I wired the whole house many years ago and actually did a 5 Part Series on my blog about wiring your house for Ethernet. Because I put in a small wiring closet I could adjust ports as I like. I changed an RJ-45 phone port into an Ethernet port at the closet, labeled it, and plugged in. If you don't have wired ethernet near your TV, you can either put in a Hub, a Wireless Ethernet Bridge or get a USB Wireless Adapter for the Raspberry Pi.
Here's my little Pi behind the TV, and my iPad saying it's playing video on the "XBMC raspbmc."
Here's me using an iPad as a remote (although since I'm just throwing video at it, I won't need the remote except for configuration, and I'll SSH into the Pi to do system updates) and finally watching 1080p video on my TV, at last.
Because any video app within the iOS ecosystem gets AirPlay support this also means I can throw YouTube videos or whatever HTML5 video I find up on the TV as well. All for $35 and a lunch hour. Such fun!
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
If the HDMI-CEC option doesn't work out, if your receiver has RS232 or IP control, Raspbmc could implement a 'run this script on stream start' integration point where you ask the receiver to change input yourself.
Shane
The only reason for the ethernet is so you can perform updates. So if it works for AirPlay then there isn't really a need for the ethernet right?
I only have a single ethernet connection in my cinema room, so I might have to get a port splitter or a switch in there. I'd only be using the AirPlay or the HTPC, never at the same time so a splitter would be okay in this case.
Before you ask, I don't use XBMC on my HTPC.
Kind of disappointed that it's a three week wait though...
It lets you seamlessly stream audio, video, pictures and slideshows from your iPhone, iPad or iPod touch to your Windows PC using AirPlay technology. No configuration hazzels - it just works!
I was envisioning using the new Amazon instant video app with my Amazon prime account and streaming it to my HDTV via my iPad. Unfortunately, some apps are restricted from using AirPlay, including Amazon's. See this ars post: http://arstechnica.com/apple/2012/08/hands-on-amazon-instant-video-on-ipad-sorely-lacks-airplay-support/
Still, this is very cool and I think I might get on the waiting list for a taste of pi :)
Quick question: is there a way to get netflix and/or hulu running, or any of the other content providers out there? I know I'd need an account, but I'd love to get rid of the mac mini hooked up to my television in favor of something like this.
@Jim Great to know it supports HDMI-CEC
two question though:
1) Is it possible to play back music/video stored on the SD card?
2) I don't have any network where I'm planning on using this setup (Raspi + stereo amp). Is it possible to use the XBMC Remote app if I just buy a usb-wifi adapter? or does it require an already established network?
/Bill
Kudos to Raspberry Pi foundation, XBMC and Raspmc!
Suddenly, my iPhone dropped the AirPlay option and I am no longer able to choose AirPlay as an option. The XBMC remote works just fine and my login/password is configured. The RPi is also configured and my iPhone 4 iOS 6 thinks AirPlay is executed...alas, there is nothing.
Anyone else run into this issue? I am on the hunt for Internet input.
Thanks for the article! My workplace has "Raspberry Pi Jams" weekly during the lunch hour where we discuss projects, successes, failures, etc...and XBMC was one of the first, along with PBX and Google Voice accounts.
It appears as though yours was wired?
Thanks!
I enjoyed your excellent article.
For a while, while reading this, I thought I could use what you describe with my (pre-2008) MacBook Pro. After poking around some more, it appears that AirPlay Mirroring, even for audio-only content (I am thinking iTunes-accessible radio stations here), works only with 2011 and newer Macs.
Is this your understanding?
Thanks,
Michael
For network security reasons, I'd want to have wifi running adhoc from the Pi, using a usb wireless adaptor. Has anyone tried this?
Never seen or used airplay but always been curious about it. Potentially shopping for a new receiver and finding one with it built it can be pricey. Can't say i care ALL that much about the video (although cool) but an affordable wireless way to get my playlists to the receiver is very tempting.
I'm assuming this receiver would support this type of airplay support??
http://www.amazon.com/gp/aw/d/B008CXTX5U
I´ve got the first iPad and the apple support webpage says you need an iPad 2 to use video via airplay.
Could you tell me more about your experiences and experiences other people around you ?
thanks a lot
Great write up. I was at a community dev talk last week that covered the use of mono on a Pi so I've decided to get one. I was also hoping to try something similar to yourself as I too have a similar setup with CAT6 in the house running back to patch panels in a cupboard where my NAS is located.
I was actually thinking of going a step further and locating the Pi right next to the patch panel. The idea of this is in the hope that I could then use some HDMI/CAT6 balun devices or matrix to allow the RaspBMC to be used via any TV in the house.
is it possible to use the stereo jack output of the Raspberry Pi for audio and to use hdmi only for video, because my audio system has only a jack and not a hdmi input.
thanks
Linard
The pi boots to raspbmc... is there a way to stop the launch so I can get to the command line? I need to do so to try some suggested fixes to the other problemsThe keyboard and mouse don't work once raspbmc is launched. I can use the iPhone app or the web interface to control things until......after a few minutes of using the iPhone-based or web-based remove, it seems like the pi loses it's network connection. It's gone from the list of devices on the router. Pings don't work. Sometimes it seems like it slows down first (ping time gets long and sporadic before going away completelyAfter just 2 seconds of streaming music over AirPlay the network connection goesssh and telnet don't seem to work (even before the network connection goes away)
Any help would be appreciated!
Thanks!
* I can ssh into pi using pi/raspberry as username/pwd.
* My Apple USB keyboard and mouse works fine with XBMC.
A couple answers to posted questions.
Yes you can play songs and video off the SD card but to keep things simple I have some video and songs on a USB stick that I attach to an open USB port on the Pi.
In the RaspBMC options you can select audio to go out over HDMI or the audio port. This will allow you to connect to a receiver that doesn't have HDMI inputs and send video out to HDMI that is connected to one of your TV's extra HDMI ports
Only Q is does anyone know why I can stream video from YouTube but not TV shows I have purchased from iTunes?
I wish there was a similar solution for old PowerPC Macs. I have a bunch of "Jobs era" classics around my apartment - A 600 MHz G3 iMac, G4 Cube and a latest-gen iMac G4. Also not too long ago I got a hold of some beautiful receivers and loudspeakers from the 70's - all in very good condition and sound better than anything modern I could buy for the kind of price I got those. After that the next logical conclusion was to hook up the receivers to these Macs so I can play music no matter which room I'm in. Of course this idea wasn't complete as I soon realised that I will have to figure out a way to stream audio to all machines at once. I've looked around the internet to find an AirPlay/AirTunes server app that would run on Mac OS X Tiger (10.4) - a perfect OS for all of these machines. At the time of my research (about two years ago) I found AirServer which had support for Tiger at that time. I went ahead and purchased the app excited that it would be the perfect solution for my setup, but alas the whole thing was a joke. It had terrible audio sync issues, it crashed and had a lot of other issues that were never addressed even though I patiently and naively reported all issues and glitches to the developer hoping he would one day get it right. He never did... Another solution I tried was Rouge Amoebas Airfoil + Airfoil speakers. While that worked mostly well - it still had sync issues, plus it required a host app to send audio to the receiving computers. Again, less than an ideal solution considering it costs money and doesn't really work the way I intended to use it. Important to note that it wasn't a network issue - everything is hard wired and has been quadruple-checked and reconfigured countless times to achieve maximum efficiency. Both of the developers later released updates to their apps - AirServer supposedly fixed the sync issues and Rouge Amoeba also implemented iTunes compatible AirTunes streaming to their Airfoil Speakers app (which I tested on some intel machines and it works flawlessly), but I was enraged to find that both developers dropped support for PowerPC just as they made their apps actually useful! It made me scratch my head and wonder - why would these developers make an app which sole purpose in it's philosophy is to run on hardware that's not actively used and cut support for machines that are ideal for this kind of task. What makes a device like Airport Express or Apple TV great for the job is the fact that it's a passive device that can perform on-demand tasks you would like to take away from your computer - because humans usually divide their habitats in to purpose functional areas. We don't sleep where we work out, we don't eat where we poop, etc, etc. Out comes the only possible and inevitable dimension - the use case for this kind of app is where you have a computer that is either not doing anything or already performing passive (server) functions. All this leaves me wonder as to why these developers choose to unquestionably cut support for these machines that perfectly fit in this scenario - using the potential of an existing device that is no longer the primary machine yet is fully capable of doing something that you would otherwise have to purchase a new device for. I don't know what's wrong with Rouge Amoeba or AirServer but they completely missed out on this one and earn bad karma points for not pointing out and cultivating the usefulness of retired computers. Of course not all is lost and not all is bad and there are those who still think, care and craft for like-minded ones who are occupied thinking, crafting and caring to solve other problems and would like to live a nice life while doing that and help to stop producing more useless stuff along the way.
What's the lesson to learn from this? Geeks, programmes, coders, designers, artists - communicate. A working computer is still a working computer and don't let the big corporations tell you otherwise. Please, give birth to products not by following where the industry is headed or fancy new trends on dribbble, but which instead serve peoples needs in a logical way and ooooh boy, those needs are sooooo not even close to running the latest OSs. The trends set by the industry are blatant consumerism hidden behind words like innovation and revolutionary bearing huge responsibility. It's not as bad as it sounds, but sometimes I feel like some people get too carried away and actually convince themselves of things they don't honestly believe in. Just seen 22 years of the world, but already very very tired.
Success so far:
1. Installed Raspbmc via sd card and raspbmc is working fine
2. Air Play is working fine for videos, photos, youtube from my ipad.
Trying to make the below work:
1. My Mac Air is detecting raspbmc device but when i select from itunes dropdown, it doesnt work. Video/Music doesnt play
2. I saw in some videos that i need not be on Itunes to mirror my mac on tv. There was a airplay icon on the menu bar, when clicked used to mirror the mac screen. Somehow that doesnt work for me. Same with Ipad too. Only the Videos, photos, youtube works and not my entire screen.
If anybody has any hints or solutions, please suggest.
Regd mirroring, looks like raspbmc doesnt support it yet.
http://forum.xda-developers.com/showthread.php?t=2359972
Comments are closed.