Ubuntu script to install OpenPHT

EDIT: Official builds are now available, you can use this if you want to build it yourself for specific commits/bug fixes while you wait for official builds. This build will not interfere with the official builds, you can run both along side each other.

Had to update a few systems so decided to write a script, while i was at it, tried to make it future proof.
It will generate a loader script that you must use to run OpenPHT.

It should not conflict with existing ffmpeg installs or plex installs but see options.
Updated a few systems on 16.04 and 14.04 already.

Use at own risk, no support provided.

To use, in terminal:

wget https://anythingtech.com.au/public/openpht-install
chmod +x openpht-install
./openpht-install

Default options are:

WORKINGBASEDIR=~/Downloads/OpenPHT
FFMPEGCUSTINSTDIR=/opt/ffmpeg-openpht
OPENPHTINSTALLDIR=/opt/openpht
LOADERSCRIPTDIR=~

Based on vdimitrov’s guide https://forums.plex.tv/discussion/comment/1196558/#Comment_1196558

Any weird behaviour is probably caused by the old plex home theater for linux.

in terminal run

mv .plexht/ .plexht.bak/
mv .kodi/ .kodi.bak/

Reconfigure plex. Tearing is probably caused by the wrong Dirty region setting, try 3 (default 1). http://kodi.wiki/view/HOW-TO:Modify_dirty_regions

Tested on Ubuntu 14.04. Nicely done. Just two small issues:

  1. During sudo apt-get install
    Package libcurl-dev is a virtual package provided by:
    libcurl4-openssl-dev 7.35.0-1ubuntu2.6
    libcurl4-nss-dev 7.35.0-1ubuntu2.6
    libcurl4-gnutls-dev 7.35.0-1ubuntu2.6
    You should explicitly select one to install.
    E: Package ‘libcurl-dev’ has no installation candidate

  2. File /home/plex/plexhometheater.sh should not be owned by root:
    -rwxr-xr-x 1 root root 126 Jun 16 08:22 /home/plex/plexhometheater.sh

Also, I did add the following lines to the startup script to disable pulse audio:

pactl suspend-sink 1 1
export AE_SINK=ALSA
/opt/openpht/bin/plexhometheater
pactl suspend-sink 1 0

Thanks!

@vdimitrov said:
Tested on Ubuntu 14.04. Nicely done. Just two small issues:

  1. During sudo apt-get install
    Package libcurl-dev is a virtual package provided by:
    libcurl4-openssl-dev 7.35.0-1ubuntu2.6
    libcurl4-nss-dev 7.35.0-1ubuntu2.6
    libcurl4-gnutls-dev 7.35.0-1ubuntu2.6
    You should explicitly select one to install.
    E: Package ‘libcurl-dev’ has no installation candidate

  2. File /home/plex/plexhometheater.sh should not be owned by root:
    -rwxr-xr-x 1 root root 126 Jun 16 08:22 /home/plex/plexhometheater.sh

Also, I did add the following lines to the startup script to disable pulse audio:

pactl suspend-sink 1 1
export AE_SINK=ALSA
/opt/openpht/bin/plexhometheater
pactl suspend-sink 1 0

Thanks!

Thanks for the tips.

As for ALSA vs Pulse, users can see PulseAudio Sink and decide if the options are for them. I use pulse.

I see that you have updated the script to use the internal ffmpeg. Nice work!
I tried it and it worked fine on Ubuntu 14.04 LTS except one small issue.
It added the xbmc ppa even that it was already added to the sources.
I think that the double hyphens mess up with the grep command. See below:

plex@htpc:~$ grep “team-xbmc-ppa” /etc/apt/sources.list /etc/apt/sources.list.d/*
plex@htpc:~$ grep “team.xbmc.ppa” /etc/apt/sources.list /etc/apt/sources.list.d/*
/etc/apt/sources.list.d/team-xbmc-ppa-trusty.list:deb http://ppa.launchpad.net/team-xbmc/ppa/ubuntu trusty main
/etc/apt/sources.list.d/team-xbmc-ppa-trusty.list:deb-src http://ppa.launchpad.net/team-xbmc/ppa/ubuntu trusty main
/etc/apt/sources.list.d/team-xbmc-ppa-trusty.list.save:deb http://ppa.launchpad.net/team-xbmc/ppa/ubuntu trusty main
/etc/apt/sources.list.d/team-xbmc-ppa-trusty.list.save:deb-src http://ppa.launchpad.net/team-xbmc/ppa/ubuntu trusty main

@blindy

Good work, once you have a fully working script can I suggest that you add it to the Wiki https://github.com/RasPlex/OpenPHT/wiki as I am sure that others would find this extremely beneficial and easy to locate, eventually this topic will disappear from the first page of this section.

Regards

Deb packages now available for Ubuntu and Debian, see the 1.6.2 release notes (just released).

Regards.

@NedtheNerd said:
Deb packages now available for Ubuntu and Debian, see the 1.6.2 release notes (just released).

This is great, you guys are the best! May I suggest to edit the description of the “release” post adding Linux to the “Downloads” section where it says “For Windows, OS X and Embedded”?

Thanks, will update.

Regards

Updated original post now that official builds are available.