I had the chance a while back to play with airplay on the Apple TV in conjunction with the iphone and I quickly saw how wonderful this was and how useful it could be at times. One big drawback was that it was only available on the Apple TV through Itunes and the iPhone….until recently.
First let me remind how AirPlay works by showing you this video.
Ok so now that you are reminded of what it does, some of you do not have an Apple TV and you use XBMC or Boxee or even Plex as your media center.
Thankfully there is a fellow that has coded a way to finally do this. His name is Pascal Widdershoven. Check out his website here for information on what he has done and a video to show you. http://pwiddershoven.nl/blog/2011/01/05/airplayer.html
He has some great code, and I installed it and all of it went somewhat well, but it took me a long time to figure it out even with instructions. There were a few pitfals so I wanted to write this article to help out some of my freinds and the rest of you out there on the web, so lets get started.
First off download the following files and place them in an easily accesible folder, like c:\apps. If you do not know how to make a new folder under the C drive on windows, stop reading now. Oh and by the way this tutorial will focus on Windows as my Boxee system is running on Windows 7 and most of my friends are doing the same thing.
Files to get:
Install 7zip so that you can untar the file below that you will need to download
This is Pascals hard work right here and there is a file inside install.mdown and I suggest you open it up in Wordpad to read the instructions inside.
Next get Python for Windows and this is the best and easiest version to install so that you will not have to fool with installing PIP or any other special tools.
http://www.activestate.com/activepython/downloads Get the appropriate version for your version of Windows.
Get the Bonjour SDK from me so you will not have to log into Apple to do so.
Ok now install
1. Install 7zip
3. Active State Python
4. untar the airplayer file you downloaded by right clicking on it and choosing extract to blah blah .tar using 7zip. After that do it again on the tar file and choose extract to here and it will show the name of the file. Next go inside all that and you should see all the files that are listed here.
Copy the Airplayer folder to your c:\Python27 folder. It can really go anywhere but I like it mixed in the meat where the work is going to be happening.
Ok now we need to open a cmd window and do some work, go to START or the ORB/Pearl thingy on Windows 7, and in the search box or run box type cmd and press enter.
While in here lets start with cd \ and press enter to get to the C: prompt and only the C: prompt.
Now lets type cd python and you can actually just type cd pyt and press the tab key and it will complete it for you and it may say python27 press enter and you should now be at c:\python27.
Type cd scripts and press enter, now you should be at c:\python27\scripts
While here type the following at the command line and press return or enter
pip install -r c:\pyhton27\airplayer\requirements.txt
Some things will install that you need and you will see lots of text go by.
Before we fire this off and test it all out edit the settings.py to reflect your setup.
I went into the airplay folder (C:\python27\Airplayer\Airplayer\settings.py) and opened settings.py with Wordpad.
Since I use Boxee for Windows I edited the following:
MEDIA_BACKEND = 'Boxee'
MEDIA_BACKEND_PORT = 8800
And thats it, save it and exit.
Now you can test it out right now by opening a cmd window and navigating to your airplayer.py file and make python run it.
At the command line enter the following and press return or enter
You should now see a some time stamps if its connected or if Boxee is closed, it will say it can not connect.
It will run in this window there until the window is closed, and while its running, launch Boxee, now while holding your iphone in hand, go to your pictures and open one and in the upper right hand corner you will see a tv looking icon with an arrow pointing upwards. This odd arrow looking icon means there is has been an airplay device detected. Touch it and you should see your computer name and when you select it, it will put the image or video on the screen. Way cool huh?
Ok that is way cool and all, but what happens on reboot? Do I have to start it up again manually? Well yes, but there is a better way.
Lets make it a system service that starts automatically when the computer boots up.
I cannot take any credit for this next bit of work either, but to make it a service download nssm2.9 and read this blog on how to do it.
Check that out and it will show you all about how to make a service and make airplayer start up when the machine boots up.
Now if you do not see any video on your boxee box, you will need to go into settings, media, advanced and disable the hardware acceleration.
Here is a video we made today when we made this happen.