Community Builds of Plex Media Player Embedded 2.x for Raspberry Pi 2/3[+] & NUC/x86_64

plex-media-player

#1

UPDATE: Plex’s embedded Nightlies are being built again :smiley:

https://nightlies.plex.tv/public-test/plexmediaplayer/embedded-testing/

The below is now largely redundant but left for prosperity (and for those who have a Raspberry Pi 3B+).

We haven’t had a new release of Plex Media Player Embedded for a while since the good old days of October 2017 and version 1.3.11… I imagine it’s official release is just around the corner, but I really wanted to try out the 2.x series for a project I’m working on. ( I had trouble using the Plex Companion API in 1.3.11. ) Any excuse for the new shiny :slight_smile:

The community builds have x86 images available for those on NUC’s, whilst the provided Docker and DIY builds are currently just building for the Raspberry Pis.

Remember following anything below is at your own risk and is not supported by anyone in this thread or Plex.

Community builds

@stedaniels provided:
Untested Raspberry Pi 3+ builds from https://github.com/stedaniels/LibreELEC.tv:
https://www.stedaniels.co.uk/plex-media-player/PlexMediaPlayer-2.9.0.1-9ee66d19.RPi2-arm.img.gz
https://www.stedaniels.co.uk/plex-media-player/PlexMediaPlayer-2.9.0.1-9ee66d19.RPi2-arm.tar

@jrelax provided:
PlexMediaPlayer-2.9.0.1-19661037.Generic-x86_64.img.gz
PlexMediaPlayer-2.9.0.1-19661037.Generic-x86_64.tar

@jrelax provided:
PlexMediaPlayer-2.8.0.1-b20d23b1.RPi2-arm.img.gz
PlexMediaPlayer-2.8.0.1-b20d23b1.RPi2-arm.tar

@rolandbird provided:
web-client 25-fea08608883bd1 and qt9.5.4
https://drive.google.com/drive/folders/1vq0GfXEgYSkx_lUSimkEc56GRg99OMlr?usp=sharing

Docker build container

@JSNda provided:
https://github.com/pmpbuild/devel

DIY build instructions

If you want to build for the Raspberry Pi 3+ please replace “https://github.com/plexinc/LibreELEC.tv plex-LibreELEC.tv” in step 2 with “https://github.com/stedaniels/LibreELEC.tv plex-LibreELEC.tv”. I’ve forked Plex’s LibreELEC.tv 8.2.2 build and merged it with the latest LibreELEC.tv build for 8.2.5 which contains Raspberry Pi 3+ support and fixes. I’m currently building this and haven’t tested it yet.

Step 1

Install a fresh copy of Ubuntu 16.04 Server in a VM (left as an exercise for the reader, if you already have Ubuntu feel free to try this yourself) and fully update/upgrade it, generate some ssh keys and add them to Github.
sudo apt update
sudo apt upgrade
ssh-keygen
Then copy the contents of ~/.ssh/id_rsa.pub to GitHub https://github.com/settings/keys
sudo shutdown -r now

Step 2

Clone plexinc/LibreELEC.tv and checkout dist-master and do a little fixup for ffmpeg [1]
git clone https://github.com/plexinc/LibreELEC.tv plex-LibreELEC.tv
cd plex-LibreELEC.tv
git checkout dist-master
sed -i '/--disable-ffserver \\/d' packages/addons/addon-depends/ffmpegx/package.mk packages/multimedia/ffmpeg/package.mk packages/plex/multimedia/ffmpeg-plex/package.mk

Step 3

Have a read of PlexBuild.

Step 4

Add the i386 architecture, clean up the cache and install optional and recommended packages.
sudo dpkg --add-architecture i386
sudo apt cleanup
sudo apt update
sudo apt install build-essential wget bc gawk gperf zip unzip lzop xsltproc openjdk-9-jre-headless libncurses5-dev texi2html libexpat1 gcc-multilib libexpat1-dev:i386 libfreetype6-dev:i386 libexpat1-dev libfreetype6-dev fontconfig:i386

If you jump the gun and try build command too early you might get this:
/usr/include/c++/5/iosfwd:38:28: fatal error: bits/c++config.h: No such file or directory

Step 5

Install g+±multilib
sudo apt install g++-multilib

Step 6

Showtime!
DISTRO=PlexMediaPlayer PROJECT=RPi2 ARCH=arm PMP_REPO=plex-media-player PMP_BRANCH=master make image

Step 7

Go have fun for 10-12 hours, your time may vary.

Step 8

Realise you’ve actually ended up with 2.7.0.1, woohoo! It’s in ./target/
Get it out of the VM and burn it to an SD card, slap it in a RasPi and enjoy :slight_smile:

LiveTV works great, movies and episodes, etc. not had chance to test much because I got distracted once Anchorman got going!

A massive thanks to @LongChair and the rest of the Plex team for getting this working :smiley:

[1]
ffmpeg fixup prevents:
BUILD ffmpeg-plex (target) Unknown option "--disable-ffserver".
This is because ffserver seems to have been removed from ffmpeg, the below code will find any other references.
grep -rnwl . -e '--disable-ffserver'


#2

Hi,

thank you for the howto, I am trying to build a generic image as I type this.
Maybe you should mention that a github account and properly configured ssh-keys are helpful if you want to avoid some error-messagesa along the lines of:

``Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.``

Best regards!


#3

That was on my mental list of what to add, but I totally forgot! Thanks :slight_smile:
Step x. Generate SSH keys and add them to your GitHub account
ssh-keygen
Then copy the contents of ~/.ssh/id_rsa.pub to GitHub https://github.com/settings/keys


#4

Glad they at least have this project on github as both the blog post announcing live TV on PMP( https://www.plex.tv/blog/live-tv-and-time-shifting-extravaganza/) as well as the PMP page neglect to mention that it’s not available yet in the embedded releases. I wanted to throw a low power, low noise plex player on the bedroom TV, so I ordered another raspi. Of course, I didn’t do any additional digging, and when I threw the generic embedded image on an old zotac zbox I had, I was sorely disappointed when I realized it was an old build. Though I’m sure I could have easily found another use for the raspi, I’m glad I was able to put that $35 to the use it was intended! Currently have the image building now


#5

can you supply us, who dont have the skills to build, with a image to use on raspberry pi? :stuck_out_tongue:


#6

@stedaniels Thanks for the info, I was able to build an image after a few false starts. Plex boots up with my new image, but for some reason ssh doesn’t seem to be enabled.

I was able to get wifi working by copying config files from my older SD card, but no luck with SSH. Does it work for you, and/or did you do anything to get it working?


#7

Never mind, just discovered the SSH activation in the GUI settings. :slight_smile:


#8

@stedaniels Do you know if the embedded dev team wants bug reports on these master branch builds/how to get them to them? I noticed during live tv playback, the playback progress bar never auto-fades, so by the end of the airing, there’s a yellow bar stretching all the way across the screen. The OSD actually doesn’t have a spot on it to fit this progress bar like it does for normal file playback, so my guess is it just got put in the wrong container in the GUI


#9

@stedaniels thanks for the build instructions, i have turned them into a Dockerfile + shell script to build and copy files from container to host.

sorry i am unable to post builds to github as they are ~200 MB and i am only able to store 100 MB using the free version.


#10

hope you like it.


#11

sorry i am unable to post builds to github as they are ~200 MB and i am only able to store 100 MB using the free version.

Docker Hub lets you link a GitHub repository to an automated build where they’ll pull your Dockerfile, build the image, and publish it to their public repository. It’s pretty easy to get set up. Message me if you’re interested and I can show you some examples.


#12

Great work @JSNda :slight_smile:

Matthew Hitchens, that’d be good, but the current build relies on git: style repo URI’s and not https://, I’m sure a targeted sed could fix them, but someone would have to do that, and then test it first :wink:


#13

I’ll give @JSNda a kudos as well.
6hours on my i7-920 to build via docker…
Flashed it, and worked like a champ.

Thanks.


#14

@“Jacob Bæk” said:
can you supply us, who dont have the skills to build, with a image to use on raspberry pi? :stuck_out_tongue:

I am building this right now. Should be done at some point and tested for function tomorrow. I’ll see if my son will put it on his GitHub and allow others to download it. He’s in Chicago so I’ll have to get it to him or see if he’ll let me sing into his account. I have a 1000mbps connection up so it should load quick.


#15

Does this have to be done in a VM? I was running this last night on my laptop and I think it may have locked up because I can’t find the ./target/ and can not find any img file that looks like it would be right… I will try again but may use my server to do it.


#16

@mwarcuri said:
Does this have to be done in a VM? I was running this last night on my laptop and I think it may have locked up because I can’t find the ./target/ and can not find any img file that looks like it would be right… I will try again but may use my server to do it.

no it does not have to be run in a vm, but it’s easier as you don’t have to install dependencies on your laptop etc.
try creating this in docker container it works fine for me.


#17

@JSNda said:

@mwarcuri said:
Does this have to be done in a VM? I was running this last night on my laptop and I think it may have locked up because I can’t find the ./target/ and can not find any img file that looks like it would be right… I will try again but may use my server to do it.

no it does not have to be run in a vm, but it’s easier as you don’t have to install dependencies on your laptop etc.
try creating this in docker container it works fine for me.
https://github.com/pmpbuild/devel

Trying this way and I get this…

~ # sh build.sh
time: cannot run docker: No such file or directory
Command exited with non-zero status 127
0.00user 0.00system 0:00.00elapsed ?%CPU (0avgtext+0avgdata 1304maxresident)k
0inputs+0outputs (0major+29minor)pagefaults 0swaps
build.sh: 3: build.sh: docker: not found


#18

Trying this way and I get this…

~ # sh build.sh
time: cannot run docker: No such file or directory
Command exited with non-zero status 127
0.00user 0.00system 0:00.00elapsed ?%CPU (0avgtext+0avgdata 1304maxresident)k
0inputs+0outputs (0major+29minor)pagefaults 0swaps
build.sh: 3: build.sh: docker: not found

you need to install docker and start the service first.

easy way to install docker is running below command as root or using sudo.

curl -sSL https://get.docker.com/ | sh -y

after that make sure service is running


#19

you need to install docker and start the service first.

easy way to install docker is running below command as root or using sudo.

curl -sSL https://get.docker.com/ | sh -y

after that make sure service is running

Did this last night. Started it running about 5:00 pm and went to bed at around 10:00 pm still running. I got up this morning around 6:00 am, so about 13 hours, and this is what I see;

I left it that way hoping when I get home tonight around 4:00pm it will actually be done but, I get the feeling that it’s stuck here…


#20

I tried one more time and got it running. Looks pretty good, runs pretty good. I am trying to get the clock to be right, it is 6 hours off! Also need to get the remote to work better. Is there a way to boot into the libelec part of this and run some setup type stuff?