If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

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

stedanielsstedaniels Posts: 68Members, Plex Pass Plex Pass
edited April 23 in Plex Media Player

UPDATE: Plex's embedded Nightlies are being built again :-D

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 :-)

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

Docker build container

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 :-)

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'

«134

Comments

  • lokipolokipo Posts: 56Members, Plex Pass Plex Pass
    edited March 15

    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!

  • stedanielsstedaniels Posts: 68Members, Plex Pass Plex Pass

    That was on my mental list of what to add, but I totally forgot! Thanks :-)
    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

  • astephon88astephon88 Posts: 44Members, Plex Pass Plex Pass

    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

  • Jacob BækJacob Bæk Posts: 55Members, Plex Pass Plex Pass

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

  • anvilleanville Posts: 114Members, Plex Pass Plex Pass
    edited March 18

    @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?

  • anvilleanville Posts: 114Members, Plex Pass Plex Pass

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

  • astephon88astephon88 Posts: 44Members, Plex Pass Plex Pass

    @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

  • JSNdaJSNda Posts: 11Members, Plex Pass Plex Pass

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

    https://github.com/pmpbuild/devel

    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.

  • JSNdaJSNda Posts: 11Members, Plex Pass Plex Pass

    hope you like it.

  • Matthew HitchensMatthew Hitchens Posts: 31Members, Plex Pass Plex Pass

    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.

  • stedanielsstedaniels Posts: 68Members, Plex Pass Plex Pass

    Great work @JSNda :-)

    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 ;-)

  • cat5@catfive.orgcat5@catfive.org Posts: 2Members

    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.

  • mwarcurimwarcuri Posts: 58Members, Plex Pass Plex Pass

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

    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.

    MSI - Gamer 5 MB
    i5-4460 CPU
    16 gb of PNY 1866 DDR3 Memory
    128 gig PNY SSD drive for the OS (Linux Mint 18.3)
    480 gig SanDisk Ultra II SSD program disk
    1 tb Seagate Barracuda 5400 HDD
    LG Blu-Ray RW 16x Drive
    Hauppauge WinTV quad x 2 (8 Tuners!)
    WD My Cloud 2tb NAS with an 8tb WD Red drive in separate enclosure (USB 3.0) for 10 tb Storage

  • mwarcurimwarcuri Posts: 58Members, Plex Pass Plex Pass

    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.

    MSI - Gamer 5 MB
    i5-4460 CPU
    16 gb of PNY 1866 DDR3 Memory
    128 gig PNY SSD drive for the OS (Linux Mint 18.3)
    480 gig SanDisk Ultra II SSD program disk
    1 tb Seagate Barracuda 5400 HDD
    LG Blu-Ray RW 16x Drive
    Hauppauge WinTV quad x 2 (8 Tuners!)
    WD My Cloud 2tb NAS with an 8tb WD Red drive in separate enclosure (USB 3.0) for 10 tb Storage

  • JSNdaJSNda Posts: 11Members, Plex Pass Plex Pass

    @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

  • mwarcurimwarcuri Posts: 58Members, Plex Pass Plex Pass

    @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

    MSI - Gamer 5 MB
    i5-4460 CPU
    16 gb of PNY 1866 DDR3 Memory
    128 gig PNY SSD drive for the OS (Linux Mint 18.3)
    480 gig SanDisk Ultra II SSD program disk
    1 tb Seagate Barracuda 5400 HDD
    LG Blu-Ray RW 16x Drive
    Hauppauge WinTV quad x 2 (8 Tuners!)
    WD My Cloud 2tb NAS with an 8tb WD Red drive in separate enclosure (USB 3.0) for 10 tb Storage

  • JSNdaJSNda Posts: 11Members, Plex Pass Plex Pass

    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

  • mwarcurimwarcuri Posts: 58Members, Plex Pass Plex Pass

    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...

    MSI - Gamer 5 MB
    i5-4460 CPU
    16 gb of PNY 1866 DDR3 Memory
    128 gig PNY SSD drive for the OS (Linux Mint 18.3)
    480 gig SanDisk Ultra II SSD program disk
    1 tb Seagate Barracuda 5400 HDD
    LG Blu-Ray RW 16x Drive
    Hauppauge WinTV quad x 2 (8 Tuners!)
    WD My Cloud 2tb NAS with an 8tb WD Red drive in separate enclosure (USB 3.0) for 10 tb Storage

  • mwarcurimwarcuri Posts: 58Members, Plex Pass Plex Pass

    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?

    MSI - Gamer 5 MB
    i5-4460 CPU
    16 gb of PNY 1866 DDR3 Memory
    128 gig PNY SSD drive for the OS (Linux Mint 18.3)
    480 gig SanDisk Ultra II SSD program disk
    1 tb Seagate Barracuda 5400 HDD
    LG Blu-Ray RW 16x Drive
    Hauppauge WinTV quad x 2 (8 Tuners!)
    WD My Cloud 2tb NAS with an 8tb WD Red drive in separate enclosure (USB 3.0) for 10 tb Storage

  • rolandbirdrolandbird Posts: 36Members, Plex Pass Plex Pass

    Thanks for the instructions. I've been trying to get a build working for a while. Although I was using QT5.10 and couldn't get past a build error. Yesterday I went back to QT5.9.4 and it's been building ok now.

    Will spin up another development server and give this a go as well.

«134
Sign In or Register to comment.