Recently, I have upgraded to Ubuntu 18.04 LTS and OpenPHT stopped working due to library incompatibilities. I did not have much time initially, so I used OpenPHT .AppImage from here:
However, the .AppImage version had issues with the hardware acceleration on my Intel NUC.
I was getting an error in the log: ERROR: VAAPI::CheckSuccess error: unknown libva error
Today, I had some time and was able to build OpenPHT 1.9 on Ubuntu 18.04 and it works fine.
Few years back when I first created the procedure to build OpenPHT on Ubuntu (Building OpenPHT from source on Ubuntu 14.04 Ā· RasPlex/OpenPHT Wiki Ā· GitHub), user blindy created a helpful openpht-install script using the steps to automate the process.
The instructions and script can be downloaded from here:
Ubuntu script to install OpenPHT
However blindy has not updated his script for Ubuntu Bionic yet. You can either use his script with the modifications below or use my original procedure from the wiki and add the following steps to fix the compilation errors:
I have added the following lines to the downloaded opehpht-install script right after cloning the OpenPHT repository āgit pullā line :
if (( $(echo ā$(lsb_release -r -s) 18.04ā | awk ā{print ($1 <= $2)}ā) )); then
wget https://github.com/RasPlex/Dockerfiles/raw/master/patches/plexht-0001-cec-update-to-libcec-4.patch
wget https://github.com/RasPlex/Dockerfiles/raw/master/patches/plexht-0002-websocketpp-openssl.patch
patch -p1 < plexht-0001-cec-update-to-libcec-4.patch # libcec>=4
patch -p1 < plexht-0002-websocketpp-openssl.patch # openssl>=1.1
fi
Also, I have updated the lines building the plexhometheater.sh executable file. Check /opt/openpht/bin/openpht to see the original executable. Some paths have changed.
In the openpht-install script after āmake cleanā line change the lines with:
sudo sh -c āecho #!/bin/sh > ${LOADERSCRIPTDIR}/plexhometheater.shā
sudo sh -c āecho #sleep 30 >> ${LOADERSCRIPTDIR}/plexhometheater.shā
sudo sh -c āecho export XBMC_HOME=${OPENPHTINSTALLDIR}/share/openpht >> ${LOADERSCRIPTDIR}/plexhometheater.shā
sudo sh -c āecho export LD_LIBRARY_PATH=${OPENPHTINSTALLDIR}/lib/openpht/system/players/dvdplayer >> ${LOADERSCRIPTDIR}/plexhometheater.shā
sudo sh -c āecho #pactl suspend-sink 1 1 >> ${LOADERSCRIPTDIR}/plexhometheater.shā
sudo sh -c āecho #export AE_SINK=ALSA >> ${LOADERSCRIPTDIR}/plexhometheater.shā
sudo sh -c āecho ${OPENPHTINSTALLDIR}/lib/openpht/plexhometheater >> ${LOADERSCRIPTDIR}/plexhometheater.shā
sudo sh -c āecho #pactl suspend-sink 1 0 >> ${LOADERSCRIPTDIR}/plexhometheater.shā
sudo chmod +x ${LOADERSCRIPTDIR}/plexhometheater.sh
sudo chown $USER:$USER ${LOADERSCRIPTDIR}/plexhometheater.shecho ${LOADERSCRIPTDIR}/plexhometheater.sh to run OpenPHT
I use the following lines to autostart openpht after reboot in ~/.config/autostart/plex.desktop
[Desktop Entry]
Encoding=UTF-8
Version=1.9.0
Type=Application
Name=Plex Home Theater
Comment=Starts Plex Home Theater automatically
Exec=sh -c āsleep 30; /usr/bin/pasuspender ā env AE_SINK=ALSA /home/plex/plexhometheater.shā
StartupNotify=false
Terminal=false
Hidden=false
If you donāt want to use ALSA, but Pulse Audio instead, modify the Exec line above just to start /home/plex/plexhometheater.sh.
I use ALSA for SPDIF pass-through via the external USB soundcard on my Intel NUC.
Letās hope that the developers will create official build for Ubuntu 18.04 soon, but you can use this build while you wait for the official. This build will not interfere with the official build, you can run both along side each other.


