The state of Plex Media Center on Linux

A few days ago we announced the first initial successful builds of Plex Media Center on Linux. I’m pleased to say that our progress has continued to be rapid and, frankly impressive. This post is intended to give those interested an overview of the current state of the build as well as instructions on how those with the requisite skills can participate.



Where We Are:



The current state of the build is quite a bit farther along than it was at the time of our initial announcement (when video playback wasn’t working). The client now plays back video and music quite well, signs in to my.plexapp.com, sees local and shared Plex Media Servers, etc. Core functionality is practically complete. The build process has become a great deal less onerous as well. The entire project now builds from a single make command. So far the client has been built successfully on Ubuntu 10.10, 11.04, and 11.10, as well as CentOS 6.1.





How To Get The Source:



To get a copy of the source tree for plex-linux, do the following:



Install git (your distro may vary).

In a working directory run the following commands:



working:$ git clone git@github.com:gewalker/plex-linux.git<br />
working:$ cd plex-linux<br />
plex-linux:$ git submodule init<br />
plex-linux:$ git submodule update


That will download a copy of the current head commit as well as the mediastream skin and plex-ffmpeg necessary to build.
Now read the README.plex-linux file. You'll find a listing of package dependencies for distributions where we have done a clean build test. If you're listed there, install those packages. If you aren't, try and install the equivalent packages for your distro and KEEP NOTES! We will want you to add the list of packages you install back into the doc later!
Once you're done installing dependencies, you can try a build:


plex-linux:$ ./bootstrap<br />
plex-linux:$ ./configure<br />
plex-linux:$ make -j <the number of cpu cores you have or want to use><br />
plex-linux:$ sudo make install



If it builds without errors, awesome! You can run it with "xbmc" and fiddle with it. There ARE bugs. You will run into them. Let's say you do and you want to do something about it:


plex-linux:$ git branch myawesomebranch<br />
plex-linux:$ git checkout myawesomebranch



Now you can edit stuff, test builds, fix bugs, etc. When you're happy with it, you can push your branch back to github and send a pull request and we'll pull it into the working code branch and reconcile everything. Congrats! You just helped us along the way to a fully-functional Linux client! If you're not a coder, you can also open an issue for the project at https://github.com/gewalker/plex-linux. If you can help us, however, we'll really appreciate it and you can share in the glory, whiskey and dancing girls which I have been told will ensue when we get a proper release out there.

**Where We Are Going:**

I am not a believer in taking small bites, so I've set an ambitious milestone schedule for the project. Our next milestone is "**Zoey**" and I'm targeting New Years Day for it. Here's what we know we need to fix to make Zoey a done thing:

1. Modify configure to check for libboost >= 1.42
2. Fix a linking problem with libfaad for ffmpeg compilation
3. Replace the current "XBMC" branding that the app displays with "Plex" branding (some config changes, some code changes, probably a lot of breaking and then fixing the build process).
4. Test builds and fully document dependencies for target distributions (currently Ubuntu 10.10, 11.04, 11.10; Fedora 14, 15, 16, subject to change)
5. Clean up build process and finish build documentation to allow for a working source distribution and enable wider beta-testing.

If you can help with one or more of these issues, we need you. Please consider helping us make this client a reality for a wider audience. We need people who are accustomed to building source projects and to fixing builds when they don't work. We need C/C++ programmers. We need people with a deep knowledge of autoconf and make. We need people experienced with packaging source projects for RPM and .deb-based distributions. The more expertise we can bring to bear on these problems, the sooner Zoey rolls out the door.

Milestone **Indy** has a target date of 2/14/2012. Goals for Indy include the integration of our own fork of libboost, setting up automated package building for multiple distros, and beginning integration of our code fork with the main Plex branch, all with the goal of being able to release binary beta packages and begin public beta-testing.

Milestone **Monarch** (Plex for your $ARCH!) is currently targeted at 3/15/2012 (the Ides of March). Monarch should represent our project maturing to the point that we can integrate our code fully into the Plex tree and see the beginning of regular Linux Plex Media Center releases.

I want to get there, folks. Let's get it done!

I absolutely LOVE the Plex Community! Great work guys.

This sounds great! I hope it will run as smooth as on OSX. Keep up the good work!

Awesome! Merry Christmas!

Any interest in a LIVE install to run from USB on a diskless/fanless machine, similar to OpenELEC? Or will the Plex Linux client require a full Ubuntu / Cent OS / whatever installation beforehand, and Plex runs on top of that?


A lightweight Linux distribution (or even Ubuntu Live) + PMC installed and "open at login"'d should be possible and not too hard to do.

For something similar to OpenELEC, however, it could take longer to get it right.
Or not, depending how much you can re-use OpenELEC (Plex and XBMC are pretty similar client-side).

Note: requires a [free] github account, else you get a public key error.

Thanks! I have this running on Ubuntu Oneiric x86 now, with an ATI video card. I haven’t got it to successfully play something yet, but it looks promising! Here’s what I did in case it helps anyone else



I didn’t have my git username etc configured, so I got the read-only version:


git clone https://github.com/gewalker/plex-linux.git<br />




and modified .gitmodules

[submodule "addons/skin.mediastream"]<br />
        path = addons/skin.mediastream<br />
        url = https://github.com/gewalker/plex-mediastream.git<br />
[submodule "xbmc/cores/dvdplayer/Codecs/ffmpeg"]<br />
        path = xbmc/cores/dvdplayer/Codecs/ffmpeg<br />
        url = https://github.com/gewalker/plex-ffmpeg-linux.git<br />




then I did a whole lot of silly things because I didn't follow the README properly at first. I think some of these were necessary though (like the symlinks), so I'll include it all.

<br />
sudo apt-get install automake<br />
sudo apt-get install autopoint<br />
sudo apt-get install libtool<br />
sudo apt-get install libboost.*1.46-dev libboost-doc libboost.*1.46<br />
sudo apt-get install ubuntu-restricted-extras<br />
sudo apt-get install ssh python-software-properties udisks upower xorg alsa-utils mesa-utils git-core librtmp0 lirc<br />
sudo apt-get install linux-headers-3.0???<br />
sudo adduser YourUserName video<br />
sudo adduser YourUserName audio<br />
sudo apt-get install vdpau-video libva-dev<br />
sudo apt-get install -y libkms1 libdrm-dev pkg-config vainfo<br />
mkdir ~/vaapi<br />
cd ~/vaapi<br />
wget http://www.splitted-desktop.com/static/libva/xvba-video/xvba-video_0.8.0-1_i386.deb<br />
sudo dpkg -i xvba-video_0.8.0-1_i386.deb<br />
cd ../plex-linux<br />
sudo ln -fs /usr/lib/fglrx/libGL.so.1 /usr/lib/libGL.so<br />
sudo ln -fs /usr/lib/libGLEW.so.1.5.2 /usr/lib/libGLEW.so<br />
sudo ln -fs /usr/lib/libGLEWmx.so.1.5.2 /usr/lib/libGLEWmx.so<br />
sudo ln -fs /usr/lib/i386-linux-gnu/libGLU.so.1.3.071100 /usr/lib/libGLU.so<br />
sudo apt-get install libmad0-dev<br />
sudo aptitude install subversion make g++ gcc gawk pmount libtool nasm automake cmake gperf unzip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libfribidi-dev liblzo2-dev libfreetype6-dev libsqlite3-dev libogg-dev libasound-dev python-sqlite libglew-dev libcurl3 libcurl4-gnutls-dev x11proto-xinerama-dev libxinerama-dev libxrandr-dev libxrender-dev libmad0-dev libogg-dev libvorbisenc2 libsmbclient-dev libmysqlclient-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libfaac-dev libenca-dev libxt-dev libxtst-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev libsamplerate-dev libmms-dev libmpeg3-dev libfaad-dev libflac-dev libiso9660-dev libass-dev libssl-dev fp-compiler gdc libwavpack-dev libmpeg2-4-dev libmicrohttpd-dev libmodplug-dev libssh-dev gettext cvs<br />
./bootstrap<br />
./configure<br />
make -j2<br />
sudo make install<br />


Thank you!!! I love you guys

As a new plex user, I love the software on OS X.

I can’t do much to help on the programming side, but I hope you can get a linux client for this great media center. If you need anything I can do, please respond, and I will see what I can do to help.



I get "permission denied" trying to use "git clone git@github.com:gewalker/plex-linux.git", so I'll give your method a try.

I currently have PMC up and running via Wine 1.3, but would love a native solution rather than Wine.

Thanks!

Attempting install on Crunchbang (based on Debian Stable).



Used the Ubuntu 11.04 install instructions, and only 2 of the libraries were not available… but I found suitable replacements for them.



libboost1.46-dev-all --> libboost1.42-dev-all<br />
libglew1.6-dev --> libglew1.5-dev



Added:


sudo apt-get install flac<br />
mkdir ~/vaapi<br />
cd ~/vaapi<br />
wget http://www.splitted-desktop.com/static/libva/xvba-video/xvba-video_0.8.0-1_amd64.deb<br />
sudo dpkg -i xvba-video_0.8.0-1_amd64.deb



And just like mattybe, I had to modify .gitmodules


[submodule "addons/skin.mediastream"]<br />
        path = addons/skin.mediastream<br />
        url = https://github.com/gewalker/plex-mediastream.git<br />
[submodule "xbmc/cores/dvdplayer/Codecs/ffmpeg"]<br />
        path = xbmc/cores/dvdplayer/Codecs/ffmpeg<br />
        url = https://github.com/gewalker/plex-ffmpeg-linux



Right now I'm stuck on ./configure... it fails at "Submodule xmbc/cores/dvdplayer/Codecs/ffmpeg failed to configure"

Any ideas?

joypunk, I had a similar issue but it was due to the submodule not updating correctly. You most likely need to get a public key established with git (get an account there and follow the directions), and then follow the instructions at the top. No need to change the addresses of the .git files, just do the submodule init and update. Once I went back and started over, leaving everything as described, I stopped getting that error.



As for my own issues, I was able to pull the git files and able to do the bootstrap and configure without apparent issue. The “make -j2” did not show any obvious errors, but ended with the following:


And then it stopped there... no error messages or warnings.

I moved on to "sudo make install" I instantly received:


With this, I have to believe the make -j2 thus did not go well at all. Anyone else having this issue? Did anyone fix this or find a way around it? When I enter "pmc" into the terminal the application loads, but not when I enter "xbmc" (can't find the bin file). The mediastream skin in "pmc" will not load my categories and it crashes most of the time. The following are some stats:

Ubunto 11.10
AMD 64 x2 5600+ dual core
4gb RAM
40GB SSD system hard drive

Started over after registering at github and setting up my account.



Followed your steps to get the source:



git clone git@github.com:gewalker/plex-linux.git<br />
cd plex-linux<br />
git submodule init<br />
git submodule update



Next pulled in the libraries from the readme (for Ubuntu 11.04), substituting the two that were not in the Debian Stable repos:


sudo apt-get install libboost1.42-all-dev libglew1.5-dev yasm gettext build-essential autoconf autopoint libtool libx11-dev libgl1-mesa-dev libxrender-dev portaudio19-dev libavcodec-dev libavformat-dev libswscale-dev libavdevice-dev libmad0-dev libsamplerate-dev libogg-dev libvorbis-dev libbz2-1.0 libbz2-dev libwavpack-dev libmpeg2-4-dev libfribidi-dev libsqlite3-dev libpng-dev libpcre3-dev libcdio-dev libmysqlclient-dev libmodplug-dev libfaad-dev libflac-dev libsmbclient-dev libsdl-mixer1.2-dev libxt-dev libxtst-dev libxmu-dev libxinerama-dev libcurl4-gnutls-dev libdbus-1-dev libhal-storage-dev libhal-dev libpulse-dev libavahi-common-dev libavahi-client-dev libxrandr-dev libavcodec-dev libavformat-dev libavutil-dev libpostproc-dev libswscale-dev liba52-dev libdts-dev libfaad-dev libmpeg2-4-dev libass-dev libflac-dev libwavpack-dev python-dev gawk gperf nasm libbluetooth-dev zlib1g-dev libmms-dev libsmbclient-dev libtiff4-dev libiso9660-dev libssl-dev libmicrohttpd-dev libmodplug-dev libssh-dev libsdl-image1.2-dev cmake libmysqlclient-dev libsmbclient-dev libxrandr-dev mesa-utils liblzo2-dev libjasper-dev unzip zip



Then continued to follow the steps to configure and build Plex.


./bootstrap<br />
./configure<br />
make -j2<br />
sudo make install



All done! No errors!

However...


~/plex-linux$ xbmc<br />
bash: xbmc: command not found



... so close.

Edit: duh, read the terminal after the make install... it says use "pmc" to run it.

Everything works great, except, just like using PMC via Wine you cannot exit the program. Selecting "Quit" will cause the program to freeze and you have to use the backsession terminal (hold ctrl-alt-f4) to kill the processes. I can live with that, though.

I still could not get PMC to compile properly, even though I did a fresh reinstall of Ubuntu 11.10 just to see if I messed up on the dependency trees somewhere. However, snooping around the git website I noticed the PMC 64-bit experimental (deb) package. It installed properly and loads very well; sadly though, it won’t play any of the files from my plex server which is also on this comptuer. It recognizes all of the titles, just won’t play the movies themselves. All in all, it appears to be coming along well and, like others have said, I hope it comes out to run as beautifully as it does on OS X.



Cheers

Any updates?

Any updates on a Linux client yet?



I’d be glad to contribute to the initiative in any way possible.



./xmbc not xmbc :)

Really looking forward to your work. Can’t wait to see Plex for Linux come to life. This is all I am waiting on to ditch my Mac and go full Linux.

I’m making a build right now and I am hoping it works. I am working on Ubuntu 11.10. Is the project still on the timeline that was laid out in the original post in this thread?



Update:



It compiled and I was able to launch the application. I get the PMC interface to come up, I can navigate it. It sees my the PMS install on my network and I can browse its contents. When I attempt to play anything, I get the “Please Wait” notification and then nothing happens. I installed all the dependencies listed in the README prior to compiling. Any thoughts?