Kodi in the distribution is usually outdated, it's better to compile and install fresh version from sources. The compilation with all binary addons takes ~ 4 hours.
This setup supports hardware acceleration for H.264 and H.265/HEVC (8bit/10bit).
References: https://github.com/xbmc/xbmc/blob/master/docs/README.Linux.md
Install build dependencies:
apt-get build-dep kodi
Get the source code:
git clone --depth 1 --branch Nexus https://github.com/xbmc/xbmc kodi
Create build directory:
mkdir kodi-build; cd kodi-build
Configure build:
cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local/kodi \
-DCORE_PLATFORM_NAME=gbm \
-DAPP_RENDER_SYSTEM=gles \
-DENABLE_VAAPI=OFF \
-DENABLE_VDPAU=OFF \
-DENABLE_OPENGL=OFF \
-DENABLE_PULSEAUDIO=OFF \
-DENABLE_INTERNAL_FMT=ON \
-DENABLE_INTERNAL_SPDLOG=ON \
-DCMAKE_CXX_STANDARD_LIBRARIES="-latomic"
Build:
cmake --build . -- VERBOSE=1 -j$(getconf _NPROCESSORS_ONLN)
Install:
sudo make install
Build binary extensions:
cd kodi
Clean extensions:
sudo make -j$(getconf _NPROCESSORS_ONLN) \
-C tools/depends/target/binary-addons PREFIX=/usr/local/kodi distclean
Build and install all extensions:
sudo make -j$(getconf _NPROCESSORS_ONLN) \
-C tools/depends/target/binary-addons PREFIX=/usr/local/kodi \
ADDONS="inputstream.adaptive pvr.iptvsimple"
Build and install specified extensions:
sudo make -j$(getconf _NPROCESSORS_ONLN) \
-C tools/depends/target/binary-addons PREFIX=/usr/local/kodi \
ADDONS="inputstream.adaptive pvr.iptvsimple"