Airplay Plugin for Plex

I made a simple bash script to have it run at startup. It’s something like:



#!/bin/bash



cd (path to airplay)

python airplayer.py



I then made sure that when double clicking the bash script that it was set to run with Terminal.app (in OSX Finder), then I added it to my startup items in the accounts tab. It’s not the “proper” way to do it, but it works for me. I also like to see the terminal stay active for debugging purposes in case I’m having issues with something. Call me a geek :smiley:



Cool, is there any way to bypass having the terminal window open this way?


No, not that I know of. You might be able to set it to start "hidden" in the accounts preferences, but not sure if this will work or not. Unfortunately to allow finder to launch it it needs to launch terminal to do so ... that's why people use the startup hooks/launchd instead ;)

This works ok for my setup because I don't have Plex set to launch at startup, I launch it on demand with the menu button on my remote as the machine gets used for web browsing the like like too.


Allright, thanks for your input, I took your idea and created an alias in my ~/.profile as such


alias airplay="python /Applications/PascalW-Airplayer-7b7b1c5/airplayer/airplayer.py"



If anyone has any input on [my problems here](http://forums.plexapp.com/index.php/topic/20950-airplay-plugin-for-plex/page__view__findpost__p__151820), I would really appreciate it!


Hi marius,

Could you try doing this in your terminal:

1. *chmod 644 /Users/myaccount/Library/LaunchAgents/org.pwiddershoven.airplayer.plist*
2. *chown myaccount:Staff /Users/myaccount/Library/LaunchAgents/org.pwiddershoven.airplayer.plist* (replace myaccount with your username)
3. *chmod -x /Users/myaccount/Library/LaunchAgents/org.pwiddershoven.airplayer.plist*
4. *launchctl load -w /Users/myaccount/Library/LaunchAgents/org.pwiddershoven.airplayer.plist*

At this step your shouldn't get any errors.

5. *launchctl start org.pwiddershoven.airplayer*

This shouldn't give any errors too and airplayer should be running now.

Let me know if it works.


You my friend, truly know your stuff!

I initiated steps 1-4 and Plex gleefully announced "*Airplayer has been started*".

Thank you so much for your help - and for creating this spectacular thing!

I just got this installed and running. This is very cool indeed. The question that I have is that iTunes does not see my machine as an Airplay Target. The only things that I have been able to shoot over to Plex via Airplayer is Youtube from my iPad and video that is locally stored on the iPad. What gives? I have other apps like Air Video that I thought would work. Does the AirPlayer script needs to be updated to reflect iOS 4.3?

The apps in question need to be updated to use the new airplay features, i.e. if you want to airplay from Air Video and the like they will have to be updated to use the new frameworks first.



Will somebody pass me a dunce cap and make me write "I will do more troubleshooting before posting on web forums!" 100 times. The problem with Air Video was that I had updated the iPad app earlier in the week, but I forgot to update the Air Video server portion. *feels like a dumba$$*

:unsure: :blink: :unsure: :blink:

Thanks for the response.

Hopefully this is a better question…



I have both a Mac-Mini with the Airplayer script running with Plex, and I have an AppleTV 2. Why is it that some apps see only the AppleTV, but not both the ATV and Plex as AirPlay targets?



Might be related to iOS 4.3 and the new feature to play every video through Airplay. If that's true Youtube works but videos in Safari only on ATV2?

There will be an update soon I guess.


Which apps do not recognize Airplayer? I'll have a look at it.

Hey PascalW,



I got the airplayer to run, no errors, connects to Plex fine.



I’m running iOS 4.3 on both my iPad and iPhone4 which are connected to my network at home, but they do not “see” the Airplayer that’s running on Plex…



Any ideas?



EDIT

Ok, I guess it’s a little picky about what it will send over AirPlay.



YouTube works (most of the time), Podcasts (with video) don’t, even if they aren’t DRM’ed, audio-only doesn’t work (but I think this was mentioned).



Is it an AirPlay limitation or an Airplayer limitation that Audio can’t be passed? (I’m not talking DRM, just regular, non-drm audio).

This an excellent plugin. However I have to manually start it in terminal. I copied the script to the instructed folder and changed the path and it still won’t auto start. I’m gonna try again as I just got a Mac mini last night. I’ll report back hopefully I can get it working though.



Good job dude



Have you updated Airplayer recently? I've included IOS 4.3 compatibility 2 days ago. With that version you should have no problem streaming from youtube, photos.app, iTunes on iDevice (non DRM) and any third party app.



I've updated the installation instructions yesterday. I clarified installing the launchd plist, see https://github.com/PascalW/Airplayer/blob/master/INSTALL.mdown . Make sure you don't skip the permission steps.

Hi,



I’m getting an error on startup. I’ve just pulled a fresh copy from github and I’m running Leopard.



Ernst:airplayer tv$ python airplayer.py <br />
Traceback (most recent call last):<br />
  File "airplayer.py", line 19, in <module><br />
    from protocol_handler import AirplayProtocolHandler<br />
  File "/Users/tv/Documents/Airplayer/airplayer/protocol_handler.py", line 4, in <module><br />
    import lib.biplist<br />
  File "/Users/tv/Documents/Airplayer/airplayer/lib/biplist/__init__.py", line 197<br />
    if extra == 0b1111:<br />
                     ^<br />
SyntaxError: invalid syntax<br />
Ernst:airplayer tv$ <br />




Any ideas?

Updated to the latest airplay from github today.



The “iPod” app on my 4.3 iPad can’t see Plex as an Airplay device, also with non-purchased music.



The YouTube app works as it always has, without problems, sending video to Plex.



Any ideas on the music thing?



You can't stream audio only (Airtunes). This will probably never be possible as this content is encrypted.

As an alternative you could use iTunes installed on your Mac and use the app "Remote" to play the music. This is actually even better because you don't use your iPad's batteries. Just let iTunes opened in the background.


OK, thanks for the reply.

I thought I could play non-iTunes Store-purchased with the iPod app, that's too bad, I like using my iPad for browsing my remote iTunes catalog and then Airplay'ing it to my Plex Mac Mini connected to my receiver...

I guess I will keep using my Apple TV for that then, works fine :)


Airplayer requires Python 2.6 since the latest updates. This is due to the use of a third party library which unfortunately doesn't support Python 2.5.

You can install Python 2.6 or 2.7 on leopard by using the installer on http://www.python.org/download/.