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 - noggin - 2016-02-17

(2016-02-16, 09:03)scf2k Wrote:
(2016-02-16, 00:02)fritsch Wrote: mediainfo or I am not interested

(2016-02-16, 00:56)noggin Wrote: Are they 8 or 10 bit? Are they 4:2:2 ? Are they interlaced ?

ProRes will rely entirely on CPU for decoding (there isn't a VAAPI ProRes implementation), though not sure if VAAPI rendering will deinterlace.

one http://pastebin.com/HiUiFi1r
two http://pastebin.com/VwqqzEYi
three http://pastebin.com/zecZ9s6Z

log http://pastebin.com/ssa629c4

Two may be a bit hopeful - it's 330Mbs 4:4:4, but one and three are 4:2:2 at sensible bitrates for ProRes 4:2:2.

As fritsch says, and as I suspect you realise, these will only be played back with CPU decode, and if the fffmpeg implementation is single-threaded it will require a pretty high spec CPU. From memory the ffmbc implementation of ProRes was a bit better than ffmpeg at one point, but I suspect the ffmbc stuff has been folded back into ffmpeg now. (Same is true for w3fdif and frame rate conversion code I hope. There's a not-terrible frame rate converter in ffmbc based on BBC work in the 80s. It's not Alchemist, but it is a lot better than frame drop/dupe)

I use ProRes 4:2:2 HQ 1080/50i a lot for my 'day job' and have no major issues with it in Quicktime player on a Quad Core i7 Macbook Pro (though no deinterlacing) and it plays back fine over a Thunderbolt HD-SDI/HDMI output device.

Not sure I've ever had much success with 'pro' codecs (ProRes, DNXHD, AVC Intra or DVC Pro HD) in Kodi though - I tend to transcode everything to 4:2:0 H264 if I want to play it in 'consumer' devices.


RE: New Era: VAAPI with EGL interoperation - fritsch - 2016-02-17

(2016-02-17, 15:54)movi Wrote: Hi

Just a simple question for those of us not using openelec and ubuntu, has all of this found it's way into upstream?

Yes - everything is in kodi v17 git repo. The drivers you need to search yourself. kernel (with the non upstream color range patch) you need to build yourself of course.


RE: New Era: VAAPI with EGL interoperation - incubus - 2016-02-17

(2016-02-17, 16:43)fritsch Wrote: Yes - everything is in kodi v17 git repo.

For ubuntu on braswell machines, is it still required to use FernetMenta ppa or xbmc-nightly ppa should be ok?
My guess would be yes for H.265 hw decoding...


RE: New Era: VAAPI with EGL interoperation - fritsch - 2016-02-17

No. All that code is pushed into kodi v17 branch.

You need the updated vaapi drivers / intel xorg drivers / modern kernel separately.


RE: New Era: VAAPI with EGL interoperation - incubus - 2016-02-17

In the case it was already working with FernetMenta ppa (as per the 1st post) a switch to xbmc-nightly ppa should not break it, right ?


RE: New Era: VAAPI with EGL interoperation - fritsch - 2016-02-17

(2016-02-17, 18:43)incubus Wrote: In the case it was already working with FernetMenta ppa (as per the 1st post) a switch to xbmc-nightly ppa should not break it, right ?

Yes.


New Era: VAAPI with EGL interoperation - VirtualRain - 2016-02-17

(2016-02-17, 10:44)scf2k Wrote:
(2016-02-17, 09:51)VirtualRain Wrote: Refresh rate changes are not handshaking properly between my Mac Mini and AVR, (I need to unplug-replug the HDMI cable on every refresh rate change to get a signal)

You have this in EVERY change? There is a bug in intel driver which is not fixed yet. It makes handshakes to fail, but not always in my case.

I don't know. My workaround of running the GUI at 23.98 eliminates the need to change refresh rate on 99% of my content. It fails to Handshake on the odd video that's not 23.98.

Is there anything I can do to force Kodi GUI to 23.98 after booting without diving into the settings menu?


RE: New Era: VAAPI with EGL interoperation - incubus - 2016-02-17

Good! Many thanks fritsch!


RE: New Era: VAAPI with EGL interoperation - fritsch - 2016-02-17

(2016-02-17, 18:46)VirtualRain Wrote:
(2016-02-17, 10:44)scf2k Wrote:
(2016-02-17, 09:51)VirtualRain Wrote: Refresh rate changes are not handshaking properly between my Mac Mini and AVR, (I need to unplug-replug the HDMI cable on every refresh rate change to get a signal)

You have this in EVERY change? There is a bug in intel driver which is not fixed yet. It makes handshakes to fail, but not always in my case.

I don't know. My workaround of running the GUI at 23.98 eliminates the need to change refresh rate on 99% of my content. It fails to Handshake on the odd video that's not 23.98.

Is there anything I can do to force Kodi GUI to 23.98 after booting without diving into the settings menu?

DISPLAY=:0 /usr/lib/kodi/kodi-xrandr --mode 0xWTF <- whatever your 23.98 mode is ...


New Era: VAAPI with EGL interoperation - VirtualRain - 2016-02-17

(2016-02-17, 18:48)fritsch Wrote:
(2016-02-17, 18:46)VirtualRain Wrote:
(2016-02-17, 10:44)scf2k Wrote: You have this in EVERY change? There is a bug in intel driver which is not fixed yet. It makes handshakes to fail, but not always in my case.

I don't know. My workaround of running the GUI at 23.98 eliminates the need to change refresh rate on 99% of my content. It fails to Handshake on the odd video that's not 23.98.

Is there anything I can do to force Kodi GUI to 23.98 after booting without diving into the settings menu?

DISPLAY=:0 /usr/lib/kodi/kodi-xrandr --mode 0xWTF <- whatever your 23.98 mode is ...

Hmmm... Thanks, but I'm guessing this is going to cause a failed refresh rate change/handshake on boot. Currently, after a restart I go into settings, select 23.98 for GUI which causes a failed refresh rate change. I then pull/replug the HDMI to get a signal and I'm good to go until a restart. I gather this is still going to require an HDMI cord pull. I'm trying to find a solution that doesn't require my lazy ass to get off the couch Smile


RE: New Era: VAAPI with EGL interoperation - fritsch - 2016-02-17

Fix the cause of the problem ... not its symptomes -> bugs.freedesktop.org


RE: New Era: VAAPI with EGL interoperation - jjslegacy - 2016-02-17

Why do you have to change refresh rate each boot? It's a saved setting. What am I missing?


RE: New Era: VAAPI with EGL interoperation - scf2k - 2016-02-17

(2016-02-17, 18:57)VirtualRain Wrote: Hmmm... Thanks, but I'm guessing this is going to cause a failed refresh rate change/handshake on boot. Currently, after a restart I go into settings, select 23.98 for GUI which causes a failed refresh rate change. I then pull/replug the HDMI to get a signal and I'm good to go until a restart. I gather this is still going to require an HDMI cord pull. I'm trying to find a solution that doesn't require my lazy ass to get off the couch Smile

In my case switching source on AVR to something else and back helps restoring the signal.


RE: New Era: VAAPI with EGL interoperation - scf2k - 2016-02-17

(2016-02-17, 16:41)noggin Wrote: Two may be a bit hopeful - it's 330Mbs 4:4:4, but one and three are 4:2:2 at sensible bitrates for ProRes 4:2:2.

As fritsch says, and as I suspect you realise, these will only be played back with CPU decode, and if the fffmpeg implementation is single-threaded it will require a pretty high spec CPU. From memory the ffmbc implementation of ProRes was a bit better than ffmpeg at one point, but I suspect the ffmbc stuff has been folded back into ffmpeg now. (Same is true for w3fdif and frame rate conversion code I hope. There's a not-terrible frame rate converter in ffmbc based on BBC work in the 80s. It's not Alchemist, but it is a lot better than frame drop/dupe)

I use ProRes 4:2:2 HQ 1080/50i a lot for my 'day job' and have no major issues with it in Quicktime player on a Quad Core i7 Macbook Pro (though no deinterlacing) and it plays back fine over a Thunderbolt HD-SDI/HDMI output device.

Not sure I've ever had much success with 'pro' codecs (ProRes, DNXHD, AVC Intra or DVC Pro HD) in Kodi though - I tend to transcode everything to 4:2:0 H264 if I want to play it in 'consumer' devices.

Thanks for your detailed reply. Is the main problem with apple codecs is that implementation is not optimised? Or codec itself is that advanced that requires powerful hardware? I guess I'll just encode with H264/H265 high bitrate and it will play flawlessly then.


New Era: VAAPI with EGL interoperation - VirtualRain - 2016-02-17

(2016-02-17, 18:58)fritsch Wrote: Fix the cause of the problem ... not its symptomes -> bugs.freedesktop.org

Filed a bug months ago.

(2016-02-17, 19:18)jjslegacy Wrote: Why do you have to change refresh rate each boot? It's a saved setting. What am I missing?

It's not saving this setting for me. Sad Resets to 60Hz on a reboot.