Kodi Community Forum
Intel VAAPI howto with Leia v18 nightly based on Ubuntu 18.04 server - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: Intel VAAPI howto with Leia v18 nightly based on Ubuntu 18.04 server (/showthread.php?tid=231955)



RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2017-08-05

Here: https://patchwork.freedesktop.org/patch/170051/ <- please downgrade to mesa 17.1 or wait until that patch hits 17.2 stream


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - disaacso - 2017-08-09

(2017-07-13, 07:29)MicTie Wrote: Hi,
since a couple of weeks (not really sure when it started) Kodi is stopping by itself after 10 minutes of operation.
This happens when Kodi is idle (no media played), music is played, but never happened during playing a movie.
I am also no aware of any audio-issue, everything seems running smoothly...

Besides the (almost) daily Kodi-nightly update, there was no change in the setup, especially nothing related to Audio.

I am running the setup as described in this threat.

Log-Files show:
ERROR: PulseAudio: Failed to connect context
NOTICE: PulseAudio might not be running. Context was not created.

Here all my system-info and log-files:
dpkg: http://paste.ubuntu.com/25080144/
Display: http://paste.ubuntu.com/25080153/
log: http://paste.ubuntu.com/25080163/
dmesg: http://paste.ubuntu.com/25080164/
id: http://paste.ubuntu.com/25080165/
amixer: http://paste.ubuntu.com/25080169/

Thank's for you help!

If you're running kodi in its own session it's possible that you've minimized the window, which won't change the screen dimensions but will cause this type of behavior. If not then disregard


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - MicTie - 2017-08-10

Since adding the following lines to /etc/X11/xorg.conf:
Quote:
Section "ServerFlags"
Option "BlankTime" "0"
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "0"
EndSection

everything works fine (see https://forum.kodi.tv/showthread.php?tid=231955&pid=2616493#pid2616493, UPDATE 3 - SOLUTION)

Thanks!


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - samuellarsson - 2017-08-10

(2017-08-05, 21:59)fritsch Wrote: Here: https://patchwork.freedesktop.org/patch/170051/ <- please downgrade to mesa 17.1 or wait until that patch hits 17.2 stream

Thanks, but when I try to downgrade my mesa packages to 17.1 it wants to remove my Kodi packages. After fiddling around a bit I ended up with 17.3 instead... Any tips on how to downgrade?


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - ((( atom ))) - 2017-08-11

Hi there, I am finally fed up with my weird stuttering of 25Hz material, like TV-shows, so I'd like to investigate that with your help.

My Projector does not have a native 25Hz mode. it offers 1080p50 as well as 1080i50.

24 fps movies play just fine, but all 25fps content on either of the 50 Hz modes stutters.
The solution upto now is playing back 25fps content on 24Hz and live with some audio-effects audible from resampling constantly. On the long run rather annoying..

Hardware is Apollo Lake.

Here is my xrandr-kodi-output: https://pastebin.com/1DdpYzB1

What else could help to pin down the issue?
Settings-wise, I've been through every possible combination, the result is always the same.
The system is arch linux and up to date.
@Fritsch: You might remember having figured that we had identical versions for all the software in question, last time we wrote a couple of weeks back.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2017-08-11

You got a sample? That reproduces the issue?

Where is your Debug Log?


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - ((( atom ))) - 2017-08-17

Sorry, I'm slow atm. Will come up with it on the weekend.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2017-08-17

No problem for me - I don't wait on input ...


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - ((( atom ))) - 2017-08-20

Aha. So I finally found some time to test and log the issue and what? - 25 fps runs smoothly for the first time under 50 Hz! Now this is weird! Just checked it recently and had it stuttering as usual... No update since then.

I will start using it from here on und report back if there are any issues again.

An off-topic question: Does anyone know if there have been changes made to the image-buffer used when delaying the video in order to run in synch with audio? I use a large delay (0.7 up to 3 sec) due to FIR convolution of my audio. A while ago the video started stuttering if the value exceeded 0.6 sec. That leads to problems. With my setup I would need 0.7, so that is on the edge of bearable but a friend of mine recently started getting into audio convolution (on a pi) and cannot use it, since on the pi the audio delay is > 2 sec with convolution. I could imagine it beinig a simple buffer-size issue with some luck..


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2017-08-20

Why? What does the filter?


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - ((( atom ))) - 2017-08-20

The convolution? It takes an audio impulse of 0.7 sec length and multiplies it with the running audio stream. The impulse is the inverse of a measurement derived from my Stereo-system and my room. The effect is, that the mistakes my audio-chain makes, are disappearing, since I feed the audio signal with the inverse of the mistakes measured at the listening position.

Apply this to a proper setup and you will be totally blown away.

The downside is the very high latency but luckily kodi can deal with it. Recently though, something has changed which makes it problematic.

Btw, my stuttering 25fps video /might/ just have to do with it. The only thing I recently changed was the audio-delay. I made it a bit smaller (5.76 sec or so), since some movies came out slighty choppy. My girlfriend immidiately noticed, that now lip synchronisation was lost, though I made the change when she was not around, so she wasn't expecting anything to be different.

Solving this buffer-issue might solve all my problems at once.

[edit]
..just checked again and it seems that the delay-setting which is just still working for 24 fps movies played at 24 Hz is a tad bit too high for 25 fps movies played back at 50 Hz. OK, now that is finally understood. Still it does not help a lot, since I'd just need a tiny littlebit more delay and kodi cannot give it.
[/edit]


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2017-08-20

I did phd studies on that field that's why I was interested :-). Interesting. You can increase AE's internal buffer size or even better: get in contact with AchimTuran - I was one of his mentors doing GSoC with exactly that goal - so you can help him incorporating that into ADSP.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - ((( atom ))) - 2017-08-20

I don't think the AE buffer size is the problem. The video has to be delayed, not the audio. The audio goes through external DSP-processing, which delays it for 0.7 sec, so the video comes 0.7 too early and has to be delayed by that amount. I cannot imagine a bigger audio-buffer to help here, but I might be wrong of course.

Something else: I tried playing back HEVC 10 bit for the first time and it stutters. So I checked what the CPU is doing with top and it constantly hits 100% on all cores, though vaapi is enabled and otherwise working. I couldn't find anything final on that in the forums but the hint that kodi 17 introduces hevc 10 bit hw-decoding. What's the status here?


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2017-08-21

Depends - no idea what hw you are running.

V17 does not support HEVC-10 bit
V18 needs Apollo Lake / Kaby Lake or later ... in combination with Mesa >= 17.1

Post a full Debug Log with videoplayer component logging and audio component logging enabled. This will show if your sink reports it's "max cache" correctly. If it doesn't and then delay gets higher than that value it's wrong by design.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - ((( atom ))) - 2017-08-21

This is what I found in the changelog of Kodi 17:
1.11 Linux Specific
Added new CMake based build system of Kodi and binary addons for Linux (as well as for BSD, OSX, and Windows)[112]
Added multi-architecture/distribution support to Kodi's CMake build system for Linux[113]
Added support for HEVC Main 10 profile (10-bit) hardware video decoding via VAAPI if hardware support it

My Kodi runs on Apollo Lake, mesa should be >= 17.1 but I can check that again once I fire up the machine.
So if I install kodi from git I should be lucky? Tried it last night via yaourt but failed with a dependency not being correctly updated. Have to dig into this sometimes.

Can I enable video and audio logging separately? I only know to turn on debug logging in the system menu.