I remember when you first started looking at this. Not many ppl had a Pi at the time.
Glad to see the amount of progress made. Will give a try...
I had thought about this in the past, if it makes sense for us to make some sort of array or dict to tweak settings for particular hardware, the dict could have the media player to call (Just have multiple media player modules all implementing a similar interface, and pick one), and various options that could be added, like "dont show the splash screen"
Then pyplex could be a much more general linux gui-less client, which I think would be pretty cool.
Hi all,
there still seems to be something wrong with the media server running on a mac so i bought some new hardware parts and build a little linux server (i wanted to do for a long time
) with the media player installed and tested it and it works perfect. Very perfect!
Some useless info 
Have a nice weekend!
I’ve been without an SD reader for a couple of weeks, and I’m dying to jump in on pyplex, see how it works, if there’s anything I can do to help, etc.
In case you haven’t seen yet, elan just posted about updates and changes to the web client, and there’s something super exciting to report:
The web client now lets you send video to “Plex apps which support remote control”
This includes choosing subtitles and audio streams 
I was thinking exactly the same thing this morning. pyplex should call a different class for Xbmccommand responses depending on the HW. I have made a fork for know to work on it.
Hey guys, I love the idea of using the Ras as a straight up client.
I’m looking for something to only play movies and tv shows, no channels or anything like that, so a couple of questions.
Whats the best Ras to buy? Pretty much all my files are HD either 1080 movies or 720 tv shows, my PMS is on a Windows 7 box and all media spread across 2 drobo FS NAS.
Where can I get a very straight forward instructions to install this Plex Client build? I’m very newbish.
Is there any transcoding so it plays on the Ras? or is it a straight through pass and play?
Cheers
Swoods.
There you get the plex client and in the readme is an installation manual. I think it's easy enough. If not - write us :)
And now my question. Anyone knows how to work with the Plex Auth-Token? I'am trying to play remote files and I need to authenticate. I have my Auth-Code and tried to bind it at the end of the remot url
?X-Plex-Token=AUTH-TOKEN=
but this didn’t work. Anyone knows how to do it? Send a special header?
Um there where?
hahaha, I'am sorry :)
https://github.com/megawubs/pyplex
I think mkv's tend to show the aspect ratio line, while non-mkvs dont, but that shouldnt cause a 500 error either way.
Where'd you see the 500 error, the remote control device (or Plex logs), or in the console on the RasPi?
Hi all,
did you have the problem that pyplex didn’t played the right file after update? It played everytime the first file, not the selected. I fitted the script and renamed the variables (I hope you did not take me amiss)
Did you had the same problems? If yes, I’ll push it to the git repo.
The PlayMedia method:
global omx<br />
global parsed_path<br />
global omxCommand<br />
global media_key<br />
global duration<br />
<br />
# ===== Parse url and bind tag<br />
parsed_path = urlparse(fullpath)<br />
fullpath = parsed_path.scheme + "://" + parsed_path.netloc + tag<br />
<br />
# ===== Parse url to get xml<br />
getXML = urllib2.urlopen(fullpath)<br />
readXML = getXML.read()<br />
xml = et.fromstring(readXML)<br />
getXML.close()<br />
<br />
# ===== Get video<br />
singleMovie = xml.find('./Video/Media/Part')<br />
#print "Attribute Key: "+singleMovie.attrib['key']<br />
<br />
# ===== Construct the path to the media.<br />
duration = int(singleMovie.attrib['duration'])<br />
mediapath = parsed_path.scheme + "://" + parsed_path.netloc + singleMovie.attrib['key'] <br />
#print "Mediapath: "+mediapath<br />
<br />
if(omx):<br />
omx.stop()<br />
<br />
omx = OMXPlayer(mediapath, args=omxCommand, start_playback=True)
I'm doing a lot of work on moving the plex interface stuff (the XML stuff) into a separate module, to make it easier to make "device" classes (What is currently called XbmcCmmd), and for transcoding (So we always get something we can hardware decode). If you look at the Transcode branch on the github, you can use that (but change self.media.getTranscodeURL() in pyplex.py to self.media.fileURL , and it'll work)
Ok, there's actually working code in the transcode branch, using the Plex generic Transcoder, with us claiming capabilities of h264 video (I may add support for checking for mpeg2 and VC1 licenses later, but h264 works for now)
This also moves the Plex interactions into a seperate module, for ease of making new "hardware" classes later.
If anyone can, please test the transcode branch, if another person or 2 verifies it works, I'll merge with master.
Side effect: Subs work!
Downside: In transcoded files, omxplayer resets the playback speed when the segment transitions happen, so fast forwarding tends to give you less than 10 seconds usefulness. Still working on a fix for this.
It doesn’t seem like there’s a good way to check the license status. You can look at /boot/config.txt to see if keys are present, but that doesn’t tell you if those keys work on that particular Pi…
Great!! I won't be able to test it until Sunday, but I will do it. In my case, using a different hardware, I can check if I can enable it without touching your code
I think my plan was to assume that if they had licenses present, they actually worked. With how my PMS is handling transcoding to h264 (Very cleanly, no perf problems, even running in a virt), I think this is getting back-burner'ed until someone needs it.
If you have omxplayer and python, it should work pretty well. Without omxplayer (which is RasPi specific, as far as I know), you'll need to write up a replacement media player wrapper. I think I'm going to attempt to write up a VLC wrapper today, which should be able to run on most systems.
I have modifed already the master branch to allocate the Mediacenter player (I made a fork) . It uses telnet commands to order to play and remote control. From my point of view, XbmcCommands should be a different class (don’t know too much of python) so you choose which one to load depending on a flag. So pyplex.py could remained untouched
The plan going forward will be to rename the XbmcCommands class to be a more appropriate name for the RasPi, and its own module, and then make other modules for other media players, as needed.
In the transcode branch, there's some work to move the plex XML interface and processing out of pyplex.py, and out of the media player class, so other media player classes can use it without re-inventing the wheel.
This sounds like a situation where a safe assumption, and an early-warning fail flag would work.
Does omxplayer return any information if a file fails to play due to non-accelerated codec?
Should only cause a small UI hiccup to ave pyplex see the key, attempt to play, fail, and then request a transcode.