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: New Era: VAAPI with EGL interoperation - Devil-Strike - 2015-12-15

(2015-12-15, 10:36)fritsch Wrote:
(2015-12-15, 10:31)Devil-Strike Wrote: Latest build is shit Tongue , occasional high cpu usage and frame dropping below 17fps on a simple apple trailer on a baytrail j1800 system.

Logs vainfo: http://sprunge.us/YRcC
kodi: http://sprunge.us/VOXN
dmsg: http://sprunge.us/ZPPY

Thx - can be clearly seen in the logfile.

K, dont realy understand the log Smile but you do so hope you can fix this in the future Smile


New Era: VAAPI with EGL interoperation - porkchop999 - 2015-12-15

I have a haswell Mac mini, one thing I have found is if I plug in through the display port with a hdmi adapter refresh rates change perfectly, if I plug straight into the hdmi port they don't change


RE: New Era: VAAPI with EGL interoperation - fritsch - 2015-12-15

(2015-12-15, 11:55)porkchop999 Wrote: I have a haswell Mac mini, one thing I have found is if I plug in through the display port with a hdmi adapter refresh rates change perfectly, if I plug straight into the hdmi port they don't change

Kernel issue. I asked the op poster 20 times to bring it to bugs.freedesktop.org we cannot do anything about it.


RE: New Era: VAAPI with EGL interoperation - gurabli - 2015-12-15

My Braswell box is at the friend now, and I have been asked a questions about Braswell and 3D support: does Braswell and VAAPI EGL build (OE and ppa) supports BD3D - Frame Packing 3D, SBS, OU? I don't care about 3D, but would like to answer and help out some friends.
Thanks!


RE: New Era: VAAPI with EGL interoperation - tovaxxx - 2015-12-15

Hey Guys, the last update (r21606) crashed on my NUC5PPYH. >Error in prepare_sysroot: mount_common: Could not mount /dev/SYSTEM
What can i do? Complete new install? Thanks for help.


RE: New Era: VAAPI with EGL interoperation - jteeuw - 2015-12-15

(2015-12-14, 22:50)fritsch Wrote: Yeah - I said before: kernel, mesa, vaapi, intel gfx drivers.

Edit: Mesa 11.0.7 is out with some relevant fixes.

What is the best way to update the mesa, vaapi, intel gfx drivers


RE: New Era: VAAPI with EGL interoperation - fritsch - 2015-12-15

(2015-12-15, 14:03)jteeuw Wrote:
(2015-12-14, 22:50)fritsch Wrote: Yeah - I said before: kernel, mesa, vaapi, intel gfx drivers.

Edit: Mesa 11.0.7 is out with some relevant fixes.

What is the best way to update the mesa, vaapi, intel gfx drivers

None - for ubuntu endusers ... none without bringing the system at risk by e.g. adding oibaf ppa which has all sorts of bumery.


RE: New Era: VAAPI with EGL interoperation - jteeuw - 2015-12-15

(2015-12-15, 14:04)fritsch Wrote:
(2015-12-15, 14:03)jteeuw Wrote:
(2015-12-14, 22:50)fritsch Wrote: Yeah - I said before: kernel, mesa, vaapi, intel gfx drivers.

Edit: Mesa 11.0.7 is out with some relevant fixes.

What is the best way to update the mesa, vaapi, intel gfx drivers

None - for ubuntu endusers ... none without bringing the system at risk by e.g. adding oibaf ppa which has all sorts of bumery.

Oke, thanks !


RE: New Era: VAAPI with EGL interoperation - _Spook_ - 2015-12-15

(2015-12-15, 09:51)fritsch Wrote:
(2015-12-15, 00:22)_Spook_ Wrote: Quick question:

3. Color Management
If your TV is limited range. Go to System -> Video Output and choose "Use Limited Range", disable Dithering.
If your TV is full range. Go to System -> Video Output and unselect "Use Limited Range" and enable Dithering with 8 bits.
If your projector is of low quality, use a dithering setting of 6 or 7 bits.

I have an LG 55EG960V 4k OLED TV. My guess would be that it is full range. Should I use option 2 here then?

I have the curved model.

Why do you guess? Just use the testing videos and find out:

Whites: https://dl.dropboxusercontent.com/u/55728161/3-White%20Clipping.mp4
Blacks: https://dl.dropboxusercontent.com/u/55728161/1-Black%20Clipping.mp4

Also make sure that if it does not work - we need DISPLAY=:0 xrandr --verbose from you.

(2015-12-15, 09:52)fritsch Wrote: @mbosner: http://www.lg.com/uk/tvs/lg-55EG960V <- this one or the non curved model?

Will give it a go and see Smile

Still having issues with black screen and pointer only after video playback. Here are the logs:

http://sprunge.us/hHVj
http://sprunge.us/CcGF
http://sprunge.us/iSBR
http://sprunge.us/AgPH

Edit:
And for some reason 4k media doesn't play anymore. Video skips out every few second and audio is way out of sync with audio passthrough.

What is the drawback of not using audio passthrough? Keeps causing OOS issues Sad


New Era: VAAPI with EGL interoperation - VirtualRain - 2015-12-15

(2015-12-15, 11:55)porkchop999 Wrote: I have a haswell Mac mini, one thing I have found is if I plug in through the display port with a hdmi adapter refresh rates change perfectly, if I plug straight into the hdmi port they don't change

Interesting.

Does audio bitstreaming work ok through the DP port or are you using another cable for audio?

What HDMI adapter are you using? Are there HDMI 2.0 adapters out there yet?


RE: New Era: VAAPI with EGL interoperation - porkchop999 - 2015-12-15

Blekin MINI DISPLAYPORT TO HDMI ADAPTER 4K, yes is passes audio through it fine and 4k (up to 30Hz)


RE: New Era: VAAPI with EGL interoperation - onizuka - 2015-12-15

Club3D Mini Displayport 1.2 to HDMI 2.0 UHD (CAC-1170)


RE: New Era: VAAPI with EGL interoperation - un1versal - 2015-12-16

(2015-09-16, 18:15)fritsch Wrote:
(2015-09-16, 17:28)ggp759 Wrote:
(2015-09-16, 15:16)FernetMenta Wrote: the point is that you can't adjust refresh rate to match video to a 100% match.

Ok. Saw you are saying that i should have both options enabled?

No. Sync Playback syncs perfectly the fps to the videoclock. Simplified, whenever we change the front with the backbuffer one fps is displayed. This happens fps count a second. Fully in vsync -> perfect video. Problem here is: If video and audio don't match exactly.

Use case a) The VSync Clock runs at 23.99 fps and not at 23.976 fps -> no problem for video as it is just displayed "a bit" faster -> you won't notice. Cause in perfect vsync 23.99 fps are displayed per second - perfectly matching your screen, just like a clock - always doing: tick, tick, tick e.g. frame, frame, frame - the clock just runs faster as a 23.976 clock would run - no one cares. Problem comes into play, when you have audio. Cause audio and video would go ahead of each other. Therefore one needs to do something when this is happening.

With passthrough audio: we only have two choices drop or dupe and that you can hear very loud if you have bad luck, it makes a famous psssst noise to correct this offset.
Without passthrough audio: We resample a bit and video stays perfectly in sync and you won't even notice anything

=> Reason why you should disable it when you passthrough.

In a perfect world where videos are really exactly 23.976 fps and your refreshrate is really 23.976 hz -> Sync Playback does not harm (even if you passthrough), but it won't be able to help you - as everything is perfect already. And: world is not perfect.

Use case b) You play 59.94 fps content at 60 hz -> vclock "speeds it up" automatically, cause swapBuffers every 1000 / 60.0 ms vs. 1000 / 59.94 ms -> audio needs to be speed up too.
With passthrough: drop samples (ugly, bad experience)
Without passthrough: resample with a factor > 1 - audio will get a little bit higher in tone -> but you won't realize.

Adjust Refreshrate to match video is something else - it tries to find a refreshrate, so that Refreshrate % (modulo) fps == some even non fractional value. 25 fps at 50 hz is fine, 23.976 fps at 23.976 hz is fine. 23.976 at 24.0 hz -> not fine. But with RefClock -> no issue video wise.

So to summarize:
- Use Adjust Refreshrate to match video: good precondition to have the Sync Playback do a nice job afterwards
- Use Adjust Refreshrate to match video: also if you are a passthrough audio user - cause 23.976 fps content + passthrough audio played at 60 hz - won't work without either visual stutter or audio drops.
- Passthrough audio sucks for "perfect playback" as video clock might not match fps exactly, we need to drop / dupe or resync after 200 ms off
- Enable Sync Playback to Display _if_ you don't use passthrough audio as it cares for perfect video while maintaining your audio in sync without you noticing.

Edit: Not covered in here: What happens if you play 24.0 fps content at 60 hz? How would you play 23.976 fps at 60 hz? -> Some wikipedia for the dear user able to read: https://en.wikipedia.org/wiki/Three-two_pull_down

Personally: I don't use passthrough audio at all - I have a 5.1 capable LPCM receiver which I feed directly. Since we have dcadec support - I even can decode DTS-HDMA and have perfect audio also in combination with perfect video.

This is great explanation for sure.

I have a suggestion, since the new videoplayer in v17 master cannot do passthough audio with sync playback to display enabled, how about if you enable passthough then sync playback to display is disabled and user notified and the opposite if you have passthough enabled and enable sync playback to display then same thing would happen.

that is if this is the new way going forward that is and it wont change, because I was wondering why only pcm was coming out the speaker, and only a few minutes ago anaconda mentioned this...

Would that be possible and does it make sense to do so? In an Ideal world users woul read the help text, but as you noted its not an ideal world Big Grin


RE: New Era: VAAPI with EGL interoperation - fritsch - 2015-12-16

(2015-12-16, 07:14)un1versal Wrote:
(2015-09-16, 18:15)fritsch Wrote:
(2015-09-16, 17:28)ggp759 Wrote: Ok. Saw you are saying that i should have both options enabled?

No. Sync Playback syncs perfectly the fps to the videoclock. Simplified, whenever we change the front with the backbuffer one fps is displayed. This happens fps count a second. Fully in vsync -> perfect video. Problem here is: If video and audio don't match exactly.

Use case a) The VSync Clock runs at 23.99 fps and not at 23.976 fps -> no problem for video as it is just displayed "a bit" faster -> you won't notice. Cause in perfect vsync 23.99 fps are displayed per second - perfectly matching your screen, just like a clock - always doing: tick, tick, tick e.g. frame, frame, frame - the clock just runs faster as a 23.976 clock would run - no one cares. Problem comes into play, when you have audio. Cause audio and video would go ahead of each other. Therefore one needs to do something when this is happening.

With passthrough audio: we only have two choices drop or dupe and that you can hear very loud if you have bad luck, it makes a famous psssst noise to correct this offset.
Without passthrough audio: We resample a bit and video stays perfectly in sync and you won't even notice anything

=> Reason why you should disable it when you passthrough.

In a perfect world where videos are really exactly 23.976 fps and your refreshrate is really 23.976 hz -> Sync Playback does not harm (even if you passthrough), but it won't be able to help you - as everything is perfect already. And: world is not perfect.

Use case b) You play 59.94 fps content at 60 hz -> vclock "speeds it up" automatically, cause swapBuffers every 1000 / 60.0 ms vs. 1000 / 59.94 ms -> audio needs to be speed up too.
With passthrough: drop samples (ugly, bad experience)
Without passthrough: resample with a factor > 1 - audio will get a little bit higher in tone -> but you won't realize.

Adjust Refreshrate to match video is something else - it tries to find a refreshrate, so that Refreshrate % (modulo) fps == some even non fractional value. 25 fps at 50 hz is fine, 23.976 fps at 23.976 hz is fine. 23.976 at 24.0 hz -> not fine. But with RefClock -> no issue video wise.

So to summarize:
- Use Adjust Refreshrate to match video: good precondition to have the Sync Playback do a nice job afterwards
- Use Adjust Refreshrate to match video: also if you are a passthrough audio user - cause 23.976 fps content + passthrough audio played at 60 hz - won't work without either visual stutter or audio drops.
- Passthrough audio sucks for "perfect playback" as video clock might not match fps exactly, we need to drop / dupe or resync after 200 ms off
- Enable Sync Playback to Display _if_ you don't use passthrough audio as it cares for perfect video while maintaining your audio in sync without you noticing.

Edit: Not covered in here: What happens if you play 24.0 fps content at 60 hz? How would you play 23.976 fps at 60 hz? -> Some wikipedia for the dear user able to read: https://en.wikipedia.org/wiki/Three-two_pull_down

Personally: I don't use passthrough audio at all - I have a 5.1 capable LPCM receiver which I feed directly. Since we have dcadec support - I even can decode DTS-HDMA and have perfect audio also in combination with perfect video.

This is great explanation for sure.

I have a suggestion, since the new videoplayer in v17 master cannot do passthough audio with sync playback to display enabled, how about if you enable passthough then sync playback to display is disabled and user notified and the opposite if you have passthough enabled and enable sync playback to display then same thing would happen.

that is if this is the new way going forward that is and it wont change, because I was wondering why only pcm was coming out the speaker, and only a few minutes ago anaconda mentioned this...

Would that be possible and does it make sense to do so? In an Ideal world users woul read the help text, but as you noted its not an ideal world Big Grin

The old player also could not do it ... it just pretended it could do ... all it did was: throw frames away (chhhhhehehhh noise, that you could hear) or it duplicated frames which your AVR did not like ... all those suggesteions are no real fixes. We need the pause bursts then no such logic is needed.


RE: New Era: VAAPI with EGL interoperation - FernetMenta - 2015-12-16

Pause bursts won't help. When playing 24Hz material on a 50Hz display, you need to speed up audio by 4%. Not possible with passthrough.