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 - doctor64 - 2016-07-03

Hello!

I assemble new rig (intel i3 skylake) and encounter strange video corruption. Looks like top ~10% of screen image lagging few frames behind and have teared from main picture. Of course, it can be noticed mostly then background is panning to side.
Using Ubuntu 16.04. Using xbmc-nightly Krypton v17 version or fernetmenta's special ppa does not change anything, same for vaapi 1.7.0 or 1.7.1

Strangely enough, turning off VAAPI does not help.

Please, can anyone help me? This tearing rather annoying.

I try to make a photo of this:
link to photo: https://goo.gl/photos/M4brQDpWPUkLd6G48


pastebin info and logs:
kodi@Hall:~$ dpkg -l |grep mesa | pastebinit
http://paste.ubuntu.com/18413124/
kodi@Hall:~$ DISPLAY=:0 vainfo | pastebinit
libva info: VA-API version 0.39.2
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_39
libva info: va_openDriver() returns 0
http://paste.ubuntu.com/18413131/
kodi@Hall:~$ cat ~/.kodi/temp/kodi.log | pastebinit
http://paste.ubuntu.com/18413145/
kodi@Hall:~$ dmesg | pastebinit
http://paste.ubuntu.com/18413148/
kodi@Hall:~$ id | pastebinit
http://paste.ubuntu.com/18413155/
kodi@Hall:~$ amixer | pastebinit
http://paste.ubuntu.com/18413163/


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2016-07-03

Do you run kodi ontop of unity / compiz or another compositing manager like compton? It seems you have lightdm and the rest of a fully fletched DE up and running?

Hard to say, disable the compositor please.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - doctor64 - 2016-07-03

(2016-07-03, 22:37)fritsch Wrote: Do you run kodi ontop of unity / compiz or another compositing manager like compton? It seems you have lightdm and the rest of a fully fletched DE up and running?
Yes, i run kodi on DE xubuntu, using xfce/xfwm.

Quote:Hard to say, disable the compositor please.

Thank you very much, disabling composition in xfwm4-tweaks-settings solves my problem.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2016-07-03

Yeah. That's why this thread is about the howto and not about crappy WMs.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - doctor64 - 2016-07-03

I am sorry for using wrong thread. I can't imagine what such tearing is not a driver/vaapi/etc problem, but a WM's. I have lot's of use of xbmc/kodi and xubunty (on nvidia/ati platform), but never see tearing. Sorry again and thank you.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - Sunflux - 2016-07-04

(2016-07-03, 19:14)fritsch Wrote: AAC was always decoded, never passthroughed - in no version of kodi.

Check your deinterlacing method as your 29.97i is most likely interlaced material. Make sure you use the settings adviced at the beginning of this forum.

Yeah, but my guess was that the all-new system you were talking about having to decode it internally was having trouble keeping audio / video in sync . As mentioned, these files all played back perfectly fine on one of your VAPPI v15 betas.

Deinterlacing has been forced to "off" for all files, so even if they were interlaced, I don't think there should be performance issues?

I didn't notice that the recommendation is to have VDPAU "off", I'll try that tonight.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2016-07-04

You can't discuss issues away ? just try and see if they go away if you ignore their existence.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - Sunflux - 2016-07-04

Okay, using the recommended settings... I'm mainly looking for the frequent dropped frames every 20-30 seconds...

480p23 + AAC 2.0 + Lanczos3 = no dropped frames (vsyncoff rock solid at 0.0)
720p23 + AAC 2.0 + Lanczos3 = no dropped frames (vsyncoff steady at 8.0-9.0)
720p25 + MP3 2.0 + Lanczos3 = no dropped frames (vsyncoff 7.2-14.2)
1080p23 + AAC 2.0 = no dropped frames (vsyncoff steady at 29.7-30.1)
1080p23 + DTS HD-MA = no dropped frames (vsync rock solid at -33.0)
1080p23 + FLAC 5.1 (to LPCM 5.1) = no dropped frames (vsyncoff steady at -23.7-24.0)
1080p25 + AC3 5.1 = no dropped frames (vsyncoff steady at -2.4 to -2.6)

720p59 + AC3 5.1 + Lanzcos3 = no dropped frames (vsyncoff somewhat steady at 5.0-12.5, but there are slowly increasing skipped frames)
1080i59 + AC3 5.1 = no dropped frames (vsyncoff 1.0-16, but slowly increasing skipped frames)

720p29 + AC3 5.1 + Lanzcos3 = massive dropped frames (vsyncoff pretty big fluctuations -10 to +3)
720p29 + AAC 2.0 + Lanzcos3 = massive dropped frames (vsyncoff fluctuates from -12.5 to +3)

So... looks like there's only problems with 29p (actual 29p) and 59i/p regardless of audio, but 59 is handled through skipping frames fairly gracefully, but 29p gets horrible stuttering periods making it unwatchable. I even have a 0.5mbit 720p stream that causes hundreds of dropped frames a minute.

Oh, 1 more.

1538p29 + AAC 2.0 + Lanzcos3 = a big number of skipped but no dropped? (It's shaky Go Pro 2.8k footage from a drone so hard to see if anything's wrong)


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - edu27 - 2016-07-05

Is it possible to install alpha2 yet?, in nighly build tvtunes donĀ“t work


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

Ask the addons author to fix this Addon, please.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - tudstudent - 2016-07-06

(2015-07-12, 20:06)fritsch Wrote: Introduction
While watching a SD(!) video, that is accelerated by VAAPI, e.g. mpeg-2 or h264, click the film role and choose: Deinterlace: Auto (Never set this to ON it will harm for everything that is not interlaced) Deinterlacing-Method: VAAPI-MCDI or VAAPI-MADI (Sandybridge) and VAAPI-BOB (BYT), Scaling Method: Lanczos3 Optimized and choose save for all files. Remember to do this only in combination with the above "scaling above" for 20%. This Lanczos3 Optimized filter is too heavy for BYTs, here you might - depending on the file - choose Bilinear.

It is obviously clear, that you won't see the VAAPI-MCDI settings when you play a video that is software accelerated only.

Last week I build my new config, where in the past I was using nvidia ION2 hardware nowadays I switched to skylake intel graphics. Even tough it is working OK, I am having doubt the VAAPI is working. As per quoted part of the howto above I am missing the VAAPI options as deinterlace method.
At this moment I am still using the 1.7.0 driver, I am planning to upgrade, but as far as I read the explanation it should work (besides the pixels being incorrect).
I downloaded the H264 mov file in SD from the sample set:
https://kodi.tv/media-samples/
http://download.blender.org/peach/bigbuckbunny_movies/

And further I have made the required logs:
http://paste.ubuntu.com/18614605/
http://paste.ubuntu.com/18614612/
http://paste.ubuntu.com/18614617/
http://paste.ubuntu.com/18614639/
http://paste.ubuntu.com/18614644/
http://paste.ubuntu.com/18614663/

I see a relative high CPU usage, where in the past with an atom I was on 20 to 30% while watching a movie I am now more regularly on 50% (on a proc which is multiple times faster than the atom)
(Had a atom D525 and now skylake 6300)

The kodi I am using is of a couple of days ago, but I haven't seen any commits which have something to do with VAAPI.
Hope you can help me.
Now I am going to upgrade the intel driver to 1.7.1 to fix the incorrect pixels.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2016-07-06

Looks like kodi build without VAAPI support :-) - Just use the ppa, which this howto wants you to use.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - tudstudent - 2016-07-06

Hi Fritsch, thank you for taking a look. If you prefer I can make a separate topic, but I just did a "./configure" and got this end result:
Code:
------------------------
  Kodi Configuration:
------------------------
  Kodi Version: 17.0-ALPHA3
  git Rev.:     20160703-3409787
  Debugging:    Yes
  Profiling:    No
  Optimization: Yes
  SWIG Available:       Yes
  JRE Available:        Yes
  Doxygen Available:    No
  Crosscomp.:   No
  target ARCH:
  target CPU:
  OpenGL:       Yes
  ALSA:         Yes
  DBUS:         Yes
  VDPAU:        Yes
  VAAPI:        Yes
  OpenMax:      No
  X11:          Yes
  Bluray:       Yes
  XSLT scrapers:        Yes
  TexturePacker:No
  MID Support:  No
  ccache:       Yes
  ALSA Support: Yes
  PulseAudio:   No
  Google Test Framework Configured:     Yes
  Google Breakpad Configured:   No
  Avahi:        No
  mDNSEmbedded: No
  Non-free:     Yes
  MySQL:        Yes
  Webserver:    Yes
  libssh support:       Yes
  libsmbclient support: Yes
  libnfs client support:Yes
  AirPLay support:      No
  AirTunes support:     No
  UPnP support:         Yes
  Optical drive:        Yes
  libudev support:      Yes
  libusb support:       No
  libcec support:       Yes
  lcms2 support:        Yes
  libbluetooth support: Yes
  libcap support:       Yes
  additional players:   No
  additional codecs:    No
  prefix:       /usr/local
------------------------

As far as I understand it, this should build with va-api, correct? So, then the question remains why it is not working (or why it does not compile with va-api)


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2016-07-06

Reproduce with the ppa or own Thread, please.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - tudstudent - 2016-07-06

Quite interesting, the nightly PPA is showing me the VAAPI options....
So there is deff a problem with my own compiled GIT.

Additional question: is VA-API not capable of fluently decoding 4K@60Hz (thought that skylake could do hybrid CPU & GPU). I have read that linux is not yet capable of this (but I am not (yet) into this matter).