OpenPHT 1.9

## Repo For Ubuntu 18.04

There are no OpenPHT builds for newer versions of linux. Nothing is available past Ubuntu 16.04. Or at least there weren't. There's now a [public repo] you can install the binary from thanks to [StefanoBalocca].

sudo add-apt-repository ppa:stefanobalocco/multimedia sudo apt update
sudo apt install openpht

## Building it Yourself

Some [have reported] success building it and that work forms the basis for the repo. I personally have tried and while successful in the past am failing currently. There is a compile issues around openpht's use of glew and potential bugs in it at this moment. They may be patched in a more recent version of glew.

The libraries libglew2.0 libmicrohttpd12 libsdl1.2debian are used so it might have something to do with them

The former way to most easily build it was created by user [blindy] and he's updated that recently (April 2019)  to include patches developed by vdimitrov above.

wget chmod +x openpht-install ./openpht-install

[public repo]:
[have reported]:

### Build Notes

The major process is building an old version of ffmpeg and then applying patches to the OpenPHT code so you can avoid installing old packages.

#### Process

##### Install some build dependencies and build ffmpeg.

You can't just install the current version of ffmpeg because the build will fail. The OpenPHT github page says "Bump ffmpeg to 2.8.14" so we'll use that.

Adapted from NedtheNerd[^1][^2]

Install Build Deps

sudo apt-get install build-essential git-core libsdl-image1.2-dev libflac++-dev libshairport-dev
sudo apt-add-repository -s ppa:team-xbmc/ppa sudo apt-get build-dep kodi

Download and Patch OpenPHT
cd ~
git clone openpht-source
cd openpht-source


patch -p1 < plexht-0001-cec-update-to-libcec-4.patch # libcec>=4
patch -p1 < plexht-0002-websocketpp-openssl.patch # openssl>=1.1

Download, Patch and Build ffmpeg
(You have to build this first as a dependency for OpenPHT as the binrary packages are trickey
to find forward-ports for)
cd ~
mkdir ~/ffmpeg-sources
cd ~/ffmpeg-sources
tar -xzf ffmpeg-2.8.14.tar.gz
cd ffmpeg-2.8.14
cp -r ~/openpht-source/lib/ffmpeg/patches patches

# You may want to enable 3DNow
./configure --prefix="/usr/local" --disable-altivec --disable-amd3dnow --disable-avisynth --disable-crystalhd --disable-debug --disable-decoder=mpeg_xvmc --disable-devices --disable-doc --disable-dxva2 --disable-encoders --disable-extra-warnings --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-frei0r --disable-gray --disable-hardcoded-tables --disable-indevs --disable-libdc1394 --disable-libfaac --disable-libfreetype --disable-libgsm --disable-libmp3lame --disable-libnut --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libopencv --disable-libopenjpeg --disable-librtmp --disable-libschroedinger --disable-libspeex --disable-libtheora --disable-libvo-aacenc --disable-libvo-amrwbenc --disable-libvorbis --disable-libvpx --disable-libx264 --disable-libxavs --disable-libxvid --disable-memalign-hack --disable-mmi --disable-muxers --disable-nonfree --disable-outdevs --disable-small --disable-static --disable-symver --disable-vda --disable-version3 --disable-w32threads --disable-x11grab --enable-asm --enable-avcodec --enable-avdevice --enable-avfilter --enable-avformat --enable-bsfs --enable-bzlib --enable-dct --enable-demuxers --enable-fft --enable-filters --enable-gpl --enable-hwaccels --enable-libvorbis --enable-logging --enable-mdct --enable-muxer=adts --enable-muxer=ogg --enable-muxer=spdif --enable-network --enable-optimizations --enable-parsers --enable-pic --enable-postproc --enable-protocol=http --enable-pthreads --enable-rdft --enable-runtime-cpudetect --enable-shared --enable-stripping --enable-swscale --enable-swscale-alpha --enable-vaapi --enable-vdpau --enable-yasm --enable-zlib --host-libs=-lm
make -j 4
make check sudo make install make clean

cat /etc/
    (verify it has these two lines ...maybe)

    include /etc/*.conf     /usr/local/lib

sudo ldconfig

cd ~ mkdir ~/openpht-build cd ~/openpht-build


wget': wget

mkdir openpht-build
cd openpht-build


$ sudo apt-get build-dep
E: Must specify at least one package to check builddeps for

    sudo nano /etc/apt/sources.list
    # Uncomment all the sourced lines, e.g.


Could NOT find libcrypto

    sudo apt-get install libssl-dev

Could NOT find GLEW

    sudo apt-get install libglew-dev

Could NOT find VORBIS

    sudo apt-get install libvorbis-dev

Could NOT find MPEG2


Could NOT find RTMP




Could NOT find YAJL


Could not find FFMPEG

    ffmpeg libavformat-dev libavdevice-dev libavcodec-dev libavfilter-dev libpostproc-dev libswscale-dev

something something boost - this sucks as it's a huge package


 Could NOT find LIBUSB

    apt install libusb-dev

Errors during Make

‘CEC::libcec_configuration {aka struct CEC::libcec_configuration}’ has no member named ‘bPowerOnScreensaver’

    Add the option to disable CEC
    #make clean and make again


Add the old sources from xenial


    sudo dpkg --force-all -i libcec3_3.0.1+dfsg2-9build1_amd64.deb
    sudo dpkg --force-all -i libcec-dev_3.0.1+dfsg2-9build1_amd64.deb

 error: ‘SSL_R_SHORT_READ’ was not declared in this scope


    sudo dpkg --force-all -i libssl-dev_1.0.2g-1ubuntu4.14_amd64.deb