Jump to content


Photo

The state of Plex Media Center on Linux


  • Please log in to reply
53 replies to this topic

#1 gewalker

gewalker

    Member

  • Members
  • PipPip
  • 40 posts
  • Location: Herndon, VA

Posted 06 December 2011 - 05:24 PM

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
working:$ cd plex-linux
plex-linux:$ git submodule init
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
plex-linux:$ ./configure
plex-linux:$ make -j <the number of cpu cores you have or want to use>
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
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/g...ker/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 people 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!

#2 eclipsenet2k

eclipsenet2k

    Member

  • Members
  • PipPip
  • 30 posts

Posted 06 December 2011 - 07:07 PM

Hey, first off thanks for the hard work!

Second, I'm getting this error trying to follow your steps

Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Clone of 'git@github.com:elan/plex-mediastream.git' into submodule path 'addons/skin.mediastream' failed

I can understand that I don't have your auth key but I'm new to git (SVN or HG here) so i don't know where I need to edit this to get the submodules down.

Thanks!

#3 gewalker

gewalker

    Member

  • Members
  • PipPip
  • 40 posts
  • Location: Herndon, VA

Posted 06 December 2011 - 07:30 PM

Hey, first off thanks for the hard work!

Second, I'm getting this error trying to follow your steps

Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Clone of 'git@github.com:elan/plex-mediastream.git' into submodule path 'addons/skin.mediastream' failed

I can understand that I don't have your auth key but I'm new to git (SVN or HG here) so i don't know where I need to edit this to get the submodules down.

Thanks!


Ah. 2 ways to work around this, one simple and limiting, one less simple, but more useful for the long run.

1) replace "git@github.com:gewalker/plex-linux.git" with "https://github.com/g...plex-linux.git"

OR

2) Create a github.com account and add your public key per their instructions. It'll take about 5 minutes, but you'll be able to do a LOT more...also, the submodules will work. :)

#4 eclipsenet2k

eclipsenet2k

    Member

  • Members
  • PipPip
  • 30 posts

Posted 06 December 2011 - 08:00 PM

Ah, and is this in the .gitmodules file or in multiple places? I've tried the first change but it keeps seeing the git@github..etc

#5 gewalker

gewalker

    Member

  • Members
  • PipPip
  • 40 posts
  • Location: Herndon, VA

Posted 06 December 2011 - 08:08 PM

Yeah. the .gitmodules file has references in the git@github.com format. I don't know if you can actually do submodules with an https reference (new to git myself). Easiest thing is to make an account and add your key. You'll be happier and you'll be able to push your bug fixes, notes, doc changes, etc. to us. :)

#6 eclipsenet2k

eclipsenet2k

    Member

  • Members
  • PipPip
  • 30 posts

Posted 06 December 2011 - 08:48 PM

Yup that did it for me, I did the RSA/SSH key route. Now to get in there and see how things are going :)

#7 gewalker

gewalker

    Member

  • Members
  • PipPip
  • 40 posts
  • Location: Herndon, VA

Posted 06 December 2011 - 08:58 PM

Let us know how your build efforts go. And take notes if you possibly can. We're going to need documentation to get a reasonable population running this.

#8 eclipsenet2k

eclipsenet2k

    Member

  • Members
  • PipPip
  • 30 posts

Posted 06 December 2011 - 09:12 PM

I'll go through my bash history and pull out the dependencies I had to grab. I'm on Ubuntu 11.10, waiting on make to finish.

#9 eclipsenet2k

eclipsenet2k

    Member

  • Members
  • PipPip
  • 30 posts

Posted 06 December 2011 - 09:47 PM

Well Got to this part

pushd ../Python/build/lib.linux-i686-2.4/ && \
zip -0guq ../../../../../../system/python/python24.zip *.so; \
popd
~/misc_projects/plex-linux/xbmc/lib/libPython/Python/build/lib.linux-i686-2.4 ~/misc_projects/plex-linux/xbmc/lib/libPython/linux
~/misc_projects/plex-linux/xbmc/lib/libPython/linux
pushd ../Python/Lib/ && \
zip -0gurq ../../../../../system/python/python24.zip *.py* bsddb compiler curses distutils email encodings hotshot idlelib lib-old lib-tk logging site-packages xml plat-linux2 -x *.svn* *test*; \
popd
~/misc_projects/plex-linux/xbmc/lib/libPython/Python/Lib ~/misc_projects/plex-linux/xbmc/lib/libPython/linux
~/misc_projects/plex-linux/xbmc/lib/libPython/linux
make[2]: Leaving directory `/home/user/misc_projects/plex-linux/xbmc/lib/libPython/linux'
make[1]: Leaving directory `/home/user/misc_projects/plex-linux/xbmc/lib/libPython/linux'

make stops before finishing :(

$ sudo make install
Copying XBMC binary to /usr/local/lib/xbmc/xbmc.bin
install: cannot stat `xbmc.bin': No such file or directory
make: *** [install-binaries] Error 1


Subsequent make attempts throw:

libavcodec/crystalhd.c:817:9: error: implicit declaration of function ‘DtsTxFreeSize’ [-Werror=implicit-function-declaration]
libavcodec/crystalhd.c:880:13: error: implicit declaration of function ‘DtsProcInput’ [-Werror=implicit-function-declaration]
libavcodec/crystalhd.c: In function ‘copy_frame’:
libavcodec/crystalhd.c:697:1: warning: control reaches end of non-void function [-Wreturn-type]
cc1: some warnings being treated as errors

make[2]: *** [libavcodec/crystalhd.o] Error 1
make[2]: Leaving directory `/home/user/misc_projects/plex-linux/xbmc/cores/dvdplayer/Codecs/ffmpeg'
make[1]: *** [ffmpeg] Error 2
make[1]: Leaving directory `/home/user/misc_projects/plex-linux/xbmc/cores/dvdplayer/Codecs'
make: *** [dvdpcodecs] Error 2
make: *** Waiting for unfinished jobs....
make[1]: Entering directory `/home/user/misc_projects/plex-linux/xbmc/utils'
make[1]: `utils.a' is up to date.
make[1]: Leaving directory `/home/user/misc_projects/plex-linux/xbmc/utils'

#10 gewalker

gewalker

    Member

  • Members
  • PipPip
  • 40 posts
  • Location: Herndon, VA

Posted 06 December 2011 - 10:22 PM

Subsequent make attempts throw:

libavcodec/crystalhd.c:817:9: error: implicit declaration of function ‘DtsTxFreeSize’ [-Werror=implicit-function-declaration]
libavcodec/crystalhd.c:880:13: error: implicit declaration of function ‘DtsProcInput’ [-Werror=implicit-function-declaration]
libavcodec/crystalhd.c: In function ‘copy_frame’:
libavcodec/crystalhd.c:697:1: warning: control reaches end of non-void function [-Wreturn-type]
cc1: some warnings being treated as errors

make[2]: *** [libavcodec/crystalhd.o] Error 1
make[2]: Leaving directory `/home/user/misc_projects/plex-linux/xbmc/cores/dvdplayer/Codecs/ffmpeg'
make[1]: *** [ffmpeg] Error 2
make[1]: Leaving directory `/home/user/misc_projects/plex-linux/xbmc/cores/dvdplayer/Codecs'
make: *** [dvdpcodecs] Error 2
make: *** Waiting for unfinished jobs....
make[1]: Entering directory `/home/user/misc_projects/plex-linux/xbmc/utils'
make[1]: `utils.a' is up to date.
make[1]: Leaving directory `/home/user/misc_projects/plex-linux/xbmc/utils'


ARe you compiling on a device with crystalHD hardware?

#11 eclipsenet2k

eclipsenet2k

    Member

  • Members
  • PipPip
  • 30 posts

Posted 06 December 2011 - 11:34 PM

ARe you compiling on a device with crystalHD hardware?


No, pretty sure I'm not.

#12 gewalker

gewalker

    Member

  • Members
  • PipPip
  • 40 posts
  • Location: Herndon, VA

Posted 07 December 2011 - 12:36 AM

No, pretty sure I'm not.


Okay. Just to be sure, rm -rf the tree you checked out and clone again, init and update the submodules, then try the whole thing from go. Let's see if it's reproducible.

If it is, post up your output of lspci, gcc version, and uname -a, please.

#13 eclipsenet2k

eclipsenet2k

    Member

  • Members
  • PipPip
  • 30 posts

Posted 07 December 2011 - 01:50 PM

Okay. Just to be sure, rm -rf the tree you checked out and clone again, init and update the submodules, then try the whole thing from go. Let's see if it's reproducible.

If it is, post up your output of lspci, gcc version, and uname -a, please.


Removed the entire tree and started from scratch, twice.

After ./configure I'm getting :

------------------------
XBMC Configuration:
------------------------
Debugging: Yes
Profiling: No
Optimization: Yes
Crosscomp.: No
target ARCH: no
target CPU: no
OpenGL: Yes
VDPAU: Yes
VAAPI: Yes
CrystalHD: Yes
VDADecoder: No
OpenMax: No
Joystick: Yes
XRandR: Yes
GOOM: No
Bluray: Yes
MID Support: No
ccache: No
PulseAudio: Yes
HAL Support: Yes
FAAC: Yes
DVDCSS: Yes
Avahi: No
Non-free: Yes
ASAP Codec: No
Webserver: Yes
libRTMP support: Yes
Deprecated libdts: No
Deprecated liba52: No
External FFmpeg: No
External Python: No
prefix: /usr/local
-------------

lspci output:

00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller (rev 02)
00:01.0 PCI bridge: Intel Corporation 82G33/G31/P35/P31 Express PCI Express Root Port (rev 02)
00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 01)
00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 01)
00:1d.0 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)
00:1f.2 IDE interface: Intel Corporation N10/ICH7 Family SATA IDE Controller (rev 01)
00:1f.3 SMBus: Intel Corporation N10/ICH 7 Family SMBus Controller (rev 01)
01:00.0 VGA compatible controller: nVidia Corporation G86 [GeForce 8500 GT] (rev a1)
02:00.0 Ethernet controller: Broadcom Corporation NetLink BCM5787 Gigabit Ethernet PCI Express (rev 02)

GCC version: gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)

Uname -a : Linux kosmos 3.0.0-13-generic #21-Ubuntu SMP Mon Oct 17 20:18:09 UTC 2011 i686 i686 i386 GNU/Linux

Thanks!

#14 eclipsenet2k

eclipsenet2k

    Member

  • Members
  • PipPip
  • 30 posts

Posted 07 December 2011 - 04:28 PM

Just tried compiling on a completely different machine, the first was a Dell Optiplex 330 desktop, the second (output below) is a Dell Inspiron E5510 laptop.


------------------------
XBMC Configuration:
------------------------
Debugging: Yes
Profiling: No
Optimization: Yes
Crosscomp.: No
target ARCH: no
target CPU: no
OpenGL: Yes
VDPAU: Yes
VAAPI: Yes
CrystalHD: Yes
VDADecoder: No
OpenMax: No
Joystick: Yes
XRandR: Yes
GOOM: No
Bluray: Yes
MID Support: No
ccache: No
PulseAudio: Yes
HAL Support: Yes
FAAC: Yes
DVDCSS: Yes
Avahi: No
Non-free: Yes
ASAP Codec: No
Webserver: Yes
libRTMP support: Yes
Deprecated libdts: No
Deprecated liba52: No
External FFmpeg: No
External Python: No
prefix: /usr/local
------------------------

libavcodec/crystalhd.c:966:17: warning: passing argument 1 of ‘usleep’ makes integer from pointer without a cast
/usr/include/unistd.h:457:12: note: expected ‘__useconds_t’ but argument is of type ‘const struct AVOption *’
libavcodec/crystalhd.c:983:17: error: ‘CHDContext’ has no member named ‘skip_next_output’
libavcodec/crystalhd.c:983:13: warning: statement with no effect
libavcodec/crystalhd.c:994:16: error: ‘CHDContext’ has no member named ‘decode_wait’
libavcodec/crystalhd.c:994:5: warning: passing argument 1 of ‘usleep’ makes integer from pointer without a cast
/usr/include/unistd.h:457:12: note: expected ‘__useconds_t’ but argument is of type ‘const struct AVOption *’
make[2]: *** [libavcodec/crystalhd.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/home/ggullett/personal_projects/plex-linux/xbmc/cores/dvdplayer/Codecs/ffmpeg'
make[1]: *** [ffmpeg] Error 2
make[1]: Leaving directory `/home/ggullett/personal_projects/plex-linux/xbmc/cores/dvdplayer/Codecs'
make: *** [dvdpcodecs] Error 2

----
lspci:
00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 02)
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02)
00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)
00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 05)
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 05)
00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 05)
00:1c.2 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 3 (rev 05)
00:1c.3 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 4 (rev 05)
00:1c.5 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 6 (rev 05)
00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a5)
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA AHCI Controller (rev 05)
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 05)
00:1f.6 Signal processing controller: Intel Corporation 5 Series/3400 Series Chipset Thermal Subsystem (rev 05)
02:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller (rev 01)
03:00.0 SD Host controller: Ricoh Co Ltd MMC/SD Host Controller (rev 03)
03:00.4 FireWire (IEEE 1394): Ricoh Co Ltd FireWire Host Controller (rev 03)
0b:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761e Gigabit Ethernet PCIe (rev 10)
3f:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)
3f:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)
3f:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)
3f:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)
3f:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)
3f:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)

----
uname -a : Linux kosmos-work 2.6.38-13-generic-pae #52-Ubuntu SMP Tue Nov 8 17:50:45 UTC 2011 i686 i686 i386 GNU/Linux
gcc -v : gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)

#15 gewalker

gewalker

    Member

  • Members
  • PipPip
  • 40 posts
  • Location: Herndon, VA

Posted 07 December 2011 - 06:12 PM

Looks like this may be fixed in a downstream ffmpeg build. I'll see if I can merge in the appropriate changes to our fork and let you know.

#16 jaaps

jaaps

    Dedicated Member

  • Members
  • PipPipPip
  • 188 posts

Posted 07 December 2011 - 09:28 PM

Just want to say thanks for the hard work!
I got it compiled successfully on my Asrock ION 330 running XBMCfreak live.
Had a bit trouble with libboost since only an older version was available but it was fixed using a new version in a third party repo.
Also mediastream didn't look right. But that was because of the wrong texture foldername ("Media" instead of "media") and is easily fixed.

Overall it runs pretty great on my little ION. So thanks!

@eclipsenet2k: Did you try removing the crystalhd libraries? (Something like apt-get remove libcrystalhd*)

Running PMS + PlexConnect on a headless Ubuntu server. Clients: Apple TV 3 and iPad.


#17 gewalker

gewalker

    Member

  • Members
  • PipPip
  • 40 posts
  • Location: Herndon, VA

Posted 07 December 2011 - 09:55 PM

Just want to say thanks for the hard work!
I got it compiled successfully on my Asrock ION 330 running XBMCfreak live.
Had a bit trouble with libboost since only an older version was available but it was fixed using a new version in a third party repo.
Also mediastream didn't look right. But that was because of the wrong texture foldername ("Media" instead of "media") and is easily fixed.

Overall it runs pretty great on my little ION. So thanks!

@eclipsenet2k: Did you try removing the crystalhd libraries? (Something like apt-get remove libcrystalhd*)


Jaaps: I just fixed that problem with mediastream today. :) Nice catch.

We'll eventually be moving to building our own libboost which should make that aspect a lot easier on people.

How long did the build take on your ion?

#18 gewalker

gewalker

    Member

  • Members
  • PipPip
  • 40 posts
  • Location: Herndon, VA

Posted 07 December 2011 - 11:51 PM

Status Update

Commits over the last couple of days have done the following:

Fixed problems with support of VDPAU
Fixed linking problems with libfaad_decoder
Fixed broken references for textures in mediastream skin
Applied a lot of re-branding to the app. Main window now shows Plex Media Center, executable is "pmc", local settings directory is ~/.plex, etc.

At this point, if you're comfortable with building the project, feel free to have at it. I've been using it daily and I'm not really finding anything that doesn't work at this point.

Screenshot of latest build:

Attached File  plex_media_center_linux_branding.png   1.7MB   8 downloads

#19 Soli

Soli

    Dedicated Member

  • Members
  • PipPipPip
  • 247 posts

Posted 08 December 2011 - 05:37 AM

Will this build on Hardy? Will it work with the crystal hd bcm70015 unlike the current state of the OSX/Win versions?
Would be sweet to run this on an ATV1! I guess I will just have to find out..

#20 gewalker

gewalker

    Member

  • Members
  • PipPip
  • 40 posts
  • Location: Herndon, VA

Posted 08 December 2011 - 02:42 PM

Will this build on Hardy? Will it work with the crystal hd bcm70015 unlike the current state of the OSX/Win versions?
Would be sweet to run this on an ATV1! I guess I will just have to find out..


You're definitely going to have to build some libraries of your own on Hardy. The boost libs need to be at least 1.42 in order to support all of the functions used in the code. You can get the sources from the boost libraries site and should be able to build them yourself, though.

No idea what else you'll run into. Let us know!

Crystal HD, I can't speak to as I have no relevant hardware to test on. If someone wants to donate an ATV1, I'll be happy to look at building on it.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users