Difference between revisions of "Jetson/Kodi (XBMC)"

From eLinux.org
Jump to: navigation, search
(Added building pvr from source)
(added testing PPA link)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Kodi (XBMC) for Jetson TK1 ==
 
== Kodi (XBMC) for Jetson TK1 ==
  
Current status: Full acceleration with GLES/EGL and OMX on X.Org.
+
Current status: Full hardware-accelerated video decoding & rendering, with GLES/EGL and OMX on X.Org.
 
 
== Performance Tips ==
 
 
 
It seems Kodi uses all cores that are online when Kodi starts so I recommend
 
maximizing CPU performance before starting XBMC:
 
http://elinux.org/Jetson/Performance#Maximizing_CPU_performance
 
 
 
With 4k/UltraHD/2160p TV you need to set the maximum GPU frequency as well.
 
 
 
Add those commands to a script and run the script from /etc/rc.local if you
 
want them to be run automatically on every boot. It seems that something may
 
change the governor later, so you may run the script with sudo again just
 
before starting the XBMC.
 
 
 
== Playback Quality Tips ==
 
 
 
Use Kodi Audio configuration under system settings to enable HDMI audio.
 
 
 
For jitter free video playback I recommend allowing Kodi to to adjust TV
 
refresh rate always. For that you need to enable the Expert Settings and enable
 
"Adjust display refresh rate to match video". For instructions, see:
 
http://wiki.xbmc.org/index.php?title=Settings/Videos
 
 
 
With limited testing I suggest selecting Audio Clock as the A/V sync method.
 
  
 
== Installation ==
 
== Installation ==
Line 56: Line 32:
  
 
If you dont have git, install it (you also wont have other stuff):
 
If you dont have git, install it (you also wont have other stuff):
  sudo apt-get install git autoconf libtool build-essentials
+
  sudo apt-get install git autoconf libtool build-essential
  
 
Now clone the pvr add-on's:
 
Now clone the pvr add-on's:
Line 70: Line 46:
  
 
The easiest way is to create a zip and install from zip:
 
The easiest way is to create a zip and install from zip:
 +
./bootstrap
 
  ./configure
 
  ./configure
 
  make zip
 
  make zip
 +
 +
== Performance Tips ==
 +
 +
It seems Kodi only uses the CPU cores that are online when Kodi starts, so I recommend
 +
maximizing CPU performance before starting Kodi / XBMC.
 +
 +
For 4k/UltraHD/2160p TV you need to set the maximum GPU frequency as well.
 +
 +
Commands to adjust performance only last until a reboot (or until something else changes them), so you can add commands to your "/etc/rc.local" bootup script if you want them to be run automatically on every boot. It's possible that something may change them later if you don't use Kodi soon after bootup, so you might want to also run "sudo /etc/rc.local" again just before starting Kodi / XBMC.
 +
 +
Full details about adjust these are on the [[Jetson/Performance|Jetson Performance]] page, but for Kodi / XBMC with hardware decoding, it is usually good enough to just force all CPU cores of [[Jetson TK1]] online on every bootup, without forcing the CPU to run at max clock speeds.
 +
 +
So open the bootup file on Jetson:
 +
sudo nano /etc/rc.local
 +
 +
And enter these contents:
 +
# Turn on all 4 CPU cores, so that Kodi / XBMC sees them when it starts.
 +
echo 0 > /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable
 +
echo 1 > /sys/devices/system/cpu/cpu0/online
 +
echo 1 > /sys/devices/system/cpu/cpu1/online
 +
echo 1 > /sys/devices/system/cpu/cpu2/online
 +
echo 1 > /sys/devices/system/cpu/cpu3/online
 +
 +
exit 0
 +
 +
And if you want max performance such as for 4K / Ultra HD / 2160p video, also add these extra commands to the file above, just above the "exit 0" line:
 +
# Use max CPU performance.
 +
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
 +
 +
# Use max GPU performance.
 +
echo 852000000 > /sys/kernel/debug/clock/override.gbus/rate
 +
echo 1 > /sys/kernel/debug/clock/override.gbus/state
 +
 +
(For more details about how to adjust the CPU and GPU performance, go to the [[Jetson/Performance|Performance]] page).
 +
 +
== Playback Quality Tips ==
 +
 +
Use Kodi Audio configuration under system settings to enable HDMI audio.
 +
 +
For jitter free video playback I recommend allowing Kodi to to adjust TV
 +
refresh rate always. For that you need to enable the Expert Settings and enable
 +
"Adjust display refresh rate to match video". For instructions, see:
 +
http://wiki.xbmc.org/index.php?title=Settings/Videos
 +
 +
With limited testing I suggest selecting Audio Clock as the A/V sync method.
 +
 +
== Testing Betas ==
 +
To test the latest version (currently 15.1rc1), simply add the testing PPA, update, and install.
 +
sudo add-apt-repository ppa:kulve/kodi-testing-jetson-tk1
 +
sudo apt-get update
 +
sudo apt-get install kodi

Latest revision as of 08:12, 11 August 2015

Kodi (XBMC) for Jetson TK1

Current status: Full hardware-accelerated video decoding & rendering, with GLES/EGL and OMX on X.Org.

Installation

If you have old non-PPA version installed, remove it first and delete all old Kodi settings (be sure to take a backup, if you have made any special settings):

sudo apt-get remove xbmc xbmc-bin
rm -rf $HOME/.xbmc

If you have not yet enabled universe, enable it now:

sudo apt-add-repository universe

Add PPA for the Kodi, update and install Kodi:

sudo add-apt-repository ppa:kulve/xbmc-jetson-tk1
sudo apt-get update
sudo apt-get install kodi

If you want to include PVR support then you will need to install the correct PVR add-on. Run the following to find which add-on's are available:

(sudo) apt-cache search xbmc-pvr

Then install the one relevant using:

sudo apt-get install <package>

PVR Clients

If the above easy steps don't work or you just want the latest then you can get them here.

If you dont have git, install it (you also wont have other stuff):

sudo apt-get install git autoconf libtool build-essential

Now clone the pvr add-on's:

git clone https://github.com/opdenkamp/xbmc-pvr-addons.git

Jump to the newly created dir:

cd  xbmc-pvr-addons/

Now following the instructions on the wiki:

./bootstrap
./configure --prefix=/usr/share/kodi/
make install

The easiest way is to create a zip and install from zip:

./bootstrap
./configure
make zip

Performance Tips

It seems Kodi only uses the CPU cores that are online when Kodi starts, so I recommend maximizing CPU performance before starting Kodi / XBMC.

For 4k/UltraHD/2160p TV you need to set the maximum GPU frequency as well.

Commands to adjust performance only last until a reboot (or until something else changes them), so you can add commands to your "/etc/rc.local" bootup script if you want them to be run automatically on every boot. It's possible that something may change them later if you don't use Kodi soon after bootup, so you might want to also run "sudo /etc/rc.local" again just before starting Kodi / XBMC.

Full details about adjust these are on the Jetson Performance page, but for Kodi / XBMC with hardware decoding, it is usually good enough to just force all CPU cores of Jetson TK1 online on every bootup, without forcing the CPU to run at max clock speeds.

So open the bootup file on Jetson:

sudo nano /etc/rc.local

And enter these contents:

# Turn on all 4 CPU cores, so that Kodi / XBMC sees them when it starts.
echo 0 > /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable
echo 1 > /sys/devices/system/cpu/cpu0/online
echo 1 > /sys/devices/system/cpu/cpu1/online
echo 1 > /sys/devices/system/cpu/cpu2/online
echo 1 > /sys/devices/system/cpu/cpu3/online

exit 0

And if you want max performance such as for 4K / Ultra HD / 2160p video, also add these extra commands to the file above, just above the "exit 0" line:

# Use max CPU performance.
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

# Use max GPU performance.
echo 852000000 > /sys/kernel/debug/clock/override.gbus/rate
echo 1 > /sys/kernel/debug/clock/override.gbus/state

(For more details about how to adjust the CPU and GPU performance, go to the Performance page).

Playback Quality Tips

Use Kodi Audio configuration under system settings to enable HDMI audio.

For jitter free video playback I recommend allowing Kodi to to adjust TV refresh rate always. For that you need to enable the Expert Settings and enable "Adjust display refresh rate to match video". For instructions, see: http://wiki.xbmc.org/index.php?title=Settings/Videos

With limited testing I suggest selecting Audio Clock as the A/V sync method.

Testing Betas

To test the latest version (currently 15.1rc1), simply add the testing PPA, update, and install.

sudo add-apt-repository ppa:kulve/kodi-testing-jetson-tk1
sudo apt-get update
sudo apt-get install kodi