Intel VAAPI howto with Leia v18 nightly based on Ubuntu 18.04 server
(2017-12-18, 23:14)camelreef Wrote:
(2017-12-18, 22:57)fritsch Wrote: I most of the time compile kernels / or kodi next to playing videos ...
 And I am sure that it works.

Here is my current theory: the artefacts are not linked to mesa, libva, X, CPU or GPU, but I/O perfs from the external USB HDD using a user-space driver for the file system. Sourcing files from a drive using the ntfs-3g fuse driver works until it hits a rapidly lowering performance ceiling, and then not enough data gets streamed for decoding, and I get artefacts.

I will take a look at the ntfs driver used in LibreELEC. I'm betting on the read-only but performant kernel driver instead of the FUSE ntfs-3g.

I also have a spare USB3 external HDD that I can format in ext4 or NTFS, and test with kernel and FUSE drivers for NTFS.

That would be quite en tangent as far as root cause is concerned, but there is credibility in my current path!     
 


My first test involved leaving the system as-is, but mounting that NTFS partition on the external USB3 HDD using the read-only kernel driver.
No artefacts whatsoever! (but probably played the wrong movie or not long enough, see below)
 



With that positive result in the bag, I booted the live LibreELEC stick and checked what it it using. I was surprised to see it use ntfs-3g too!
Code:
ntfs-3g 2017.3.23 external FUSE 29 - Third Generation NTFS DriverConfiguration type 7, XATTRS are on, POSIX ACLS are on

Ubuntu 17.10 uses
Code:
ntfs-3g 2016.2.22AR.2 integrated FUSE 28 - Third Generation NTFS DriverConfiguration type 7, XATTRS are on, POSIX ACLS are on

And that's a big enough difference...

I've manually installed ntfs-3g, libntfs-3g and libgrcypt20 from future Ubuntu 18.04/Bionic and got this:
Code:
ntfs-3g 2017.3.23 integrated FUSE 28 - Third Generation NTFS DriverConfiguration type 7, XATTRS are on, POSIX ACLS are on

I hoped that updating the ntfs-3g version would be enough, and that the integrated/external FUSE 28/29 would not make a difference. I also reverted to stock 4.13 kernel and purged the xorg-edgers PPA. I still have the VA-API PPA and the intel driver for X. I played again!

And....

Artefacts...

FUSE appears to make a difference, ntfs-3g is not enough... At least within the framework of my theory.
I've reverted libntfs-3g, ntfs-3f and libcrypt20 back to stock.
 


Next test!

I take a spare USB3 HDD, partition from scratch, ext3 file system, mount, copy the shapely Wonder Woman on it, add a source in Kodi, play!

And...

No artefacts!

Ah, but another movie with more movements is giving me artefacts...
 


I'm not too passionate about switching filesystem and lose OS portability for that external hard drive...

Something else hit me too: the Kodi on the TV played perfect 4K without artefacts, from the same hard drive, same NTFS filesystem, same old-ish ntfs-3g, same OS, same machine, with the added complexity of a Samba share and a Wi-Fi network!!!! Hmmmm.....

What if Kodi buffered things differently for network filesystems  than it does for local filesystems?

A quick Google, and there I land: http://kodi.wiki/view/HOW-TO%3AModify_the_video_cache

Oh oh! Cache values that I can play with! I also have plenty of CPU and RAM sitting pretty but idle...

So here I go with caching all, bigger read factor and 1 GB of RAM cache (3 GB of RAM used)
Code:
<advancedsettings>
  <cache>
    <buffermode>1</buffermode>
    <memorysize>1073741824</memorysize>
    <readfactor>40</readfactor>
  </cache>
</advancedsettings>

And nope... no go, artefacts quickly arrive.

a memory size of 0 to cache to disk (hoping that it uses the OS SSD) changes nothing.

Here is a debug log, just in case (yes, I've switched movie, that one has issues arriving more rapidly than the other)
 


I've also tried creating a source going through the local Samba server (hey, it worked for the TV...). Artefacts...

I've re-added the xorg-edges PPA, artefacts. I've re-added 4.14.5 mainline kernel... Artefacts...
 


I was sure that I was on to something! Darn!

Am I missing something around the cache settings?

Am I on the wrong path altogether?

What is LibreELEC doing that I am not doing on this install? (let me check again with Kingsman 1 is it really plays without artefacts, I'm starting to doubt everything...)
Reply


Messages In This Thread
Live TV broken again? - by schamane - 2016-02-29, 19:56
Random crashes - by hal2100 - 2016-03-08, 22:03
Strange Behaviour - by MicTie - 2016-12-07, 10:46
RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - by camelreef - 2017-12-19, 04:40
Working lirc with mce remote - by fr1day - 2019-08-10, 17:36
Logout Mark Read Team Forum Stats Members Help
Intel VAAPI howto with Leia v18 nightly based on Ubuntu 18.04 server18