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 - atcusb - 2016-08-09

Thanks Fritsch, I saw comments around the removal of Intel EGL drivers and jumped to the wrong conclusion. I then panicked that my next apt-get exercise that I was just about to upgrade, was going to remove EGL from my beebox....


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

Hi (again)! I just want to see if I got it all right now. =)

I use OpenELEC 6.0.398-Intel_EGL and hasn't updated to OpenELEC 7.x and therefore also not Kodi 16. When I asked about a EGL-version based on Kodi 16 I got the answer Kodi 17 was "the shit" and you pointed to some download server with EGL-version of Kodi 17.

Am I correct that all your nice work are built in to the main OpenELEC 8.x/Kodi 17 releases (nightlies) now? If I still want the 4K on a Braswell that's what I need to install?

Thanks.

/Söder


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

Yes. Take care of xrandr settings.


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

(2016-08-10, 10:48)fritsch Wrote: Yes. Take care of xrandr settings.

Is that since it's moved to the main Kodi 17 build? I think that auto start feature wasn't needed after a while in your custom builds?

BTW, where do I find the OpenELEC nightly builds?

EDIT: Also, where can I find the older versions like OpenELEC 6.0.398-Intel_EGL, if I need to go back to the working version I got now.

/Söder


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

Do your research, please. This is no support Hotline.


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

(2016-08-10, 12:55)fritsch Wrote: Do your research, please. This is no support Hotline.

Of course not, but I find it very hard to find old URL's to download pages, since there's almost 300 pages.

I hope I can get some help finding these.



EDIT: I found OpenELEC-Generic.x86_64-6.0.398-Intel_EGL.img at http://kodi.wiki/view/Chromebox#OS_and_Kodi_Installation
and https://dl.dropboxusercontent.com/u/98309225/OpenELEC-Generic.x86_64-6.0.398-Intel_EGL.tar

Also, I've been away from all this kind of HTPC tech talk (since I've become a father) and during that period there is LibreELEC and I don't understand if OE is no more or not..

/Söder


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

Fritisch, can you explain how I should interpret this setting:

Quote:Adjust display refresh rate to match video: On Start / Stop

In my imagination this should mean that when my video is 1080i Kodi is outputting 1080i to the TV. However when I press "info" on my Samsung TV it keeps showing: 4K@60Hz.
Is there something wrong in my set-up? Or do I miss the point of this setting?


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

1) kodi never switches down only up, so not all for you.
2) kodi only outputs progressive, our nice deinterlacers are used to accomplish that.
3) check the thread where I suggested to run kodi in 1080 cause of our inferior gui scaler.


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

I think I messed up 2 things:

1: Adjustment of refreshrate (which is done, checked it during watching a bluray, TV report 4K@24P (prob rounded up, because kodi says 23,9..)
2. Adjustment of resolution (Kodi runs on 4K and all content seems to be adjusted to this resolution)

Going to investigate your suggestion on 1080.


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

(2016-07-03, 16:21)Sunflux Wrote: Meh. Not doing at ALL well with the July 1st Milhouse LE build. Getting frequent dropped frames on simple videos. Using a HP Chromebox. All VAAPI options enabled. Adjust refresh rate enabled. Sync audio/video disabled since it should not be needed on this hardware. Scaling to Auto, delinterlacing set off.

Watching a [email protected] video at 1080p... and I can watch the VSyncOff number start at like -15 and over the next 30 seconds work its way down to 0, and then I'll have 1-5 dropped frames, and the number will reset to like -15 and do it all over again. And then to top it off, I'll get random 5 second periods with massive dropped frames like (70-100). I can play those segments over again and they'll be fine.

Feeling like I should've stuck with v15.... sure, I had to reboot it every couple of days, but at least it could play 720p videos without dropping a single frame!

(2016-07-04, 13:15)Sunflux Wrote: 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)
(...)
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.

I have exactly the same problems (25p and 50i/p are unwatchable too) with kodi builds after 15.2.
The 6.0.398-Intel_EGL build is the last that plays fine.

System: Intel NUC5CPYH, 8GB RAM, SAMSUNG F series

File info:
Code:
20:18:40 T:139730083624704   DEBUG: ffmpeg[7F1571FFB700]: Probing matroska,webm score:100 size:2048
20:18:40 T:139730083624704   DEBUG: ffmpeg[7F1571FFB700]: Format matroska,webm probed with size=2048 and score=100
20:18:40 T:139730083624704   DEBUG: Open - probing detected format [matroska,webm]
20:18:40 T:139730083624704   DEBUG: ffmpeg[7F1571FFB700]: st:0 removing common factor 1000000 from timebase
20:18:40 T:139730083624704   DEBUG: ffmpeg[7F1571FFB700]: st:1 removing common factor 1000000 from timebase
20:18:40 T:139730083624704   DEBUG: Open - avformat_find_stream_info starting
20:18:40 T:139730083624704   DEBUG: ffmpeg[7F1571FFB700]: [matroska,webm] Before avformat_find_stream_info() pos: 5607 bytes read:32768 seeks:0
20:18:40 T:139730083624704   DEBUG: ffmpeg[7F1571FFB700]: [h264] no picture
20:18:40 T:139730083624704   DEBUG: ffmpeg[7F1571FFB700]: [matroska,webm] All info found
20:18:40 T:139730083624704   DEBUG: ffmpeg[7F1571FFB700]: [matroska,webm] 0: start_time: 0.000 duration: -9223372036854.775
20:18:40 T:139730083624704   DEBUG: ffmpeg[7F1571FFB700]: [matroska,webm] 1: start_time: 0.000 duration: -9223372036854.775
20:18:40 T:139730083624704   DEBUG: ffmpeg[7F1571FFB700]: [matroska,webm] stream: start_time: 0.000 duration: 2535.648 bitrate=981 kb/s
20:18:40 T:139730083624704   DEBUG: ffmpeg[7F1571FFB700]: [matroska,webm] After avformat_find_stream_info() pos: 12818 bytes read:32768 seeks:0 frames:12
20:18:40 T:139730083624704   DEBUG: Open - av_find_stream_info finished
20:18:40 T:139730083624704    INFO: ffmpeg[7F1571FFB700]: Input #0, matroska,webm, from '/var/media/Netzlaufwerk/Testfile.mkv':
20:18:40 T:139730083624704    INFO: ffmpeg[7F1571FFB700]:   Metadata:
20:18:40 T:139730083624704    INFO: ffmpeg[7F1571FFB700]:     title           : Testfile
20:18:40 T:139730083624704    INFO: ffmpeg[7F1571FFB700]:     encoder         : libebml v1.2.2 + libmatroska v1.3.0
20:18:40 T:139730083624704    INFO: ffmpeg[7F1571FFB700]:     creation_time   : 2016-07-16 01:29:08
20:18:40 T:139730083624704    INFO: ffmpeg[7F1571FFB700]:   Duration: 00:42:15.65, start: 0.000000, bitrate: 981 kb/s
20:18:40 T:139730083624704    INFO: ffmpeg[7F1571FFB700]:     Stream #0:0(ger), 4, 1/1000: Video: h264 (High), yuv420p, 720x404 [SAR 1:1 DAR 180:101], 25 fps, 25 tbr, 1k tbn, 50 tbc (default) (forced)
20:18:40 T:139730083624704    INFO: ffmpeg[7F1571FFB700]:     Metadata:
20:18:40 T:139730083624704    INFO: ffmpeg[7F1571FFB700]:       title           : Testfile
20:18:40 T:139730083624704    INFO: ffmpeg[7F1571FFB700]:     Stream #0:1(ger), 8, 1/1000: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s (default) (forced)


These are the differences in logfile:

Kodi 17.0-BETA1:
Code:
Starting Kodi (17.0-BETA1 Git:b6f74c3). Platform: Linux x86 64-bit
17:42:58   8.555681 T:139949710338112  NOTICE: Using Release Kodi x64 build
17:42:58   8.555707 T:139949710338112  NOTICE: Kodi compiled Aug  9 2016 by GCC 5.4.0 for Linux x86 64-bit version 4.7.0 (263936)
17:42:58   8.555878 T:139949710338112  NOTICE: Running on LibreELEC (Milhouse) - Version: devel-20160809211949-#0809-gf808232 [Build #0809] 8.0, kernel: Linux x86 64-bit version 4.7.0
17:42:58   8.555901 T:139949710338112  NOTICE: FFmpeg version: 3.1.2
17:42:58   8.555922 T:139949710338112  NOTICE: WARNING: unsupported ffmpeg version detected
17:42:58   8.555945 T:139949710338112  NOTICE: Host CPU: Intel(R) Celeron(R) CPU N3050 @ 1.60GHz, 2 cores available
...
17:49:28 398.313629 T:139948531369728   DEBUG: CVideoPlayerVideo::CalcDropRequirement - dropped in decoder, lateframes: 4, Bufferlevel: 3, dropped: 1
17:49:28 398.792267 T:139948531369728   DEBUG: Previous line repeats 3 times.
17:49:28 398.792328 T:139948531369728   DEBUG: CVideoPlayerVideo::CalcDropRequirement - dropped in decoder, lateframes: 5, Bufferlevel: 3, dropped: 1
17:49:29 399.351837 T:139948531369728   DEBUG: Previous line repeats 4 times.
17:49:29 399.351959 T:139948531369728   DEBUG: CVideoPlayerVideo::CalcDropRequirement - dropped in decoder, lateframes: 6, Bufferlevel: 3, dropped: 1
17:49:29 400.071289 T:139948531369728   DEBUG: Previous line repeats 7 times.
17:49:29 400.071350 T:139948531369728   DEBUG: CVideoPlayerVideo::CalcDropRequirement - dropped in decoder, lateframes: 7, Bufferlevel: 3, dropped: 1
17:49:30 400.712463 T:139948531369728   DEBUG: Previous line repeats 6 times.
17:49:30 400.712616 T:139948531369728   DEBUG: CVideoPlayerVideo::CalcDropRequirement - dropped in decoder, lateframes: 8, Bufferlevel: 3, dropped: 1
17:49:31 401.431305 T:139948531369728   DEBUG: Previous line repeats 9 times.
17:49:31 401.431366 T:139948531369728   DEBUG: CVideoPlayerVideo::CalcDropRequirement - dropped in decoder, lateframes: 9, Bufferlevel: 3, dropped: 1
17:49:32 402.391693 T:139948531369728   DEBUG: Previous line repeats 10 times.

Kodi 15.2:
Code:
20:18:28 T:139730843793280  NOTICE: Starting Kodi (15.2 Git:02e7013). Platform: Linux x86 64-bit
20:18:28 T:139730843793280  NOTICE: Using Release Kodi x64 build
20:18:28 T:139730843793280  NOTICE: Kodi compiled Mar  1 2016 by GCC 4.9.3 for Linux x86 64-bit version 4.3.0 (262912)
20:18:28 T:139730843793280  NOTICE: Running on OpenELEC (community) - Version: 6.0.398-Intel_EGL, kernel: Linux x86 64-bit version 4.3.0
20:18:28 T:139730843793280  NOTICE: FFmpeg version: 2.8.1
20:18:28 T:139730843793280  NOTICE: WARNING: unsupported ffmpeg version detected
20:18:28 T:139730843793280  NOTICE: Host CPU: Intel(R) Celeron(R) CPU N3050 @ 1.60GHz, 2 cores available
...
20:23:44 T:139730066839296   DEBUG: CDVDClock::Discontinuity - CDVDPlayerAudio::HandleSyncError2 - was:303957337.893749, should be:303947230.437822, error:-10107.455926
20:28:51 T:139730066839296   DEBUG: CDVDClock::Discontinuity - CDVDPlayerAudio::HandleSyncError2 - was:610773000.167822, should be:610762835.413570, error:-10164.754253
20:34:04 T:139730066839296   DEBUG: CDVDClock::Discontinuity - CDVDPlayerAudio::HandleSyncError2 - was:923604976.045570, should be:923594786.583376, error:-10189.462193
20:39:11 T:139730066839296   DEBUG: CDVDClock::Discontinuity - CDVDPlayerAudio::HandleSyncError2 - was:1230420891.374377, should be:1230410820.793140, error:-10070.581237
20:44:17 T:139730066839296   DEBUG: CDVDClock::Discontinuity - CDVDPlayerAudio::HandleSyncError2 - was:1537237015.551139, should be:1537226807.253269, error:-10208.297871
20:49:30 T:139730066839296   DEBUG: CDVDClock::Discontinuity - CDVDPlayerAudio::HandleSyncError2 - was:1850069365.422269, should be:1850059104.002053, error:-10261.420215
20:54:43 T:139730066839296   DEBUG: CDVDClock::Discontinuity - CDVDPlayerAudio::HandleSyncError2 - was:2162901057.189054, should be:2162890976.144506, error:-10081.044548
20:59:44 T:139730066839296   DEBUG: CDVDClock::Discontinuity - CDVDPlayerAudio::HandleSyncError2 - was:2463700956.394506, should be:2463690948.238086, error:-10008.156420
...

So there are surely sync issues in that file (and thousand others) and the actual method to sync those leads to massive video stuttering. On 6.0.398-Intel_EGL there is no noticable stuttering.

And for the record LibreELEC 7.0.2 - Kodi 16.1:
Code:
21:11:38 T:139912193603648  NOTICE: Starting Kodi (16.1 Git:c327c53). Platform: Linux x86 64-bit
21:11:38 T:139912193603648  NOTICE: Using Release Kodi x64 build
21:11:38 T:139912193603648  NOTICE: Kodi compiled Jun 22 2016 by GCC 5.3.0 for Linux x86 64-bit version 4.4.13 (263181)
21:11:38 T:139912193603648  NOTICE: Running on LibreELEC (official) - Version: 7.0.2, kernel: Linux x86 64-bit version 4.4.13
21:11:38 T:139912193603648  NOTICE: FFmpeg version: 2.8.6
21:11:38 T:139912193603648  NOTICE: WARNING: unsupported ffmpeg version detected
21:11:38 T:139912193603648  NOTICE: Host CPU: Intel(R) Celeron(R) CPU N3050 @ 1.60GHz, 2 cores available
21:37:24 T:139911210448640   DEBUG: CDVDClock::Discontinuity - CDVDPlayerAudio::HandleSyncError2 - was:1531860314.193594, should be:1531850271.907384, error:-10042.286209
21:37:45 T:139911478884096    INFO: Previous line repeats 2 times.
21:37:45 T:139911478884096    INFO: Previous line repeats 1 times.
21:37:45 T:139911478884096    INFO: Previous line repeats 1 times.
21:37:45 T:139911478884096    INFO: Previous line repeats 4 times.
21:37:49 T:139911478884096    INFO: Previous line repeats 5 times.
21:38:39 T:139911478884096    INFO: Previous line repeats 3 times.
21:38:39 T:139911478884096    INFO: Previous line repeats 1 times.
21:38:39 T:139911478884096    INFO: Previous line repeats 4 times.
21:38:42 T:139911478884096    INFO: Previous line repeats 1 times.
21:39:15 T:139911504062208    INFO: Previous line repeats 1 times.
21:39:33 T:139911478884096    INFO: Previous line repeats 27 times.
21:39:33 T:139911478884096    INFO: Previous line repeats 3 times.
21:39:34 T:139911478884096    INFO: Previous line repeats 7 times.
21:39:43 T:139911504062208    INFO: Previous line repeats 7 times.
21:39:45 T:139911504062208    INFO: Previous line repeats 6 times.
21:39:45 T:139911504062208    INFO: Previous line repeats 1 times.
21:39:45 T:139911504062208    INFO: Previous line repeats 1 times.
21:40:25 T:139911478884096    INFO: Previous line repeats 1 times.
21:40:25 T:139911478884096    INFO: Previous line repeats 1 times.
21:40:25 T:139911478884096    INFO: Previous line repeats 1 times.
21:40:26 T:139911478884096    INFO: Previous line repeats 6 times.
21:40:28 T:139911478884096    INFO: Previous line repeats 1 times.
21:41:18 T:139911478884096    INFO: Previous line repeats 1 times.
21:41:18 T:139911109801728    INFO: Previous line repeats 6 times.
21:41:19 T:139911478884096    INFO: Previous line repeats 1 times.
21:42:12 T:139911478884096    INFO: Previous line repeats 1 times.
21:42:12 T:139911478884096    INFO: Previous line repeats 5 times.
21:42:14 T:139911478884096    INFO: Previous line repeats 1 times.
21:42:36 T:139911210448640    INFO: Previous line repeats 1 times.
21:42:36 T:139911210448640   DEBUG: CDVDClock::Discontinuity - CDVDPlayerAudio::HandleSyncError2 - was:1844260614.860384, should be:1844250566.366232, error:-10048.494153

Watchable but fairly far behind 15.2 EGL.
Of course I can post the complete debug log, but these are the parts where the different behavior of CDVDPlayer and CVideoPlayer are visible. Or maybe its a difference in ffmpeg.


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

Please link such a 25p Sample, we want to test. Preferrably Dropbox.


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

I found a sample: http://fritsch.fruehberger.net/samples/sample-stutter-bsw.mkv <- same issue with that one? (Edit: Be careful with the content - I don't know who posted it ... it's nothing for kids)


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

Thank you for your answer.
I'll try step by step over the weekend with your file and try to reproduce it with Big Buck Bunny.
The files I have are all TV episodes with cut out commercials (copyrighted material), so I'm going to transcode BBB to 25fps, demux the file cut the video and audio and remux it.
I think I then have a non copyrighted postable file with the same structure as the others.

I don't know how Kodi tries to keep audio and video in sync. I guess with 15.2 DVDPlayer "slides" the audio and now with 17.0 VideoPlayer drops frames.
Has this method changed in the actual builds? I thought CDVDPlayer/CVideoPlayer was just a name change?

I have no clue why Kodi on Android plays the files without glitches ... I'll investigate that issue further and keep you updated.


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

Android works by luck, it takes another codepath, especially in combination with passthrough it's just hacked together as one cannot trust neither the audio delay nor the video display.

Besides that, we are currently investigating a solution and on my system it fixed the issue: http://sprunge.us/BZJd it is discussed here: https://github.com/xbmc/xbmc/pull/10284


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

(2016-08-13, 13:41)fritsch Wrote: Besides that, we are currently investigating a solution and on my system it fixed the issue: http://sprunge.us/BZJd it is discussed here: https://github.com/xbmc/xbmc/pull/10284

Thank you! That sounds promising! I'll try these patches. LibreElec building already in progress ...
Time to watch "The Strain" on amazon the next hours Tongue