Moderator Control Panel ]

Plex on MatrixTV

Re: Plex on MatrixTV

Postby vpeter » Tue Oct 21, 2014 2:10 am

I think this is not compatible for openelec. Not sure how about matrixtv.
Openelec is armhf but this plex Media Server is not.
You can help me buy new work notebook with paypal donation, after 8 years it's time to upgrade.
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FLVT7ACMYAPS6
vpeter
 
Posts: 427
Joined: Sun Jul 27, 2014 2:12 am
Location: Slovenia

Re: Plex on MatrixTV

Postby franky384 » Tue Oct 21, 2014 6:08 am

We have to run it in a chroot environment, but in openelec it's not possible to chroot, i think. I don't know if it can be done in matrixtv.
Thats the reason i try to boot a debian system, in debian it will work for sure.
franky384
 
Posts: 59
Joined: Sat Aug 30, 2014 3:40 am

Re: Plex on MatrixTV

Postby vpeter » Tue Oct 21, 2014 2:33 pm

franky384 Wrote:We have to run it in a chroot environment, but in openelec it's not possible to chroot, i think.
Sure it is possible. At least on x86_64 build but arm should be the same.
You can help me buy new work notebook with paypal donation, after 8 years it's time to upgrade.
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FLVT7ACMYAPS6
vpeter
 
Posts: 427
Joined: Sun Jul 27, 2014 2:12 am
Location: Slovenia

Re: Plex on MatrixTV

Postby franky384 » Wed Oct 22, 2014 2:06 pm

Sorry for the late reply, i will try it imediately and report my results.
franky384
 
Posts: 59
Joined: Sat Aug 30, 2014 3:40 am

Re: Plex on MatrixTV

Postby Kohai » Thu Oct 23, 2014 1:46 am

if you guys have any suggestions let me know :)
Kohai
 
Posts: 14
Joined: Sat Oct 04, 2014 5:35 am

Re: Plex on MatrixTV

Postby franky384 » Thu Oct 23, 2014 2:31 pm

Kohai Wrote:if you guys have any suggestions let me know :)


OK, here is the way i installed the Plex Media Server , puuh this has stolen 8 hours of my live to make it work !
Not much testing so far, but it works.

First i had to create a debian armel chroot filesystem on my debian-laptop because there is no debootstrap prog in matrixtv or openelec.
I used the instructions from here:http://olimex.wordpress.com/2014/07/21/how-to-create-bare-minimum-debian-wheezy-rootfs-from-scratch/
and installed the plexmediaserver in it using the instructions from here:https://bitbucket.org/inkubux/cubox-i/wiki/Plex%20Wheezy
I had to alter the instructions a bit to make it work.
i also installed mc (MidnightCommander) and htop -an interactive process viewer for Linux in the chroot.

Here's how to install it in Matrixtv v1.0.1.0:

# download the wheezy-armel filesystem i made

https://www.dropbox.com/s/i720kpzg2rgoiuq/wheezy-armel.tar.gz?dl=0

and copy it to your matrix /root directory via samba or usbstick or...

# login via ssh from your computer

ssh root@192.168.your matrixtv IP here
password: root

mkdir /chroots
tar xvzf wheezy-armel.tar.gz -C /chroots

# edit fstab

nano /etc/fstab

# copy and paste the following:

# Chroot bind mounts
/tmp /chroots/wheezy-armel/tmp none bind 0 0
/proc /chroots/wheezy-armel/proc proc defaults 0 0
/dev /chroots/wheezy-armel/dev none bind 0 0

# press strg-x , y , enter to save your new fstab.

mount -a

# here i got an error: mount: mounting /home on /chroots/wheezy-armel/home failed: No such file or directory
# but you can ignore it

# enter your chroot

chroot /chroots/wheezy-armel/ /bin/bash

# setup your locales

dpkg-reconfigure locales

# set your hostname

echo (your hostname here) > /etc/hostname

# and your password

passwd

# to start the Plexmediaserver manually type:
# please read this instruction to the end !!

plexmediaserver &

# you can type htop to see if it works
# now you can access the server from your browser http://your matrixtv ip:32400/web/index.html

# to leave the chroot-environment simply type

exit

# and you're back on the matrixtv prompt.

# But if you leave the matrixtv console Plexmediaserver stops working, so we must find a way to start the Plexmediaserver directly in matrixtv.
# I tried to start it with systemd but i failed so

# I installed the Advanced Launcher plugin in XBMC. You find it here:

http://www.gwenael.org/Repository/repository.angelscry.xbmc-plugins/repository.angelscry.xbmc-plugins-1.2.2.zip

# install it via addons, install from zip
# under Programs now select Advanced Launcher,
Select the "Standalone (normal PC executable)" option
Browse to /usr/sbin/chroot Ok
In the next window you can pass command-line arguments. Enter /chroots/wheezy-armel/ /usr/bin/plexmediaserver &
next you can give a name to your launcher, i used Plex
after that i choosed linux as platform and canceled the picture and fanart questions.
If all went right you now can start the PlexMediaServer from the newly created launcher in XBMC.

If you like you can install the PleXBMC plugin from

Repository (recommended)

Download the PlexBMC add-on repository from here:
http://hippojay.github.io/repository.plexbmc.addons/download/repository.plexbmc.addons/repository.plexbmc.addons-3.0.0.zip
Install this into XBMC (System > Add-ons > Install from zip file).
Go to Add-ons > Get Add-ons > PlexBMC Add-ons for XBMC
PlexBMC is a set of two add-ons.
PlexBMC provides the main access to content. Enable it in Video, Music, or Picture (you only need to enable in one location). (This is required.)
PlexBMC Helper allows you to control XBMC from a Plex remote (such as on mobile device or the web). Essentially it causes PlexBMC to appear just like
a PlexHome Theater instance. (This is optional, but highly recommended.)
Once the add-ons are enabled, you can update to new releases simply by updating your add-ons within XBMC.

This should also work in OpenELEC, but you have to use a Directory under /storage to install it and
can use the autostart.sh feature of openELEC to start it at bootup.
I will try this later. But first i will test it under matrixtv.
franky384
 
Posts: 59
Joined: Sat Aug 30, 2014 3:40 am

Re: Plex on MatrixTV

Postby Kohai » Fri Oct 24, 2014 8:46 pm

Hi franky

First off all, thank you very much! (ist wirklich der Hammer) This is geniuss!!!

Now, as you can imagine, I do have some questions. Installation and all the things went very smooth! So far, it's working! Now, I want to add my folders for the plex server (Movies, Music and so on). Where do I have exactly to do that? If I am on the Web-Interface for the Plex Server http://your matrixtv ip:32400/web/index.html I can create a new chanell but cannot choos any folder... Do I have that to choose in the XBMC Plug-in?

I set the location in the PleXBMC plug-in and there, I have the option:

Server Discovery --> Auto (GDM) or Manual

If I choose Auto there is the "master server" to selct but this is empty as the "current master server"


With Manual I can edit the Primary server Adress, now, what do I need to type there? My http://your matrixtv ip and port 32400

I did that but however, there are still no files on the web interface...

Thank you very much for helping and thanks a lot for you great work!!!!

Cheers
Kohai
 
Posts: 14
Joined: Sat Oct 04, 2014 5:35 am

Re: Plex on MatrixTV

Postby franky384 » Fri Oct 24, 2014 8:50 pm

Hello, it's me again,
now i'm back to Openelec because in Matrixtv v.1.0.1.0 i have problems with Videos stuttering and no drivers for my dvb-tuner.
I use the openelec build from 14.9., all the newer builds don't work with my DvbSky S960 Usb Tuner.
I installed the plexmediaserver on it and i'm really impressed how good it works. It streams to my pc, android phone and tablet without problems.
The first scan of my movie library on my NAS took several hours, it's best to leave plex alone scanning over night.

Here's how to install plexmediaserver in openelec

# download the wheezy-armel filesystem i made

https://www.dropbox.com/s/i720kpzg2rgoiuq/wheezy-armel.tar.gz?dl=0

and copy it to your /downloads directory via samba

# download this chroot program and copy it to /storage

https://www.dropbox.com/s/i5b3nnvbay3z9t8/chroot?dl=0

# we need this chroot because OpenELEC lacks support for chroot. I got this one from an Ubuntu-trusty armhf filesystem and it works for us.

# login via ssh from your computer

ssh root@192.168.your matrixtv IP here
password: root

#make chroot executable

chmod +x /storage/chroot
cd downloads
tar xvzf wheezy-armel.tar.gz -C /storage

# we need an autostart file to mount needed partitions
# create the autostart file and make it executable

echo "#!/bin/sh" > /storage/.config/autostart.sh && chmod +x /storage/.config/autostart.sh

# to mount necessary partitions edit autostart

nano /storage/.config/autostart.sh

# and paste this inside

mount -o bind /dev /storage/wheezy-armel/dev
mount -o bind /sys /storage/wheezy-armel/sys
mount -t proc proc-chroot /storage/wheezy-armel/proc/
mount -t devpts devpts-chroot /storage/wheezy-armel/dev/pts

# press strg-x , y , enter to save the autostart file

# if you want to mount your NAS add your mountcommands inside autostart.sh
# a good howto to mount nfs or samba shares you find here: http://wiki.openelec.tv/index.php/Mounting_network_shares
# as an example here is my autostart.sh:

#!/bin/sh

mount -o bind /dev /storage/wheezy-armel/dev
mount -o bind /sys /storage/wheezy-armel/sys
mount -t proc proc-chroot /storage/wheezy-armel/proc/
mount -t devpts devpts-chroot /storage/wheezy-armel/dev/pts

(sleep 15; \
mount -t nfs 192.168.1.62:/i-data/yyyyyy /storage/media/NAS1 -o nolock; \
mount -t cifs -o username=xxx,password=xxx,rw //192.168.1.62/yyyyy /storage/media/NAS2 \
)&

mount -o bind /storage/media/NAS1 /storage/wheezy-armel/media/NAS1
mount -o bind /storage/media/NAS2 /storage/wheezy-armel/media/NAS2

/storage/chroot /storage/wheezy-armel/ /usr/bin/plexmediaserver &

# edit it for your setup, you see that you must bind-mount the nas from openelec to the wheezy chroot. You have to create the /media/your Share directories
# inside the wheezy-chroot first, else it won't work.
# now let's go on

cp /etc/resolv.conf /storage/wheezy-armel/etc/resolv.conf

# enter your chroot

/storage/chroot /storage/wheezy-armel/ /bin/bash

# setup your locales

dpkg-reconfigure locales

# set your hostname

echo OpenELEC > /etc/hostname

# and your password

passwd

# to start the Plexmediaserver manually type:
# please read this instruction to the end !!

plexmediaserver &

# you can type htop to see if it works
# now you can access the server from your browser http://your openelec ip :32400/web/index.html

# to leave the chroot-environment simply type

exit

# and you're back on the OpenELEC prompt.

# But if you leave the Openelec console Plexmediaserver stops working, so we use the Advanced Launcher plugin in XBMC. You find it here:

http://www.gwenael.org/Repository/repository.angelscry.xbmc-plugins/repository.angelscry.xbmc-plugins-1.2.2.zip

# install it via addons, install from zip.
# then in XBMC go to System, filemanager and add storage as new source
# under Programs now select Advanced Launcher,
Select the "Standalone (normal PC executable)" option
Browse to /storage/chroot Ok
In the next window you can pass command-line arguments. Enter /storage/wheezy-armel/ /usr/bin/plexmediaserver &
next you can give a name to your launcher, i used Plex
after that i choosed linux as platform and canceled the picture and fanart questions.
If all went right you now can start the PlexMediaServer from the newly created launcher in XBMC.

# in OpenELEC you can autostart the PlexMediaServer at boottime, if you like do this:
# open autostart.sh

nano /storage/.config/autostart.sh

# and add this at the end of the scipt

/storage/chroot /storage/wheezy-armel/ /usr/bin/plexmediaserver &

# save the file and reboot, plexmediaserver now starts at boot and mounts your shares automatically.

# If you like you can install the PleXBMC plugin from

#Repository (recommended)

Download the PlexBMC add-on repository from here:
http://hippojay.github.io/repository.plexbmc.addons/download/repository.plexbmc.addons/repository.plexbmc.addons-3.0.0.zip
Install this into XBMC (System > Add-ons > Install from zip file).
Go to Add-ons > Get Add-ons > PlexBMC Add-ons for XBMC
PlexBMC is a set of two add-ons.
PlexBMC provides the main access to content. Enable it in Video, Music, or Picture (you only need to enable in one location). (This is required.)
PlexBMC Helper allows you to control XBMC from a Plex remote (such as on mobile device or the web). Essentially it causes PlexBMC to appear just like
a PlexHome Theater instance. (This is optional, but highly recommended.)
Once the add-ons are enabled, you can update to new releases simply by updating your add-ons within XBMC.
franky384
 
Posts: 59
Joined: Sat Aug 30, 2014 3:40 am

Previous

Return to Development

Who is online

Users browsing this forum: No registered users and 4 guests