You are not logged in.

#1 2014-09-26 09:44:27

Povo
Member
Registered: 2014-03-21
Posts: 4

[SOLVED] VA-API not working properly

Hi all,

I am unable to get VA-API working properly for me. I have just installed Arch again after a break and I had VA-API working many times before.

System:
Intel i7 4700MQ
Intel HD Graphics 4600
NVidia GeForce GTX760M
8 GB RAM

My problem is that I am experiencing stuttering in VLC when playing h264 videos.

vainfo output:

[povilas@MSi ~]$ vainfo
libva info: VA-API version 0.35.1
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_35
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.35 (libva 1.3.1)
vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 1.3.2
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
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileNone                   :	VAEntrypointVideoProc
      VAProfileJPEGBaseline           :	VAEntrypointVLD

I don't remember seeing messages like "libva info: va_openDriver() returns 0" in vainfo before so something must be broken right?

VA-API is enabled in VLC.

Output from VLC:

[povilas@MSi Downloads]$ vlc test_vid.mp4 
VLC media player 2.1.5 Rincewind (revision 2.1.4-49-gdab6cb5)
[0x151d118] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
libva info: VA-API version 0.35.1
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_35
libva info: va_openDriver() returns 0
[0x7f9c75207ad8] avcodec decoder: Using VA API version 0.35 for hardware decoding.
libva info: VA-API version 0.35.1
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_35
libva info: va_openDriver() returns 0
[0x7f9c75207ad8] avcodec decoder: Using VA API version 0.35 for hardware decoding.
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
[0x7f9c50001248] main vout display error: Failed to resize display
[0x7f9c6c000f68] access_http access error: error: HTTP/1.1 403 Forbidden
[0x7f9c6c000f68] access_http access error: error: HTTP/1.1 403 Forbidden
[0x7f9c6c000f68] access_mms access error: error: HTTP/1.1 400 Invalid Request
[0x7f9c6c000958] main demux meta error: no suitable access module for `http://services.tvrage.com/feeds/search.php?show=test_vid'

Again, the same libva info is shown.

I have installed:
libva 1.3.1-2
libva-intel-driver 1.3.2-1
xf86-video-intel 2.99.916-2
intel-dri 10.2.8-1
lib32-intel-dri 10.2.8-1
ffmpeg 1:2.4.1-1


Any ideas what the problem is?

Last edited by Povo (2014-10-01 11:22:34)

Offline

#2 2014-09-26 10:03:32

Gusar
Member
Registered: 2009-08-25
Posts: 3,607

Re: [SOLVED] VA-API not working properly

Returning 0 is a *good* thing, it means things loaded fine. Returning anything but 0 would be bad. So vaapi itself is working, the issue must be in VLC. This line does not look good:

[0x7f9c50001248] main vout display error: Failed to resize display

but I'm not familiar enough with VLC to know what it means. Which video output did you configure VLC to use? Try different ones.

Also, VLC still copies decoded frames back into system ram, eliminating a big part of the usefulness of hardware decoding (low resource usage). VLC 2.2 will stop doing that for VDPAU, no idea about VAAPI. I suggest you try mpv instead - "mpv --hwdec=vaapi --vo=vaapi" or "mpv --hwdec=vaapi --vo=opengl-hq"

Last edited by Gusar (2014-09-26 10:06:45)

Offline

#3 2014-09-26 16:35:30

Povo
Member
Registered: 2014-03-21
Posts: 4

Re: [SOLVED] VA-API not working properly

Thanks a lot.

The issues were indeed caused by VLC.

I installed cmplayer with mpv and everything works great.

EDIT: I compiled the latest VLC from git and it seems to work good too. In hardware acceleration options there are 2 options; VA-API with X11 or VA-API with DRM. I presume the DRM option allows to show video without copying the frames back into RAM?

Last edited by Povo (2014-09-26 16:50:48)

Offline

#4 2014-09-26 17:27:06

Gusar
Member
Registered: 2009-08-25
Posts: 3,607

Re: [SOLVED] VA-API not working properly

Povo wrote:

I presume the DRM option allows to show video without copying the frames back into RAM?

Hmm, no idea. Not necessarily. Try both options and observe CPU usage.

Edit: A simple google query and I found the answer: https://forum.videolan.org/viewtopic.php?f=13&t=119760 - the X11 or DRM options aren't about copying into system ram, VLC will do that in any case. What's needed is an option for VAAPI rendering, there's a bug open but not much activity - https://trac.videolan.org/vlc/ticket/7405

Last edited by Gusar (2014-09-26 20:16:39)

Offline

Board footer

Powered by FluxBB