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!

The state of Plex Media Center on Linux

gewalkergewalker Posts: 39Members, Plex Pass Plex Pass
edited December 2011 in Plex Home Theater for 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
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/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 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!
«13

Comments

  • eclipsenet2keclipsenet2k Posts: 30Members, Plex Pass Plex Pass
    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!
  • gewalkergewalker Posts: 39Members, Plex Pass Plex Pass
    edited December 2011

    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/gewalker/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. :)
  • eclipsenet2keclipsenet2k Posts: 30Members, Plex Pass Plex Pass
    edited December 2011
    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
  • gewalkergewalker Posts: 39Members, Plex Pass Plex Pass
    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. :)
  • eclipsenet2keclipsenet2k Posts: 30Members, Plex Pass Plex Pass
    Yup that did it for me, I did the RSA/SSH key route. Now to get in there and see how things are going :)
  • gewalkergewalker Posts: 39Members, Plex Pass Plex Pass
    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.
  • eclipsenet2keclipsenet2k Posts: 30Members, Plex Pass Plex Pass
    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.
  • eclipsenet2keclipsenet2k Posts: 30Members, Plex Pass Plex Pass
    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'
  • gewalkergewalker Posts: 39Members, Plex Pass Plex Pass


    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?
  • eclipsenet2keclipsenet2k Posts: 30Members, Plex Pass Plex Pass
    gewalker wrote:

    ARe you compiling on a device with crystalHD hardware?


    No, pretty sure I'm not.
  • gewalkergewalker Posts: 39Members, Plex Pass Plex Pass

    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.
  • eclipsenet2keclipsenet2k Posts: 30Members, Plex Pass Plex Pass
    gewalker wrote:

    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!
  • eclipsenet2keclipsenet2k Posts: 30Members, Plex Pass Plex Pass
    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)
  • gewalkergewalker Posts: 39Members, Plex Pass Plex Pass
    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.
  • jaapsjaaps Posts: 187Members Plex Pass
    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*)
  • gewalkergewalker Posts: 39Members, Plex Pass Plex Pass
    jaaps wrote:

    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?
  • gewalkergewalker Posts: 39Members, Plex Pass Plex Pass
    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:

    [attachment=8914:plex_media_center_linux_branding.png]
  • ManMan Posts: 246Members ✭✭
    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..
  • gewalkergewalker Posts: 39Members, Plex Pass Plex Pass
    Soli wrote:

    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.
  • jaapsjaaps Posts: 187Members Plex Pass
    gewalker wrote:

    How long did the build take on your ion?


    Didn't really measured the time. I went to do other things while it was compiling. But with an atom processor it takes a long time of course.
    I'll compile a new version with the changes some time today and I'll record the time it takes.
«13
Sign In or Register to comment.