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-11-28

KabyLake can decode hevc 10 bit. But if you did not buy yet - better invest in Coffee Lake.


Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - anthonytex - 2017-11-29

Good evening, I'm here again to ask an (another) question about deinterlacing (just to satisfy my curiosity of learning Smile and acive better results with kodi) In a system with an intel kaby lake CPU, and an Nvidia Pascal GPU, i'd prefer to use vaapi (and so Intel processor) with mcdi than vdpau with spatial/temporal Deinterlace because MCDI should be better than Adaptive Deinterlace: am I wrong? What would you suggest? Thank again for the timeSmile


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

(2017-11-28, 23:06)fritsch Wrote: KabyLake can decode hevc 10 bit. But if you did not buy yet - better invest in Coffee Lake.
 I thought Coffee Lake and Kaby Lake were identical in terms of graphics with the same gfx core?


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

I have installed 17.10 on a apollo lake machine and if I install lirc it messes up totally. It gets 'stuck' on any button down. It repeats forever. If I remove lirc it works better but only a few buttons work in kodi.

Is there a mapping file I need to make it work in kodi with ir-keytable instead of lirc? And if so where can I find a ready made one?

Output from ir-keytable
Code:
Found /sys/class/rc/rc0/ (/dev/input/event8) with:
        Driver ite-cir, table rc-rc6-mce
        Supported protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp
        Enabled protocols: lirc rc-6
        Name: ITE8708 CIR transceiver
        bus: 25, vendor/product: 1283:0000, version: 0x0000
        Repeat delay = 500 ms, repeat period = 125 ms

Output from ir-keytable-t
Code:
Testing events. Please, press CTRL-C to abort.
1511984421.639500: event type EV_MSC(0x04): scancode = 0x800f0422
1511984421.639500: event type EV_KEY(0x01) key_down: KEY_OK(0x0160)
1511984421.639500: event type EV_SYN(0x00).
1511984421.776535: event type EV_MSC(0x04): scancode = 0x800f0422
1511984421.776535: event type EV_SYN(0x00).
1511984422.050097: event type EV_KEY(0x01) key_up: KEY_OK(0x0160)
1511984422.050097: event type EV_SYN(0x00).
1511984423.846179: event type EV_MSC(0x04): scancode = 0x800f0416
1511984423.846179: event type EV_KEY(0x01) key_down: KEY_PLAY(0x00cf)
1511984423.846179: event type EV_SYN(0x00).
1511984423.983242: event type EV_MSC(0x04): scancode = 0x800f0416
1511984423.983242: event type EV_SYN(0x00).
1511984424.258096: event type EV_KEY(0x01) key_up: KEY_PLAY(0x00cf)
1511984424.258096: event type EV_SYN(0x00).
1511984428.418089: event type EV_MSC(0x04): scancode = 0x800f0419
1511984428.418089: event type EV_KEY(0x01) key_down: KEY_STOP(0x0080)
1511984428.418089: event type EV_SYN(0x00).
1511984428.555139: event type EV_MSC(0x04): scancode = 0x800f0419
1511984428.555139: event type EV_SYN(0x00).
1511984428.834099: event type EV_KEY(0x01) key_up: KEY_STOP(0x0080)
1511984428.834099: event type EV_SYN(0x00).
1511984430.586537: event type EV_MSC(0x04): scancode = 0x800f0418
1511984430.586537: event type EV_KEY(0x01) key_down: KEY_PAUSE(0x0077)
1511984430.586537: event type EV_SYN(0x00).
1511984430.693019: event type EV_MSC(0x04): scancode = 0x800f0418
1511984430.693019: event type EV_SYN(0x00).
1511984430.830014: event type EV_MSC(0x04): scancode = 0x800f0418
1511984430.830014: event type EV_SYN(0x00).
1511984431.106097: event type EV_KEY(0x01) key_up: KEY_PAUSE(0x0077)
1511984431.106097: event type EV_SYN(0x00).
1511984431.869916: event type EV_MSC(0x04): scancode = 0x800f0414
1511984431.869916: event type EV_KEY(0x01) key_down: KEY_FASTFORWARD(0x00d0)
1511984431.869916: event type EV_SYN(0x00).
1511984432.007039: event type EV_MSC(0x04): scancode = 0x800f0414
1511984432.007039: event type EV_SYN(0x00).
1511984432.290101: event type EV_KEY(0x01) key_up: KEY_FASTFORWARD(0x00d0)
1511984432.290101: event type EV_SYN(0x00).
1511984432.640424: event type EV_MSC(0x04): scancode = 0x800f0415
1511984432.640424: event type EV_KEY(0x01) key_down: KEY_REWIND(0x00a8)
1511984432.640424: event type EV_SYN(0x00).
1511984432.777197: event type EV_MSC(0x04): scancode = 0x800f0415
1511984432.777197: event type EV_SYN(0x00).
1511984433.058107: event type EV_KEY(0x01) key_up: KEY_REWIND(0x00a8)
1511984433.058107: event type EV_SYN(0x00).
1511984433.615435: event type EV_MSC(0x04): scancode = 0x800f041a
1511984433.615435: event type EV_KEY(0x01) key_down: KEY_NEXT(0x0197)
1511984433.615435: event type EV_SYN(0x00).
1511984433.721986: event type EV_MSC(0x04): scancode = 0x800f041a
1511984433.721986: event type EV_SYN(0x00).
1511984433.859191: event type EV_MSC(0x04): scancode = 0x800f041a
1511984433.859191: event type EV_SYN(0x00).
1511984434.114090: event type EV_KEY(0x01) key_up: KEY_NEXT(0x0197)
1511984434.114090: event type EV_SYN(0x00).
1511984434.144792: event type EV_MSC(0x04): scancode = 0x800f040f
1511984434.144792: event type EV_KEY(0x01) key_down: KEY_INFO(0x0166)
1511984434.144792: event type EV_SYN(0x00).
1511984434.281612: event type EV_MSC(0x04): scancode = 0x800f040f
1511984434.281612: event type EV_SYN(0x00).
1511984434.562094: event type EV_KEY(0x01) key_up: KEY_INFO(0x0166)
1511984434.562094: event type EV_SYN(0x00).
1511984435.195721: event type EV_MSC(0x04): scancode = 0x800f0423
1511984435.195721: event type EV_KEY(0x01) key_down: KEY_EXIT(0x00ae)
1511984435.195721: event type EV_SYN(0x00).
1511984435.332416: event type EV_MSC(0x04): scancode = 0x800f0423
1511984435.332416: event type EV_SYN(0x00).
1511984435.586094: event type EV_KEY(0x01) key_up: KEY_EXIT(0x00ae)
1511984435.586094: event type EV_SYN(0x00).



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

(2017-11-29, 21:41)laric Wrote: I have installed 17.10 on a apollo lake machine and if I install lirc it messes up totally. It gets 'stuck' on any button down. It repeats forever. If I remove lirc it works better but only a few buttons work in kodi.

Is there a mapping file I need to make it work in kodi with ir-keytable instead of lirc? And if so where can I find a ready made one?

Output from ir-keytable
Code:
Found /sys/class/rc/rc0/ (/dev/input/event8) with:
        Driver ite-cir, table rc-rc6-mce
        Supported protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp
        Enabled protocols: lirc rc-6
        Name: ITE8708 CIR transceiver
        bus: 25, vendor/product: 1283:0000, version: 0x0000
        Repeat delay = 500 ms, repeat period = 125 ms

Output from ir-keytable-t
Code:
Testing events. Please, press CTRL-C to abort.
1511984421.639500: event type EV_MSC(0x04): scancode = 0x800f0422
1511984421.639500: event type EV_KEY(0x01) key_down: KEY_OK(0x0160)
1511984421.639500: event type EV_SYN(0x00).
1511984421.776535: event type EV_MSC(0x04): scancode = 0x800f0422
1511984421.776535: event type EV_SYN(0x00).
1511984422.050097: event type EV_KEY(0x01) key_up: KEY_OK(0x0160)
1511984422.050097: event type EV_SYN(0x00).
1511984423.846179: event type EV_MSC(0x04): scancode = 0x800f0416
1511984423.846179: event type EV_KEY(0x01) key_down: KEY_PLAY(0x00cf)
1511984423.846179: event type EV_SYN(0x00).
1511984423.983242: event type EV_MSC(0x04): scancode = 0x800f0416
1511984423.983242: event type EV_SYN(0x00).
1511984424.258096: event type EV_KEY(0x01) key_up: KEY_PLAY(0x00cf)
1511984424.258096: event type EV_SYN(0x00).
1511984428.418089: event type EV_MSC(0x04): scancode = 0x800f0419
1511984428.418089: event type EV_KEY(0x01) key_down: KEY_STOP(0x0080)
1511984428.418089: event type EV_SYN(0x00).
1511984428.555139: event type EV_MSC(0x04): scancode = 0x800f0419
1511984428.555139: event type EV_SYN(0x00).
1511984428.834099: event type EV_KEY(0x01) key_up: KEY_STOP(0x0080)
1511984428.834099: event type EV_SYN(0x00).
1511984430.586537: event type EV_MSC(0x04): scancode = 0x800f0418
1511984430.586537: event type EV_KEY(0x01) key_down: KEY_PAUSE(0x0077)
1511984430.586537: event type EV_SYN(0x00).
1511984430.693019: event type EV_MSC(0x04): scancode = 0x800f0418
1511984430.693019: event type EV_SYN(0x00).
1511984430.830014: event type EV_MSC(0x04): scancode = 0x800f0418
1511984430.830014: event type EV_SYN(0x00).
1511984431.106097: event type EV_KEY(0x01) key_up: KEY_PAUSE(0x0077)
1511984431.106097: event type EV_SYN(0x00).
1511984431.869916: event type EV_MSC(0x04): scancode = 0x800f0414
1511984431.869916: event type EV_KEY(0x01) key_down: KEY_FASTFORWARD(0x00d0)
1511984431.869916: event type EV_SYN(0x00).
1511984432.007039: event type EV_MSC(0x04): scancode = 0x800f0414
1511984432.007039: event type EV_SYN(0x00).
1511984432.290101: event type EV_KEY(0x01) key_up: KEY_FASTFORWARD(0x00d0)
1511984432.290101: event type EV_SYN(0x00).
1511984432.640424: event type EV_MSC(0x04): scancode = 0x800f0415
1511984432.640424: event type EV_KEY(0x01) key_down: KEY_REWIND(0x00a8)
1511984432.640424: event type EV_SYN(0x00).
1511984432.777197: event type EV_MSC(0x04): scancode = 0x800f0415
1511984432.777197: event type EV_SYN(0x00).
1511984433.058107: event type EV_KEY(0x01) key_up: KEY_REWIND(0x00a8)
1511984433.058107: event type EV_SYN(0x00).
1511984433.615435: event type EV_MSC(0x04): scancode = 0x800f041a
1511984433.615435: event type EV_KEY(0x01) key_down: KEY_NEXT(0x0197)
1511984433.615435: event type EV_SYN(0x00).
1511984433.721986: event type EV_MSC(0x04): scancode = 0x800f041a
1511984433.721986: event type EV_SYN(0x00).
1511984433.859191: event type EV_MSC(0x04): scancode = 0x800f041a
1511984433.859191: event type EV_SYN(0x00).
1511984434.114090: event type EV_KEY(0x01) key_up: KEY_NEXT(0x0197)
1511984434.114090: event type EV_SYN(0x00).
1511984434.144792: event type EV_MSC(0x04): scancode = 0x800f040f
1511984434.144792: event type EV_KEY(0x01) key_down: KEY_INFO(0x0166)
1511984434.144792: event type EV_SYN(0x00).
1511984434.281612: event type EV_MSC(0x04): scancode = 0x800f040f
1511984434.281612: event type EV_SYN(0x00).
1511984434.562094: event type EV_KEY(0x01) key_up: KEY_INFO(0x0166)
1511984434.562094: event type EV_SYN(0x00).
1511984435.195721: event type EV_MSC(0x04): scancode = 0x800f0423
1511984435.195721: event type EV_KEY(0x01) key_down: KEY_EXIT(0x00ae)
1511984435.195721: event type EV_SYN(0x00).
1511984435.332416: event type EV_MSC(0x04): scancode = 0x800f0423
1511984435.332416: event type EV_SYN(0x00).
1511984435.586094: event type EV_KEY(0x01) key_up: KEY_EXIT(0x00ae)
1511984435.586094: event type EV_SYN(0x00).

Good that lirc is obsolete nowadays :-). Please open your own thread.


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

I just figured, that updating an older git version (already kodi 18) to todays version gives me a black picture. Took me a while to figure that using color-management is the cause. Show-stopper for me, since I am actually using a 3d-lut.

Since in the original 3d-lut thread I got the opinion that this feature is not really maintained, does anyone here know if there is a chance it will be fixed or might it even die?


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

Hello!

When I play 4K HEVC 10 bit content, I get errors on screen (see sample screenshots below, better than a wordly description) after a few minutes of perfect play.
If I stop playing (not pause) and restart/resume, it's back to normal without errors for a few more minutes before it comes again.

It does that on all similar 4K HEVC 10 bit stuff. All good with AVC 1080p.

I've tried 2 different TVs with the same results.

I've hopefully provided all the requested info below.
I'll be happy to provide more on request.
I am no coder, but given instructions I can build a kodi, test and report back.

Many thanks!

Nico


Basic infoi5-7260U - Kaby Lake
Intel NUC machine
Ubuntu 7.10, up-to-date
followed your guide in the original post
I have the VA-API PPA
I am running the Kodi 18 nightly PPA
More screenshots there: http://youplala.net/~nico/kodi18-4khevc10/

Some screenshots

Image
Image
Image

Kodi log (my hosting, too big for pastebin)
http://youplala.net/~nico/kodi18-4khevc10/kodi.log

dpkg -l |grep mesa | pastebinit
http://paste.ubuntu.com/26151215/

DISPLAY=:0 vainfo | pastebinit
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 0.40.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_40
libva info: va_openDriver() returns 0
http://paste.ubuntu.com/26151216/

dmesg | pastebinit
http://paste.ubuntu.com/26151218/

id | pastebinit
http://paste.ubuntu.com/26151219/


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

Can you check the temperature? (sensors) - also make sure that scaling is set to bilinear, cause all the NUCs are on average too slow to properly handle 4k (be it 4k input or even 1080p to 4k output) with the Lanczos or better scalers.

Edit: Btw. turn off component logging - nobody can read through all the ffmpeg clibber :-)


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

And something else: If you playback these files with Adjust Refreshrate disabled - so that the play at 1080p resolution - does something change? (Make sure to use bilinear scaling).


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

Hello!

Thanks for looking at this. I will look at the CPU temp, for sure. (I am afraid that it makes too much sense... I would have prefered a bug, it's more fixable!)

Also the TVs are 4K.

Nico


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

Hello again,

First, here is a log without components:
 http://paste.ubuntu.com/26156960/

Then, I've monitored the CPU temp (Core 0, arbitrarily) using lm-sensors. It rarely goes high, playing 4K on a 4K TV only marginally increases the temp. There are some short lived temp increases, but they do not correlate with the artefacts/error seen on screen.
Image
Image
Each graph shows about a minute of monitoring.

I've set scaling to bilinear, no change.

I've set the fan/cooling profile from balanced to cool in the BIOS, no change.

Nico


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

Could you share a sample, please? Just Long enough top reproduce.


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

Let me cut a 10mn sample, sure.


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

Here are 15mn worth of sample.
 Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s16p (default)

http://youplala.net/~nico/kodi18-4khevc10/Test-2160p.HEVC.HDR.DTS-HD.MA.mkv [5.1 GB]
It will take another 45mn to upload fully - Now all uploaded.

Thanks for looking at this!

Nico


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

(2017-12-10, 20:41)camelreef Wrote: Here are 15mn worth of sample.
 Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s16p (default)

http://youplala.net/~nico/kodi18-4khevc10/Test-2160p.HEVC.HDR.DTS-HD.MA.mkv [5.1 GB]
It will take another 45mn to upload fully - Now all uploaded.

Thanks for looking at this!

Nico
 I won't be near a VAAPI capable hevc-10 bit computer until end of this week. Perhaps someone reading this thread with Apollo Lake, KabyLake or Coffee Lake could test it for you. I will ask in our team channel if someone with e.g. Android could also test it to see if those artefacts are VAAPI only. In short: don't feel forgotten if you don't get a reply in a timely manner.