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 - d'ddyrazzy - 2016-07-10

i've updated my original post


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

Quote:uid=1000(kodi) gid=1000(kodi) groups=1000(kodi),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),114(lpadmin),115(sambashare)

You are neither member of the audio nor the video group (see the useradd command). Additionaly you did properly install the vaapi drivers (i965-va-driver) package.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - d'ddyrazzy - 2016-07-10

i've followd the guide by the letter, did it 2 times, always same result, will do the user part again


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

As you see yourself, you are not member of the video nor the audio group, whatever you followed was not the howto :-)

Code:
sudo usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input kodi

followed by:
Code:
sudo reboot

Then post your logs again


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - d'ddyrazzy - 2016-07-10

done

dpkg -l |grep mesa | pastebinit
http://paste.ubuntu.com/19011519/
kodi@ubuntu-kodi:~$ 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/19011520/
kodi@ubuntu-kodi:~$ cat ~/.kodi/temp/kodi.log | pastebinit
http://paste.ubuntu.com/19011521/
kodi@ubuntu-kodi:~$ dmesg | pastebinit
http://paste.ubuntu.com/19011524/
kodi@ubuntu-kodi:~$ id | pastebinit
http://paste.ubuntu.com/19011525/
kodi@ubuntu-kodi:~$ amixer | pastebinit
http://paste.ubuntu.com/19011531/
kodi@ubuntu-kodi:~$


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

Now it looks like it should and vaapi is working (which it did not before). So problem solved? If not - turn on debug logging in kodi, play that file, post the kodi.log and disable VDPAU as per the howto instructions that you read to the letter :p

As you run a Broadwell, make sure to read the second post, too. There is something written for you.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - d'ddyrazzy - 2016-07-10

yes i have normal sound, truly sorry for this noob mistake, but i don't know what i did wrong, i could have sworn i followed it by the letter


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

Yeah, first rule: Don't swear, second rule: follow the howto -> turn off vdpau that's what you are still missing. Intel uses VAAPI only.


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

Issue: Stuttering when watching specific TV channel or a recording on a beebox n3150.

Issue first occured in LibreElec, I now install Ubuntu 16.04 to have more "tools" at my disposal. Issue persist.

It does not matter if I use live view, watch the recording or play back the video directly from my kodi system via "Video".

I've place an example here: https://dropfile.to/1ExsbEn ; access key = LknJ2HZ . Issue starts 12 seconds into playback, reproducable.

I found this issue on my newly bought beebox N3150 (8 GB) which was meant to replace the Nvidia TV Shield... yet the CPU spikes 100%, kodi debug log even states > 130%... Normal Bluray and some other channels play back perfectly though!

Error in kodi log is "Found reference and non-reference fields in the same frame, which is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented."

But this cannot be correct because the Issue does NOT occur when
- doing Live View on the channel where I see these drops on a NUC 34010H (using the SAME hard disk, but I couldn't test the recording!) , CPU never goes above ~50%
- playing the video using VLC on the problematic beebox
- when using a laptop and watching the same TV channel in live view in Kodi on it whereas it happens on the beebox in live view in Kodi at the same time (side-by-side compare)

htop also shows one thread using nearly 98% CPU, whereas the other numerous ones are nearly idle.

Pastebins, also updated to latest vaapi etc:
http://paste.ubuntu.com/19208788/
http://paste.ubuntu.com/19210169/ (kodi max debug)
http://paste.ubuntu.com/19208815/
http://paste.ubuntu.com/19208820/
http://paste.ubuntu.com/19208828/

Extra info for Germans / Europeans: No issues playing back "Das Erste HD", CPU-KODI utilization ~ 45%. "Pro Sieben HD" and other HD+ ones CPU-KODI ~ 137% , ZDF HD ~ 50%. No idea what to make of it (except Das Erste and ZDF both are 720p whereas HD+ is 1080i afaik).

Thanks!


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

What's the source? Tvheadend?

Please post Logs with latest Milhouse build as you seem to run a full desktop with compiz.


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

VDR VNSI - but as stated, it doesn't really matter I guess: Watching a recording done by VNSI plays fine on different systems, and even using the same Kodi installation on hard disk causes issues on N3150 but not on 4010U. But I see excessive CPU utilization when the issue occurs on N3150.

I used Milhouse LibreElec build before where I had the issues and dumped it for Ubuntu - will install LibreElec Milhouse again tonight (from here: http://forum.kodi.tv/showthread.php?tid=269815) and give you those logs.


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

Thx much. Not funny. Does it get better if you use bilinear scaling? I think I know the issue, for me I see these on Stream change, e.g. commercials to Tagesschau or movie to commercials but never midstream. It continues pixelated until pressing stop and continues normally on resume.

@fernetmenta: any idea?


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - User 182116 - 2016-07-13

Just tried that file on my N3150 and it plays perfectly.

CPU Usage across all 4 cores never gets above 86%

Do you have 2 sticks of RAM installed to utilise dual channel memory?

I have Bilinear scaling set.


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

@Bluesmanuk: What software stack do you have running? Btw. the CPU percentage highly depends on the clock, if clocked down - 86% is not much.


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

fritsch: That pointed me in the right direction.

Bilinear was already on.

The problem is the deinterlace method. "Auto select" causes it... and testing each setting:
Auto select - fail
Bob - fail, 135% CPU
Deinterlace - 200% CPU, corruption but picture is totally out of sync to audio
VAAPI bob - works, ~35% CPU
VAAPI motion adaptive - works, ~35% CPU
VAAPI motion compensated - works, ~35% CPU

So the problem seems to be that although I've selected "Allow hardware acceleration: VAAPI" the auto select defaults to bob. Maybe it would make sense to check for VAAPI acceleration and if enabled default to "VAAPI bob" or one of the other two?