Monday, December 22, 2014

Install libva-intel-driver to get HW acceleration of VLC player enabled

Today I installed Fedora 21 and updated to latest after adding RPMFusion repo.
However when I played a HD video using VLC player, it seemed that HW acceleration in VLC didn't work.
I executed vainfo command to check the  vaapi status and got some error messages.

[root@student ~]# vainfo 
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 0.36.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

After searching google for a solution, I found that installing "libva-intel-driver" package fixes the issue.

[root@student ~]# vainfo 
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 0.36.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_36
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.36 (libva 1.4.1)
vainfo: Driver version: Intel i965 driver 
for Intel(R) Haswell Desktop - 1.4.1
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
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice

Now VLC player uses HW acceleration and the CPU utilization is well under 10%  when a HD video is played. 
I tried selecting "VA-API video decoder via X11" and "VA-API video decoder via DRM" options available under "Hardware-accelerated decoding" in "Input & Codecs Settings" of VLC. It seemed the CPU utilization is almost same for both the methods.

No comments:

Post a Comment