Page 1 of 1

UHD H.264/H.265 and Intel VAAPI performance problem

Posted: 04 Feb 2016 17:17
by SaintGermain
Hello,

I'm trying to play UHD videos (H.265 or H.264 encoded) with VLC on an Intel Skylake (i3-6320) under Debian Stable, and I have some performance problem
I have tried the latest VLC version from Github and with FFmpeg v2.8.6 (I also tried with libavcodec56 6:11.4-1~deb8u1, which is the included version from Debian stable).

For H.264 videos, hardware acceleration is working (I got the message "Using Intel i965 driver for Intel(R) Skylake - 1.6.2 for hardware decoding"), but CPU usage is around 80% and video is stuttering (compared to mpv which has a CPU usage of 30% and which is not stuttering).
For H.265 videos, it seems that hardware acceleration is not working (no message that it is using i965 driver) and I almost cannot play the video (very choppy). With mpv, I have no problem (CPU usage around 30%, and video are OK).

Here is the H.264 video I am using : http://demo-uhd3d.com/fiche.php?cat=uhd&id=111
Here is the H.265 video I am using : http://demo-uhd3d.com/fiche.php?cat=uhd&id=101

Are these problems already known by the VLC team ?
Is there something I can do to help ?

Re: UHD H.264/H.265 and Intel VAAPI performance problem

Posted: 04 Feb 2016 17:50
by Rémi Denis-Courmont
HEVC/H.265 with VA-API is not supported in VLC so far. Patch welcome.

Re: UHD H.264/H.265 and Intel VAAPI performance problem

Posted: 04 Feb 2016 17:53
by SaintGermain
Thanks for the clarification. I however don't have the necessary skills to code a patch.

Any idea why H.264 UHD videos are stuttering ?

Re: UHD H.264/H.265 and Intel VAAPI performance problem

Posted: 09 Mar 2017 17:18
by goaliebob99
This explains why I cant playback NASA UHD and other broadcast UHD content. It's HVEC encoded. I don't get why the developers are saying the player is UHD capable when it isnt. 99 percent of the UHD content is HVEC encoded. Anyone who wants to use a working player, POT player works for all UHD content including HVEC encoded content. A major gaping hole in VLC both on the linux and windows platform.

Re: UHD H.264/H.265 and Intel VAAPI performance problem

Posted: 09 Mar 2017 21:00
by Rémi Denis-Courmont
UHD was working fine on VDPAU at the time this was posted.

Re: UHD H.264/H.265 and Intel VAAPI performance problem

Posted: 15 Mar 2017 20:05
by phk
Hi,

I'm wondering if HEVC should work now. According to these commist it should
http://git.videolan.org/?p=vlc.git;a=co ... 3fde13462e
http://git.videolan.org/?p=vlc.git;a=co ... 7fbe8353f8

However it seems vaapi is not used when trying to play HEVC video streams :(

Re: UHD H.264/H.265 and Intel VAAPI performance problem

Posted: 16 Mar 2017 09:10
by Rémi Denis-Courmont
You need a recent version of VAAPI, and a recent version of VLC compiled against that recent version of VAAPI. And then you need driver and hardware support.

Re: UHD H.264/H.265 and Intel VAAPI performance problem

Posted: 17 Mar 2017 14:49
by phk
Hi Rémi!

Thanks for your answer.
I'm on Ubuntu 16.04 and I included the vlc master-daily PPA, so both should be up to date.
It seems like I'm using the right HW and als the libva Version is correct.

When opening h264 content I see that vlc opens vaapi, but for hevc content there is no such console message.

Code: Select all

libva info: VA-API version 0.39.0 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 vainfo: VA-API version: 0.39 (libva 1.7.0) vainfo: Driver version: Intel i965 driver for Intel(R) CherryView - 1.7.0 vainfo: Supported profile and entrypoints VAProfileMPEG2Simple : VAEntrypointVLD VAProfileMPEG2Simple : VAEntrypointEncSlice VAProfileMPEG2Main : VAEntrypointVLD VAProfileMPEG2Main : VAEntrypointEncSlice VAProfileH264ConstrainedBaseline: VAEntrypointVLD VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264Main : VAEntrypointVLD VAProfileH264Main : VAEntrypointEncSlice VAProfileH264High : VAEntrypointVLD VAProfileH264High : VAEntrypointEncSlice VAProfileH264MultiviewHigh : VAEntrypointVLD VAProfileH264MultiviewHigh : VAEntrypointEncSlice VAProfileH264StereoHigh : VAEntrypointVLD VAProfileH264StereoHigh : VAEntrypointEncSlice VAProfileVC1Simple : VAEntrypointVLD VAProfileVC1Main : VAEntrypointVLD VAProfileVC1Advanced : VAEntrypointVLD VAProfileNone : VAEntrypointVideoProc VAProfileJPEGBaseline : VAEntrypointVLD VAProfileJPEGBaseline : VAEntrypointEncPicture VAProfileVP8Version0_3 : VAEntrypointVLD VAProfileVP8Version0_3 : VAEntrypointEncSlice VAProfileHEVCMain : VAEntrypointVLD

Re: UHD H.264/H.265 and Intel VAAPI performance problem

Posted: 18 Mar 2017 15:56
by Rémi Denis-Courmont
So either your VLC build or your libavcodec does not support HEVC hardware acceleration. You need to update.

Re: UHD H.264/H.265 and Intel VAAPI performance problem

Posted: 19 Mar 2017 22:46
by phk
Hi Rémi,

I tried to compile ffmpeg with hevc vaapi hw decoding support, but it seems hevc_vaapi is only available as an Encoder not as a Decoder like h264_vaapi is.
So I'm wondering what configure settings would enable hevc vaapi hw decoding in ffmpeg.

Re: UHD H.264/H.265 and Intel VAAPI performance problem

Posted: 31 Mar 2017 21:21
by phk
ok, problem solved, the stream I captured via satellite (ASTRA UHD TEST) and it's 10-Bit HEVC.
My hardware however only supports 8-Bit HEVC.

Would it be feasable somehow to drop the 2 bits of every pixel and get HW decoding working by loosing colorspace resolution?

Re: UHD H.264/H.265 and Intel VAAPI performance problem

Posted: 10 May 2017 22:08
by McMuffins4EVER
ok, problem solved, the stream I captured via satellite (ASTRA UHD TEST) and it's 10-Bit HEVC.
My hardware however only supports 8-Bit HEVC.

Would it be feasable somehow to drop the 2 bits of every pixel and get HW decoding working by loosing colorspace resolution?
In Windows, Intel updated the drivers to allow Skylake to handle 10-bit by using the EUs for extra horsepower. I don't think they have done the same in Linux, but you can certainly ask them to.