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 - soder - 2016-10-30

(2016-10-30, 22:24)fritsch Wrote: That settings means:

When playing 24p or 23.976 fps content at a 24 or 23.976 hz refreshrate delay the audio by 175 ms as some TVs do special processing, so one needs to compensate for that. This has nothing to do with "Sync Playback to Display" but is a constant offset matching the hardware (tv vs avr) sync differences.

OK, so, what that setting is delaying is the audio, and not the video. That means that if I do use that settings and then set the audio offset to above 0.175s, then it's +/- 0

EDIT:

Also, I'm right now checking my log, and I see that there are some default setting in a default advancedsettings in OpenELEC/LibreELEC..

Code:
22:03:56 T:139690392033344  NOTICE: Contents of special://xbmc/system/advancedsettings.xml are...
                                            <?xml version="1.0" encoding="UTF-8" ?>
                                            <advancedsettings>
                                              <showexitbutton>false</showexitbutton>
                                              <cputempcommand>cputemp</cputempcommand>
                                              <gputempcommand>gputemp</gputempcommand>
                                              <video>
                                                <latency>
                                                  <delay>0</delay>
                                                  <refresh>
                                                    <min>23</min>
                                                    <max>24</max>
                                                    <delay>175</delay>
                                                  </refresh>
                                                </latency>
                                                <busydialogdelayms>750</busydialogdelayms>
                                              </video>
                                              <samba>
                                                <clienttimeout>30</clienttimeout>
                                              </samba>
                                            </advancedsettings>
22:03:56 T:139690392033344  NOTICE: Loaded settings file from special://profile/advancedsettings.xml
22:03:56 T:139690392033344  NOTICE: Contents of special://profile/advancedsettings.xml are...
                                            <?xml version="1.0" encoding="UTF-8" ?>

How does it work if I got my own settings in my own advancedsettings.xml?

/Söder


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

Your settings override the same system settings.


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

(2016-10-30, 23:37)Milhouse Wrote: Your settings override the same system settings.

Great. The problem is that I didn't set the delay to 0 when I was trying without delay. I used the <!--- ----> in my advancedsettings.xml.

The problem was that after a reboot there was a default version that still set my audio to delay 175ms. That's why I always thought that me setting the Audio offset to above 0.175s gave me perfect sync.

Do you know why there is a default delay for 23-24 fps playback in OpenELEC/LibreELEC?

/Söder


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

(2016-10-30, 23:41)soder Wrote: Do you know why there is a default delay for 23-24 fps playback in OpenELEC/LibreELEC?

/Söder

I don't, but maybe @fritsch does - this change pre-dates my involvement with OpenELEC, and unfortunately the commit message is completely useless (which is fairly typical) so it just appears to be one of those random commits that may have made sense at the time but quite possibly no longer does.

With improvements through VideoPlayer in Kodi 17 perhaps this value is no longer needed, although to be honest nobody else has complained.


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

(2016-10-31, 00:36)Milhouse Wrote:
(2016-10-30, 23:41)soder Wrote: Do you know why there is a default delay for 23-24 fps playback in OpenELEC/LibreELEC?

/Söder

I don't, but maybe @fritsch does - this change pre-dates my involvement with OpenELEC, and unfortunately the commit message is completely useless (which is fairly typical) so it just appears to be one of those random commits that may have made sense at the time but quite possibly no longer does.

With improvements through VideoPlayer in Kodi 17 perhaps this value is no longer needed, although to be honest nobody else has complained.

We made a test with some 20 pariticipants and the result was on average 175 ms was what those guys needed. That's why it came into OpenELEC at this time. The commit you see there was not the original commit, but that PR was taken and pushed, the history of it was gone. The original commit was by me, but can't find it at the moment.

Just remember: This fixes a constant offset introduced by HW, it's not a workaround for kodi's sync code or something like that.


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

How come there is a different video latency for different hz btw.

I find it kind of funny that I always had to set my audio offset to ~175ms above (to the right) in Kody, and that has not been because of video lag, but that Kodi been using a default delay of 175ms and I needed to zero that out with the audio offset.

/Söder


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

hi,

i'm having a sound issue, when a movie plays, the sound is like playing at 1/2 the speed.
mostly, this is corrected by shuting down the system instead of a reboot,
but since my last update and schutdown, it stays at 1/2 speed.

thnx,

kevin@HTPC:~$ dpkg -l |grep mesa | pastebinit
http://paste.ubuntu.com/23408028/
kevin@HTPC:~$ DISPLAY=:0 vainfo | pastebinit
libva info: VA-API version 0.39.2
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(nul l)
vaInitialize failed with error code -1 (unknown libva error),exit
U probeert een leeg document te verzenden, afsluiten.
kevin@HTPC:~$ cat ~/.kodi/temp/kodi.log | pastebinit
http://paste.ubuntu.com/23408030/
kevin@HTPC:~$ dmesg | pastebinit
http://paste.ubuntu.com/23408033/
kevin@HTPC:~$ id | pastebinit
http://paste.ubuntu.com/23408034/
kevin@HTPC:~$ amixer | pastebinit
amixer: Mixer attach default error: No such file or directory


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

You did not follow the howto.

Your Kevin user is neither in video nor audio group :-) fix that, please


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

*edit see next post... need more coffee Smile


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

how stupid of me....
now on the right user
kevin@HTPC:~$ clear
kevin@HTPC:~$ sudo usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input kodi
kevin@HTPC:~$ sudo shutdown now
login as: kodi
[email protected]'s password:
Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-45-generic x86_64)

* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
Last login: Mon Oct 31 19:51:08 2016
kodi@HTPC:~$ dpkg -l |grep mesa | pastebinit
http://paste.ubuntu.com/23408093/
kodi@HTPC:~$ 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/23408097/
kodi@HTPC:~$ cat ~/.kodi/temp/kodi.log | pastebinit
http://paste.ubuntu.com/23408098/
kodi@HTPC:~$ dmesg | pastebinit
http://paste.ubuntu.com/23408099/
kodi@HTPC:~$ id | pastebinit
http://paste.ubuntu.com/23408100/
kodi@HTPC:~$ amixer | pastebinit
http://paste.ubuntu.com/23408101/
kodi@HTPC:~$


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

Can you try kernel 4.8 or later from a Ubuntu mainline?


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

did the update, sound is back to normal, thank you thanks alot!

kevin@HTPC:~$ uname -r
4.8.0-040800-generic
kevin@HTPC:~$


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

Yeah. The pain of ultra new hw :-)


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - BigL-New - 2016-11-01

@fritsch - do you know about plans/decisions to have passthrough-colors patch in main kernel? I'v checked and kernel 4.8 doesn't have it :-(


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

It's on me and I am lazy :-) I need to rebase, change it and send it.