How To - Installing Plex on Ubuntu 12.10 64bit

pht-for-linux

#1

credit - Plex team and gewalker for the source code



dlasher for 99% of the prerequisites and fixes to git init



I take no credit for anything here other than making a small change to the prerequisite for 12.10 and this simplified writeup





prerequisites:





sudo apt-get install git build-essential autoconf autopoint libtool libboost1.49-all-dev libx11-dev libgl1-mesa-dev libxrender-dev portaudio19-dev libavcodec-dev libavformat-dev libswscale-dev libavdevice-dev libglew1.6-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 libvdpau-dev





clone plex repo:



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







initiate secondary repos:



cd plex-linux<br />
git submodule init







Now we need to fix a few things before we can move along:



gedit .git/config





if you don't have gedit use nano



nano .git/config





change



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







to



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







now:



git submodule update





Time to build: (each of these steps can take time some up to an hour or two depending on your CPU)



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









Okay still one more thing to do in order to get video playback working



sudo gedit /usr/local/bin/pmc







look for



export PLEX_HOME="/usr/local/share/xbmc"





and add this line directly underneath it



export LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libbz2.so:/usr/lib/x86_64-linux-gnu/libfaad.so"





save and close..



Congratulations if you made it! You should now have a fully functional Plex Media Client on Ubuntu :D





To run type:



/usr/local/lib/xbmc/xbmc.bin





or just reboot and you should have the menu/launcher icon


#2

sorry I noticed that while I may have stepped you though the install, I didn't help fix the video playback issue.. So I went ahead and added some additional steps, to help get around that as well.



I am hoping others can copy this thread and make how-to's for other distro's and architectures!! Honestly it took me quite a bit of digging and effort to pull all the needed info together to just install Plex Media Client myself... And I consider myself a very advanced Linux user.. Really with the previous documentation provided it would almost be impossible to get this up and running for the average user.. If there is any intrest I may try to put together instructions for 12.04 as well as its the LTS or maybe 12.10 32bit..


#3

Thank you kejar for all your work on this. I am an average linux user or less and agree with you 100%. Any attempt to get Plex running previously for me has met with failure. I feel like it's been going on years that there have been requests / complaints about the desire to have plex available for linux. I think because it is free / open source - there is less drive to get that done. That said, I did pay cash money for the plex app for android. I would gladly pay a small fee for a working plex media client. Ironically this has kept me from using linux as my daily driver on my laptop. Anyway, thanks again.


#4

Hi there, im intrigued as to what limitations are on this version..



does plugins still work on this like sky and iplayer? also does it still run audio via airplay



Thanks soo much for sharing, may have a go at this tonight.



Jonathan


#5

On Debian Wheezy here. Everything works upon restart :D

Playback does have these random green pixels all over the place, although it's not unwatchable.



Very good! Thanks so much! I look forward to future releases.


#6

[quote name='mautobu' timestamp='1352102199' post='308209']


On Debian Wheezy here. Everything works upon restart :D

Playback does have these random green pixels all over the place, although it's not unwatchable.



Very good! Thanks so much! I look forward to future releases.

[/quote]






humm not seeing that issue... Sounds like a video card driver issue to me... What video card do you have on that system?? If don't you should install the propitiatory drivers for ATI or Nvidia.


#7

I'm having an issue playing video content. I get the following errors in the Plex log once demuxing starts.



01:52:08 T:140322722002688 M: 0%  NOTICE: Creating Demuxer<br />
01:52:08 T:140322722002688 M: 0%   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/players/dvdplayer/avcodec-52-x86_64-linux.so)<br />
01:52:08 T:140322722002688 M: 0%   DEBUG: Loading: /usr/local/lib/xbmc/system/players/dvdplayer/avcodec-52-x86_64-linux.so<br />
01:52:09 T:140322722002688 M: 0%   ERROR: Unable to load /usr/local/lib/xbmc/system/players/dvdplayer/avcodec-52-x86_64-linux.so, reason: /usr/local/lib/xbmc/system/players/dvdplayer/avcodec-52-x86_64-linux.so: undefined symbol: NeAACDecClose<br />
01:52:09 T:140322722002688 M: 0%   ERROR: CDVDDemuxFFmpeg::Open - failed to load ffmpeg libraries<br />
01:52:09 T:140322722002688 M: 0%   ERROR: OpenDemuxStream - Error creating demuxer<br />
01:52:09 T:140322722002688 M: 0%  NOTICE: CDVDPlayer::OnExit()





I've double checked that I had the correct line in pmc saved



export LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libbz2.so:/usr/lib/x86_64-linux-gnu/libfaad.so"





Is there anything else I can check? I'm testing this on an ASRock 330


#8

Figured it out. I needed to launch Plex via:



/usr/local/bin/pmc





not



/usr/local/lib/xbmc/xbmc.bin


#9

[quote name='Eric Leese' timestamp='1352189253' post='308442']


Figured it out. I needed to launch Plex via:



/usr/local/bin/pmc





not



/usr/local/lib/xbmc/xbmc.bin


[/quote]




a restart should have given you the icon.. either-way glad to see you got it working :)


#10

I notice LIRC isn't working with Plex on my install. It does work with XBMC on the same box. Any ideas getting that to work?


#11

Resolved. I found Lircmap.xml was missing from /home//.plex/userdata


#12

I thought of one other question. When Plex Media Center updates come out, is there a procedure to update an existing install?


#13

I just got it working on Ubuntu 12.04 with this same procedure. The only difference was changing the export LD_PRELOAD line to point to my own libraries:



export LD_PRELOAD="/lib/i386-linux-gnu/libbz2.so.1:/usr/lib/libfaad.so"


#14

[quote name='Steviebe' timestamp='1352502775' post='309328']


I just got it working on Ubuntu 12.04 with this same procedure. The only difference was changing the export LD_PRELOAD line to point to my own libraries:



export LD_PRELOAD="/lib/i386-linux-gnu/libbz2.so.1:/usr/lib/libfaad.so"


[/quote]






Nice!!! was this 12.04 32bit???


#15

PMC running on U-Server 12.10 64bit.



Just installed xinit after I build PMC and it's good to go.

Only one problem: it's displaying in 800x600.

I haven't used Ubuntu since Jaunty (9.04) and apparently they dropped xorg.conf since then, so I'm lost in the sauce on how to add resolutions now.

I've been searching for hours on this and no dice.



I'm building this on a server distro because, in the end, I want to be able to build a liveCD from this and run it like XBMC's standalone, which I've run for the past 2 years.

Any help would be fantastic! :)



EDIT:

Alright, it's pretty clunky, but I've got it working for 1920x1080 at least, but there's still no other resolution options.

To get this working, I copied /etc/X11/xinit/xinitrc to ~/.xinitrc, then edited it to show this:



<br />
#!/bin/sh<br />
<br />
# /etc/X11/xinit/xinitrc<br />
#<br />
# global xinitrc file, used by all X sessions started by xinit (startx)<br />
<br />
xrandr -s 1920x1080 &<br />
<br />
#invoke global X session script<br />
. /etc/X11/Xsession &<br />
exec pmc<br />






So, because this is a dedicated HTPC running Plex, when I run "startx", it loads Plex in the correct resolution for my screen.

Now, all that's left is to run a script that does auto-login and runs "startx" on boot. Cake.



If I can get everything working like it should, I might try the U-Mini + Fluxbox route (same as XBMCLive).


#16

Awesome got everything working in Server, so I built it again in the Mini distro. All golden. The whole install is ~500MB.

I went a whole 'nother route with the video implementation and got it to work natively.

Now, I'm working on skinning Plymouth to make a custom boot splash screen. Going to attempt to build a Live install disk after this.



Anyone interested in this?

And as far as distribution goes, what parts cannot be included in a Live disk? I would figure things like nvidia drivers and libmad, etc. couldn't be included.

How would I go about making sure these things are installed unattended?


#17

[quote name='Roark' timestamp='1352671505' post='309771']


Awesome got everything working in Server, so I built it again in the Mini distro. All golden. The whole install is ~500MB.

I went a whole 'nother route with the video implementation and got it to work natively.

Now, I'm working on skinning Plymouth to make a custom boot splash screen. Going to attempt to build a Live install disk after this.



Anyone interested in this?

And as far as distribution goes, what parts cannot be included in a Live disk? I would figure things like nvidia drivers and libmad, etc. couldn't be included.

How would I go about making sure these things are installed unattended?

[/quote]




I would really like a minimal Live ISO of Plex Center! I would like to use it on a old Zotac ION that I have with XBMC.



Maybe you can inspire yourself with this latest script that this guy did: http://forum.xbmc.org/showthread.php?tid=141369



Thank you in advance!


#18

Hi and thanks for this tutorial, everything seems to work as it should in the plex client but i'm having problem playing any kind of video. i have a fresh install of ubuntu 12.10 64bit and have not configured or addded anything. Is it the drivers maybe?


#19

[quote name='dajjen' timestamp='1352840924' post='310224']


Hi and thanks for this tutorial, everything seems to work as it should in the plex client but i'm having problem playing any kind of video. i have a fresh install of ubuntu 12.10 64bit and have not configured or addded anything. Is it the drivers maybe?

[/quote]




playing videos within the client??? Was this with a 64bit 12.10 build? If so you most likely didn't follow the last step



Okay still one more thing to do in order to get video playback working



sudo gedit /usr/local/bin/pmc







look for



export PLEX_HOME="/usr/local/share/xbmc"





and add this line directly underneath it



export LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libbz2.so:/usr/lib/x86_64-linux-gnu/libfaad.so"





save and close..



It might be best to go ahead and reboot after that as well


#20

kejar31, is it possible for you to add some instructions for a Ubuntu Minimal 64bit 12.10 version?



I did everything you wrote but cannot find a way to start the application, the last command line gives me a black screen then goes back to terminal. And a way to autostart it if possible.



Thank you