Raspberry Pi



I havent tried it recently (Been using the transcoding branch, with just h264 advertised as supported), but if I remember correctly, omxplayer just reverts to software decoding when it fails (meaning it just plain sucks).

I think, at least for now, it should be fine just to request h264 only. Most servers are capable of transcoding, but if people request it, I could probably build in some method of checking.

Is anyone running PyPlex on the same rPi that they are also running Raspbmc (not at the same time of course)?



I’m a little wary of running the firmware update: rpi-update 192



No, I have it running on a Debian installation. Only omxplayer is required for pyplex to work. And


<br />
rpi-update 192<br />




is needed for omxplayer to work correctly. It just sets a different memory split. Otherwise it won't be able to play.

So I was able to install pyplex without “rpi-update 192” on Raspbmc RC5. Raspbmc runs with a 50/50 split (128mb/128mb) and omxplayer did work without the 192 split. The biggest challenge was figuring out how to install omxplayer as it wasn’t on this distro.



This is only specific to Raspbmc RC5 (I believe based on Raspbian):



sudo apt-get update && sudo apt-get upgrade

(i skipped rpi-update & setting arm_freq)

sudo apt-get install avahi-daemon

sudo apt-get install python-pip

sudo pip install tornado

sudo pip install pexpect

sudo apt-get install python-avahi



Python was complaining that it was missing package “web” and I had to do:

sudo pip install web.py (this may not be needed anymore)



Install OMXplayer using the deb image and instructions from here:

http://omxplayer.sconde.net/



I’m not 100% sure you need this, but optionally add it if things aren’t working for you:

sudo apt-get install libpcre3-dev



omxplayer.bin was complaining: “No such file found” and I had to do this:

sudo ln -s /lib/ld-linux-armhf.so.3 /lib/ld-linux.so.3



Stop XBMC:

sudo initctl stop xbmc



Launch pyplex:

python pyplex.py hdmi




As far as the web package, I thought I removed the dependency on that, I'll have to check and make sure, but I can probably just remove the import, and it'll stop complaining.

For the library not found, looks like you installed a soft-float build of omxplayer onto a hard-float build of debian (Raspbian / RaspBMC now use hard float to speed things up). I believe there is an omxplayer package in the rasspbian repositories, so `sudo apt-get install omxplayer` would probably do better for you.


It might be still being imported at the import lines? Just a thought.


I swear I tried to install via apt and didn't find it, but I do see it now:

pi@raspbmc:~$ apt-cache search omxplayer<br />
omxplayer - Command line media player for Raspberry Pi<br />
<br />
pi@raspbmc:~$ more /etc/apt/sources.list<br />
deb http://archive.raspbian.org/raspbian wheezy main contrib non-free


The omxplayer I installed was: omxplayer_0.2.3~git20121023~8f6692d8_armhf.deb and it looks like I installed the same version thats in the repos:

<br />
pi@raspbmc:~$ apt-cache show omxplayer<br />
Architecture: armhf<br />
Version: 0.2.3~git20121023~8f6692d8<br />
 .<br />
 OMXPlayer source: https://github.com/huceke/omxplayer<br />
 OMXPlayer builds: http://omxplayer.sconde.net/

On the GUI side of things for omx, do you guys know of any good options for running a GUI from the console without starting an X window?



From some research I’ve found:

PyGame - http://www.pygame.org/

DirectFB - http://www.directfb.org

Clutter - http://blogs.gnome.org/clutter/about/ & http://www.raspberrypi.org/phpBB3/viewtopic.php?f=7&t=5277

QT5? (Unsure about this one)



I've tried some PyGame for displaying the image and disabling the cursor, but with pygame initiated omxplayer doesn't play nice. Haven't looked into it much more.

I don’t know if its related to Pyplex or not but a fwe minutes agoI just wanted to watch a new episode of one of the shows I follow but when I select the episode on the iPad Pyplex started playing episode 1, tested it with another show and it also started playing episode 1 of that show. But when i start a episode from the web interface and select raspberry plex as client, Pyplex starts to play the correct episode.

Could it be that the iPad is sending the wrong URL, resulting in Pyplex starting the wrong episode? If that’s the case (haven’t tested it deeply yet, I’m more in the mood for a episode than debugging atm :stuck_out_tongue: ) who should I contact to report this bug?



I had the same bug few posts before. (page 8) I fixed it but miriad had a better fix. It should be in one of the branches but I don't know the name ;)


Try the transcode branch, it has a lot of new things, including, I think, a fix for that. If it doesn't work, I'll have to borrow my girlfriend's phone for a bit, I always test with Android and the web client.

Edit: Once I get a confirmation from someone else (Preferrably with an iOS remote control), I'll merge in the changes on the transcode branch, then we can have transcoding!


*Whohoooo*

So, if I just figured out PyPlex and am working with a fresh install of the latest official Raspbian, would the instructions on page 4 still get me up to speed, or would I need more special sauce?



For the official Raspian, this should be sufficient:



<br />
sudo apt-get update <br />
sudo apt-get install avahi-daemon python-pip python-avahi git-core omxplayer<br />
sudo pip install tornado<br />
sudo pip install pexpect<br />
sudo pip install web.py<br />
sudo apt-get install python-avahi<br />
git clone https://github.com/megawubs/pyplex.git<br />




then just

<br />
cd pyplex<br />
python pyplex.py hdmi<br />



(Leave out the hdmi if you're using analog video/audio)

edit: Fixed formatting


I tried with the transcode branch and no matter what episode I chose, it kept playing episode 1. So it doesn't seem to be fixed.


PlayMedia(http://192.168.2.52:32400/library/metadata/5/allLeaves;/library/metadata/10065;+; ; )<br />
Front: 9, End: 94<br />
Got HTTP command PlayMedia, args: [u'http://192.168.2.52:32400/library/metadata/5/allLeaves', u'/library/metadata/10065', u'+', u' ', u' ']<br />
Got command: PlayMedia, args: [u'http://192.168.2.52:32400/library/metadata/5/allLeaves', u'/library/metadata/10065', u'+', u' ', u' ']<br />
http://192.168.2.52:32400/video/:/transcode/segmented/start.m3u8?secondsPerSegment=10&url=http%3A%2F%2F192.168.2.52%3A32400%2Flibrary%2Fparts%2F8566%2Ffile.avi&quality=7&ratingKey=10063&subtitleSize=125&key=http%3A%2F%2F192.168.2.52%3A32400%2Flibrary%2Fmetadata%2F10063&offset=0&identifier=com.plexapp.plugins.library&3g=0&X-Plex-Client-Capabilities=protocols%3Dhttp-live-streaming%2Chttp-mp4-streaming%2Chttp-mp4-video%2Chttp-mp4-video-720p%2Chttp-streaming-video%2Chttp-streaming-video-720p%3BvideoDecoders%3Dh264%7Bprofile%3Ahigh%26resolution%3A1080%26level%3A41%7D%3BaudioDecoders%3Daac%2Cmp3%2Cac3%2Cdts&X-Plex-Access-Code=&X-Plex-Access-Key=&X-Plex-Access-Time=1354442532



Also, as I load subsequent videos it creates additional transcoding sessions that aren't closed out in PMS.


I just pulled and switched to the transcode branch and got the same problem.



I dont explicitly stop the transcode session, but it should be whacked by the PMS after 3 minutes of inactivity. I think this is also related to the fact I dont ping the transcoder at all (so if you pause for more than 3 minutes, it'll die when you go to resume). I'll look into both the ping and the stop tonight, shouldnt be too hard.

For the episode 1 fix, I'll look at it, I'll have to see if I can get my girlfriend's iPhone away from her for an hour or two and see what it does differently than everything else so far. I'll also look at zakharm's fix posted earlier, see if I can translate that to my transcode branch (cause then you'll have transcoding AND working iOS remote)

Just to say that I use the iPhone Plex application (IOS 6) to control my mediacenter use the pyplex code and it works perfect, so it plays the episode I choose. I would check:


  • Plex client on iPhone is updated to the latest version
  • Version of the Plex Media Server

Here are my details:
iOS6
Plex App 3.0
PMS 0.9.7.3
Transcode branch
Occurs on episodic media, but not on movies

My PlayMedia commands are different than the first episode, but it still plays the first episode:

PlayMedia(http:///library/metadata/5/allLeaves;/library/metadata/10067;+; ; )<br />
Front: 9, End: 93<br />
Got HTTP command PlayMedia, args: [u'http:///library/metadata/5/allLeaves', u'/library/metadata/10067', u'+', u' ', u' ']<br />
Got command: PlayMedia, args: [u'http:///library/metadata/5/allLeaves', u'/library/metadata/10067', u'+', u' ', u' ']<br />
-----<br />
PlayMedia(http:///library/metadata/5/allLeaves;/library/metadata/10071;+; ; )<br />
Front: 9, End: 93<br />
Got HTTP command PlayMedia, args: [u'http:///library/metadata/5/allLeaves', u'/library/metadata/10071', u'+', u' ', u' ']<br />
Got command: PlayMedia, args: [u'http:///library/metadata/5/allLeaves', u'/library/metadata/10071', u'+', u' ', u' ']<br />