Kodi (XBMC) with full HW acceleration (stable: 14.0, testing: 15.1)

Yes, and that worked for me very well. It was super smooth. I would prefer Google/Netflix etc. to improve the framerates and bitrates before going after higher resolutions.

I made a blog post about my power consumption measurements:

http://tuomas.kulve.fi/blog/2014/09/18/xbmc-for-tegra-with-full-hw-acceleration/

Apart from that noisy fan, Jetson makes a great HTPC. I’m sure it wouldnt overheat when playing 2160p 30 video even if you would just disconnect the fan.

ondemand governor works fine for me since Im using grinch kernel. Dunno what did the magic but it scales fine with it and 2160p video plays fine without forcing cores online or forcing gpu clock to max.

Kodi supports 3D in a “faked” mode. It shows left and right eye on the screen in side-by-side (sbs) or top-and-bottom (tab) modes if if detects the video is stereo (3D) in those formats. The video is shown over the HDMI as plain 2D but it seems that at least some of the 3D TVs can be told to interpret the 2D video as 3D.

When the Kodi is showing the squeezed double video (so also double menus), you need to explicitly force the 3D on from the TV (there’s often a “3D” button in the remote for that).

I tried that on my TV but I didn’t have much success. For one wrong sized video I did get 3D but for others I think the TV showed only one eye (so it did stretch the double video from Kodi to full screen).

If you download a video from Youtube it might already include the correct 3D tags in the container but for other files you need to be very exact how to rename the files:

[url]3D - Official Kodi Wiki
[url]Kodi Community Forum

I had to enable the stereoscopic videos from the Kodi’s settings and sometimes even force it from the context menu when playing the video.

Let me know if the 3D-over-2D works for you :)

Awesome work :) Works very well! NVIDIA Jetson TK1 - Kodi 14.0 Helix - 120Mbps / 1080p@60 / 4k@30 - YouTube

Nice, this is working really well for me.

Out of interest are the patches you used to get this working available anywhere ?

How’d you get the binaries for makemkv for arm?

All the patches related to getting Kodi working on Jetson (i.e. OpenGLES/EGL on X.Org and OpenMAX with EGL on X.Org) are already merged to upstream. So no extra patches needed! :)

I’m not familiar with makemkv but based on googling that looks like a Windows closed source software? There is no way to get that to Linux and ARM. And converting videos need a lot of CPU power so it’s best done on a PC.

I guess transcoding could be done using HW acceleration but I’m not sure if that’s used generally? There are some transcoding GStreamer command line examples in the Jetson documentation but they are hardly tuned for getting e.g. certain sized final video files or anything.

Thanks for making this possible.

I still have some issues with Kodi on my TK1 though:

  1. Audio output via HDMI does not work (while it does work with the same cable & TV with my raspberry pi)
    I tried both “Default Output Device (PULSEAUDIO)” and “Tegra-rt5639 Analog Stereo, Speakers (PULSEAUDIO)”. The instructions mention HDMI audio and therefore I guess both options are wrong, but I don’t have a third (“HDMI”) option! What’s wrong here?
  2. HDMI-CEC does not work:
    @kulve: Didn’t you say (in the other thread) that it does work for you? Are any additional steps required?
    I’m using the latest grinch kernel (1 November 2014), that should support CEC: “Adding Tegra CEC support”.

There has been some reports about the missing sound with HDMI. If you restart Jetson couple of times or disconnect and connect the HDMI cable, does the HDMI option show up?

You can also try removing pulseaudio:

sudo apt-get remove pulseaudio
killall pulseaudio
ps aux|grep pulseaudio

If you now start the Kodi, you shouldn’t see the pulseaudio in the Audio output settings. But I don’t know if that affects the missing HDMI audio at all.

Kodi is built with the CEC support and the kernel seems to support CEC but the user space library that is used by Kodi to talk to kernel, doesn’t understand Tegra’s CEC.

Some work has been done for it:

Thanks for the clarification. As for your suggestions:

  • Removing pulseaudio also removes ubuntu-desktop. Not a good idea.
  • Rebooting (even several times) does not change anything.
  • Un/replugging also does not help.

I think I may have found the issue in the /var/log/syslog:

tegra-ubuntu colord: Device added: xrandr-Samsung Electric Company-SAMSUNG-1
tegra-ubuntu kernel: [  119.617529] rt5639 0-001c: one bit hp_amp_power on=1 hp_amp_power_count=0
tegra-ubuntu pulseaudio[1392]: [alsa-sink-rt5639 PCM rt5639-aif1-0] alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write!
tegra-ubuntu pulseaudio[1392]: [alsa-sink-rt5639 PCM rt5639-aif1-0] alsa-sink.c: Most likely this is a bug in the ALSA driver '(null)'. Please report this issue to the ALSA developers.
tegra-ubuntu pulseaudio[1392]: [alsa-sink-rt5639 PCM rt5639-aif1-0] alsa-sink.c: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.

Guess this now goes offtopic, but if anyone has a clue… :-/

Only a few seconds later…

I think I may have found a workaround:

pulseaudio -k

I then restarted xbmc, and the device appeared in the settings…

I tried several times. Starting sbmc with

pulseaudio -k && xbmc

seems to fix the issue.

I understood that “pulseaudio -k” will kill the pulseaudio but it might be quickly started automatically again. I guess if you manage to start Kodi before it’s started, Kodi won’t detect it and thus won’t use it even if it comes up later.

Now that I googled it a bit more, it might be possible to disable pulseaudio either by editing /etc/pulse/client.conf and setting “autospawn=no” or creating $HOME/.pulse/client.conf and adding that line to it (and reboot).

This thread

https://devtalk.nvidia.com/default/topic/763688/?comment=4278931

discusses the issue.

Haven’t tried the last suggestion yet, but pulseaudio -k also seems to work :-)

To disable pulse at every XBMC session but enable pulse for “normal” unity login you can use

So, how can I upgrade to the latest version of kodi?

Are you interested in compiling it yourself or do you just want a newer version? Is there something specific you are looking for?

If you want to try a newer version, I can provide a .tar.gz of Kodi 14b3 for testing. If it works, I can then upgrade the actual repository.

I should probably create a new launchpad repository for testing builds but creating ARM based projects needs a explicit approval in there…

@kulve are you able to provide build options needed to build for tegra ? most people on here can build from source. but configuring it correctly could take a few attempts.

Below are my build steps for Kodi. Do run them on the device itself.

Install Kodi build deps:

sudo apt-get install binutils libvdpau-dev ccache autopoint libltdl-dev git-core build-essential gawk pmount libtool nasm yasm automake cmake gperf zip unzip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libfribidi-dev liblzo2-dev libfreetype6-dev libsqlite3-dev libogg-dev libasound2-dev python-sqlite libglew-dev libcurl3 libcurl4-gnutls-dev libxrandr-dev libxrender-dev libmad0-dev libogg-dev libvorbisenc2 libsmbclient-dev libmysqlclient-dev libpcre3-dev libdbus-1-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libenca-dev libxt-dev libxmu-dev libpng-dev libjpeg-dev mesa-utils libcdio-dev libsamplerate-dev libmpeg3-dev libflac-dev libiso9660-dev libass-dev libssl-dev fp-compiler gdc libmpeg2-4-dev libmicrohttpd-dev libmodplug-dev libssh-dev gettext cvs python-dev libyajl-dev libboost-thread-dev libplist-dev libusb-dev libudev-dev libtinyxml-dev libcap-dev curl swig default-jre libavcodec-dev libavfilter-dev libavformat-dev libavutil-dev libbluetooth-dev libbluray-dev libbluray1 libcec-dev libcurl4-gnutls-dev libcwiid-dev libcwiid1 libnfs-dev libpostproc-dev libshairport-dev libswscale-dev libva-dev libva-egl1 libva-tpi1 libmp3lame-dev libtiff-dev libtag1-dev libxslt1-dev libegl1-mesa-dev libgles2-mesa-dev libomxil-bellagio-dev

Download and compile a newer CEC:

dget https://launchpad.net/~pulse-eight/+archive/ubuntu/libcec/+files/libcec_2.2.0-2%7Etrusty.dsc
dpkg-source -x *dsc
cd libcec-2.2.0
sudo apt-get install debhelper liblockdev1-dev
dpkg-buildpackage -b
sudo dpkg -i ../libcec-dev_2.2.0-2~trusty_armhf.deb ../libcec2_2.2.0-2~trusty_armhf.deb ../cec-utils_2.2.0-2~trusty_armhf.deb ../libcec_2.2.0-2~trusty_armhf.deb

Compile and install Kodi 14.0 Beta 3:

git clone https://github.com/xbmc/xbmc.git
cd xbmc
git checkout -b 14b3 14.0b3-Helix
mkdir $HOME/build
./bootstrap && ./configure --prefix=$HOME/build/xbmc-14b3 --enable-openmax --enable-neon --enable-gles --disable-gl --disable-vdpau --disable-vaapi && make -j4 && make install

Both. New version because of nag screen. Build ability in case I find something I need to tweak. Also, it might help me figure out how to build an mkv bin.

In the build instructions, are those cross compile or do I need to build on the Jetson?