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!

Plex Media Server for FreeBSD

elanelan CTO and Co-founderMauiMembers, Plex Employee, Plex Pass, Plex Ninja Posts: 9,325 Plex Employee
edited June 2013 in FreeBSD

It's been requested often, and now we're releasing an experimental version for you to enjoy. Caveats:

  • This is a totally experimental release. It might be the last thing we ever do for FreeBSD.
  • We've built against FreeBSD 9.1 for "amd64". Please don't request one of the thousand other arches/versions.
  • There is no support for automatically scanning when directory content changes.

In order to run, just set LD_LIBRARY_PATH appropriately, and run the media server. If you are running FreeBSD, you know how to do this :)

 

http://www.plexapp.com/elan/PlexMediaServer-0.9.7.23.0-8e6b2a8.tar.bz2

 

EDIT (ZiGGiMoN): If your looking for a ports package to install Plex Media Server with, go here: https://github.com/KalleDK/plexmediaserver_port

instagram: @elan // the wife's photography site.
the brother's photography blog // the dog's twitter feed.

«134567

Comments

  • joedemo42joedemo42 Members Posts: 22 ✭✭
    edited April 2013

    Hell froze over. After bugging you so much, let me be the first one to thank you. Thank you so much! You're awesome. And you've got yourself a new PlexPass subscriber.

    Cheers,

    -joe

    PS:  I assume you're talking about FreeBSD stable9.1 (the development branch of FreeBSD 9-STABLE)?

  • elanelan CTO and Co-founder MauiMembers, Plex Employee, Plex Pass, Plex Ninja Posts: 9,325 Plex Employee
    joedemo42 wrote on April 30 2013, 7:05 AM: »

    S:  I assume you're talking about FreeBSD stable9.1 (the development branch of FreeBSD 9-STABLE)?

    Ooops, sorry, you're right. It's 9.1 :)

    instagram: @elan // the wife's photography site.
    the brother's photography blog // the dog's twitter feed.

  • fldsflds Members, Plex Pass Posts: 7 Plex Pass

    And another PlexPass subscriber, just for this!  :D Thank you very much!

  • mariourkmariourk Members, Plex Pass Posts: 5 Plex Pass

    Aaaand, I bought a plexpass account.

    It might be the last thing we ever do for FreeBSD.

    Please, don't. FreeBSD has the best ZFS support. ZFS is by far the best FS to store your media. Hence, Plex ought to have a FreeBSD server version. Period!

  • mariourkmariourk Members, Plex Pass Posts: 5 Plex Pass

    Anyone else who has it running yet? At first I got an error, but when trying it again it started. I'm using screen, because I can't start it as a daemon. For some reason it doesn't save anything. When I stop the server, it starts completely blanc, when I start it again.

  • deanm3deanm3 Members, Plex Pass Posts: 107 Plex Pass
    edited April 2013

    This is great news. There are many out there, including myself, who see a Nas4Free/PMS combo as an ideal setup. 

    I have limited freeBSD skills, but I plan on testing it out and providing some feedback that might be useful for others. I suggest as a community we pool together our knowledge and experience to help make this freeBSD port a success. 

  • TazgodXTazgodX Members, Plex Pass Posts: 30 Plex Pass
    This is interesting. Too bad I use freeNAS and its still based on FreeBSD 8.3
    Would love to see a FreeNAS PBI plugin for this, and then my server can actually run my Plex server.
    Thanks anyways for the great work!
  • fldsflds Members, Plex Pass Posts: 7 Plex Pass

    Works perfectly fine. It's busy scanning my media, I was able to watch the first content without problems. Nice!

  • peterwemmpeterwemm Members, Plex Pass Posts: 18 Plex Pass

    Just a FYI, this is running gloriously..  I had been running the windows server over samba (ugh) for a while. I took a copy of the database from the windows machine (which was running both the client and server) and tweaked it to have the correct paths when running natively.  I wasn't sure if the pathnames would be correctly matched up or not and didn't want to find out the hard way.

    Obviously the Amazon and Netflix transcoder channel plugins can't work, but everything else seems to be working fine including remote access.

    I did have to comment out the LC_ALL, LANG and ulimit lines from the start.sh script in the bundle.  The ulimit line shrinks the stack way below the defaults, and LANG/LC_ALL upset a boost library.

    @TazgodX: it looks like there is a 9.1 based FreeNAS release scheduled "soon".  It should be fairly simple mechanics to have somebody wrap this in a pbi once they have something to run.

    PMS: FreeBSD 10.3, 80TB of ZFS media storage.
    Desktop Clients: 1 x Windows 10, 1 x MBP,  1 x Hackintosh

    Media clients: 1 x Windows 10, Roku 3, Kindle Fire TV

    Mobile Clients: 2 x iPhone 5s

  • deanm3deanm3 Members, Plex Pass Posts: 107 Plex Pass

    Following peterwemm's advice for commenting out some of the lines, I was able to get it up and running quite easily in a VM.

    Does anyone have experience with nas4free, particularly using the embedded version and how one might begin getting this setup in such an environment?

  • joedemo42joedemo42 Members Posts: 22 ✭✭

    Dear Mods/Staff: What would be the most appropriate place in this forum to ask questions (and later on post some stuff I'm working on) regarding Plex/FreeBSD?

    Cheers,

    -joe

  • joedemo42joedemo42 Members Posts: 22 ✭✭
    edited April 2013
    deanm3 wrote on April 30 2013, 6:31 PM: »

    Following peterwemm's advice for commenting out some of the lines, I was able to get it up and running quite easily in a VM.

    Does anyone have experience with nas4free, particularly using the embedded version and how one might begin getting this setup in such an environment?

    NAS4Free 9.1.0.1 is based on FreeBSD 9.1 so you should be able to install it the same way as on a regular FreeBSD. Keep in mind, PMS requires lang/python27 to be installed to function properly. Otherwise it complains (rightfull) about a missing libpython2.7.so and simply symlinking libpython2.7.so.1 provided by Plex wont work. Plex won't scan any media then.

    An addition to the usefull info of peterwemm: If PMS still complains after commenting out LC_ALL and LANG, just set LC_ALL and LANG to "C" instead of commenting it out.

    Cheers,

    -joe

  • elanelan CTO and Co-founder MauiMembers, Plex Employee, Plex Pass, Plex Ninja Posts: 9,325 Plex Employee
    joedemo42 wrote on April 30 2013, 8:32 PM: »

    Keep in mind, PMS requires lang/python27 to be installed to function properly. Otherwise it complains (rightfull) about a missing libpython2.7.so and simply symlinking libpython2.7.so.1 provided by Plex wont work. Plex won't scan any media then.

    Hmm, that shouldn't be the case, we bundle Python + a few site additions. As long as LD_LIBRARY_PATH is set with absolute path, Python should find the bundled Python.

    instagram: @elan // the wife's photography site.
    the brother's photography blog // the dog's twitter feed.

  • elanelan CTO and Co-founder MauiMembers, Plex Employee, Plex Pass, Plex Ninja Posts: 9,325 Plex Employee
    joedemo42 wrote on April 30 2013, 8:26 PM: »

    Dear Mods/Staff: What would be the most appropriate place in this forum to ask questions (and later on post some stuff I'm working on) regarding Plex/FreeBSD?

    If it takes off, we'll add a forum for FreeBSD specifically. For now, feel free to just post threads here in the preview release forum :)

    instagram: @elan // the wife's photography site.
    the brother's photography blog // the dog's twitter feed.

  • KalleDKKalleDK Members, Plex Pass Posts: 73 Plex Pass

    Argh reading this on my way to a 12 hour work shift... So exicted, but have to wait until I get home.

  • peterwemmpeterwemm Members, Plex Pass Posts: 18 Plex Pass
    edited May 2013
    joedemo42 wrote on April 30 2013, 8:32 PM: »

    Keep in mind, PMS requires lang/python27 to be installed to function properly. Otherwise it complains (rightfull) about a missing libpython2.7.so and simply symlinking libpython2.7.so.1 provided by Plex wont work. Plex won't scan any media then.

    Something is odd.  Everything seems to want to use the built-in libpthon.. but..

    # lsof -p 82854 | grep libpython
    Plex\x20M 82854 plex  txt     VREG       5,2858680465  5234195    7126 /home/plex/PlexMediaServer-0.9.7.23.0-8e6b2a8/libpython2.7.so.1

    The built-in version works fine if $LD_LIBRARY_PATH is set correctly.

    Something is a little weird for sure though.  Automated scans were not working so I sniffed around a bit.

    The server would run this:

    May 01, 2013 00:52:04 [0x8085f2000] DEBUG - Job running: /home/plex/PlexMediaServer-0.9.7.23.0-8e6b2a8/Plex Media Scanner --scan --refresh --section 1

    But all that made it the Plex Media Scanner.log file was:

    May 01, 2013 00:49:02 [0x807807400] DEBUG - Opening 10 database sessions to library, SQLite 3.7.15.2, threadsafe=1

    If I looked at stderr I saw some telltales from the scanner when run from the GUI:

    Could not find platform independent libraries <prefix>
    Could not find platform dependent libraries <exec_prefix>
    Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
    ImportError: No module named site

    I cheated and wrapped the binary:

    plex@silo:~/PlexMediaServer % pwd
    /home/plex/PlexMediaServer-0.9.7.23.0-8e6b2a8

    plex@silo:~/PlexMediaServer % ls -l Plex\ Media\ Scanner*
    -rwxr-xr-x  1 plex  plex      165 May  1 00:51 Plex Media Scanner
    -rwxr-xr-x  1 plex  plex  2958968 Apr 29 18:26 Plex Media Scanner.bin

    I renamed the scanner to have a .bin suffix and made a wrapper with:


    plex@silo:~/PlexMediaServer % cat Plex\ Media\ Scanner
    #! /bin/sh
    P=/home/plex/PlexMediaServer-0.9.7.23.0-8e6b2a8
    cd $P
    export LD_LIBRARY_PATH=$P
    export PYTHONHOME=$P/Resources/Python
    exec $P/Plex\ Media\ Scanner.bin $*
     

    After that, automated and GUI-triggered scans are working again.

    If I had to guess, I'd suspect we (FreeBSD) did something unusual with environment variable handling that is upsetting the job spawning.

    PMS: FreeBSD 10.3, 80TB of ZFS media storage.
    Desktop Clients: 1 x Windows 10, 1 x MBP,  1 x Hackintosh

    Media clients: 1 x Windows 10, Roku 3, Kindle Fire TV

    Mobile Clients: 2 x iPhone 5s

  • joedemo42joedemo42 Members Posts: 22 ✭✭
    peterwemm wrote on May 1 2013, 8:00 AM: »

    The built-in version works fine if $LD_LIBRARY_PATH is set correctly.

    Well, I've installed Plex in a new jail (from a fairly recent buildworld) with no other ports installed and got this: http://pastebin.ca/2370557

    After symlinking libpython2.7.so.1 to libpython2.7.so Plex quits complaining, but doesn't scan anything. Installing Python (and removing the symlink to libpython2.7.so) fixes that.

    But speaking of scanning media, this is also acting a little strange. Assume the following: I've added /tank/movies to a new movie-category (default settings, nothing fancy).

    /tank/movies contains /tank/movie/AwesomeMovie/AwesomeMovie.avi  and /tank/movies/AnotherMovie.avi

    For some reason, AwesomeMovie.avi gets scanned, but AnotherMovie.avi does not. AnotherMovie.avi gets scanned as soon as I move it into a subfolder. Why's that? (Didn't try the cheat of peterwemm yet)

    Cheers,

    -joe

  • guy2545guy2545 Members, Plex Pass Posts: 135 Plex Pass
    joedemo42 wrote on May 1 2013, 8:51 AM: »

    For some reason, AwesomeMovie.avi gets scanned, but AnotherMovie.avi does not. AnotherMovie.avi gets scanned as soon as I move it into a subfolder. Why's that? (Didn't try the cheat of peterwemm yet)

    Cheers,

    -joe

    That should be okay according to the naming convention wiki.  Maybe it does not like if you mix naming conventions? 

    Plex Media Clients:
    Logitech Revue
    Sony NSZ-GS7
    Samsung Tab2
    Nexus 7

    Nexus 5
    Plex Media Server:
    Toshiba i3 Windows 8.1 Laptop

    Windows Server 2012 R2 with 3TB

     

  • JaysonJayson Members, Plex Pass Posts: 12

    Oh man thank you. And just minutes after I posting how amazed I was by the fact that Plex just keeps getting more and more awesome.  One of the main reasons (other then because the dev's really deserve it) I got a Plexpass was to ask for BSD support.  Thank you for making my day now I beg of you keep at it. I got to warn you I may just have to buy another PlexPass if you keep doing such awesome work! :)

  • essayessay Members, Plex Pass Posts: 2 Plex Pass

    Thank you! I love Plex and running it on FreeBSD would make me able to run Plex on my primary server (and deleting the CentOS VM I currently use).  :)

    Installed the package earlier today. I had to add PYTHONHOME variable to get it to run. Added a movie section that contains the same directory as my current Plex server...and it has at least found the same amount of movies as the other installation (~1300). I'm able to play them from the Plex Home Theatre (running on OSX). I'm currently not able to play the movies from the Plex/Web, but have not gotten around to do any debugging on that yet.

    Anyhow just wanted to thank you for releasing it for FreeBSD! Keep up the good work! 

«134567
This discussion has been closed.