Skip to content

Instantly share code, notes, and snippets.

@AGresvig
Created June 23, 2017 15:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AGresvig/aca3cad587a85306f270f9aca1268a88 to your computer and use it in GitHub Desktop.
Save AGresvig/aca3cad587a85306f270f9aca1268a88 to your computer and use it in GitHub Desktop.
Installing bleeding edge Kodi with latest Mesa on Ubuntu
#!/bin/bash
# Script to set up bleeding edge Kodi with bleeding edge VAAPI/Mesa drivers on Ubuntu. Tested on 16.10 with Kodi
# First complete step 0 of Fritsch's guide here: http://forum.kodi.tv/showthread.php?tid=231955
# This guide takes over on step 1
# based on https://forum.kodi.tv/showthread.php?tid=231955&pid=2543877#pid2543877
# Make sure only root can run our script
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
# Time this script
T="$(date +%s)"
echo
echo "*** Updating and installing latest Mesa, and adding Kodi build deps "
echo
echo
apt-get install software-properties-common
add-apt-repository ppa:paulo-miguel-dias/mesa
add-apt-repository -s ppa:team-xbmc/xbmc-nightly
add-apt-repository ppa:team-xbmc/xbmc-ppa-build-depends
apt-get update
apt-get build-dep kodi
echo "**** Deps installed"
echo "Time spent: $T"%
echo
echo "*** Building and installing latest Kodi "
echo
echo
cd ~/
git clone git://github.com/xbmc/xbmc.git kodi
mkdir -p kodi/build && cd kodi/build
cmake .. -DENABLE_VAAPI=1 -DENABLE_CEC=0 -DCMAKE_BUILD_TYPE=Release
# Use `j2` if you're on a dualcore system, like the Celeron or i3.
cmake --build . -- VERBOSE=1 -j4
make install -j4
echo "Time spent: $T"%
@AGresvig
Copy link
Author

This will allow for true hardware encoding of both h264 and HEVC 2160p content on Linux-based HTPCs, if you have a later generation Intel CPU (Skylake, Apollo Lake or Kaby Lake). With DTS-HD passthrough support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment