You are not logged in.

#1 2015-06-06 12:45:55

Median
Member
Registered: 2011-06-03
Posts: 60

[SOLVED] Faulty video output with mpv/mplayer, vaapi

Hi,

I have a HD6870 with the proprietary catalyst drivers installed, and the packages needed to enable vaapi. The problem I have is that every video application like mpv, mplayer or whatever refuses to give me correct video output with vaapi. mpv for example gives me these errors, depending on filetype:

avi:

  (+) Video --vid=1 (h264)
 (+) Audio --aid=1 (mp3)
libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'xvba'
libva info: Trying to open /usr/lib/dri//xvba_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'xvba'
libva info: Trying to open /usr/lib/dri//xvba_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
Using hardware decoding.
libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'xvba'
libva info: Trying to open /usr/lib/dri//xvba_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
AO: [alsa] 48000Hz stereo 2ch s16
[vaapi] Decoder profile 'VAProfileH264Main' not available.
[ffmpeg/video] h264: decode_slice_header error
[ffmpeg/video] h264: no frame!
Error while decoding frame!
Error using hardware decoding, falling back to software decoding.

mp4:

 (+) Video --vid=1 (*) (h264)
 (+) Audio --aid=1 --alang=eng (*) (aac)
libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'xvba'
libva info: Trying to open /usr/lib/dri//xvba_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'xvba'
libva info: Trying to open /usr/lib/dri//xvba_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
Using hardware decoding.
libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'xvba'
libva info: Trying to open /usr/lib/dri//xvba_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
AO: [alsa] 48000Hz stereo 2ch float
xvba_video: XVBA_CreateDecode(): status 2
[vaapi] vaCreateContext(): unknown libva error
[ffmpeg/video] h264: decode_slice_header error
[ffmpeg/video] h264: no frame!
Error while decoding frame!
Error using hardware decoding, falling back to software decoding.

wmv:

 (+) Video --vid=1 (wmv3)
 (+) Audio --aid=1 --alang=eng (wmav2)
libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'xvba'
libva info: Trying to open /usr/lib/dri//xvba_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'xvba'
libva info: Trying to open /usr/lib/dri//xvba_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
Using hardware decoding.
libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'xvba'
libva info: Trying to open /usr/lib/dri//xvba_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
xvba_video: XVBA_CreateDecode(): status 2
[vaapi] vaCreateContext(): unknown libva error
xvba_video: XVBA_CreateDecode(): status 2
[vaapi] vaCreateContext(): unknown libva error
[ffmpeg/video] wmv3: decoding to AV_PIX_FMT_NONE is not supported.
Could not open codec.
Error initializing hardware decoding, falling back to software decoding.

mpv doesn't crash, it just falls back to software decoding and gives me a grey screen when it's not fullscreen, and when it's fullscreen it tears a lot and flashes random grey stripes everywhere - sound still works fine. Any ideas on what can be at fault here? The only video output that gives me an OK image without tearing or anything else is x11, but it's really slow.

vainfo gives me this:

libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'xvba'
libva info: Trying to open /usr/lib/dri//xvba_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.37 (libva 1.5.1)
vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.8.0
vainfo: Supported profile and entrypoints
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD

Last edited by Median (2015-06-07 10:01:38)

Offline

#2 2015-06-06 13:37:27

esa
Member
Registered: 2011-12-29
Posts: 143
Website

Re: [SOLVED] Faulty video output with mpv/mplayer, vaapi

Allthough i assume its not the case, if you have ffmpeg installed,
have a look at /try:

ffmpeg -psnr -i input.{avi,mp4}
ffplay -i input.avi

hth

EDIT: codefix

Last edited by esa (2015-06-06 14:09:46)


Author of: TUI (Text User Interface for scripts), VHS (Video Handler Script, using ffmpeg) and YASSI (Yet Another Simple Script Installer)

Offline

#3 2015-06-06 14:04:32

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

Re: [SOLVED] Faulty video output with mpv/mplayer, vaapi

Uninstall libva-xvba-driver and do

export LIBVA_DRIVER_NAME=fglrx

Now try vainfo again. Instead of "Splitted-Desktop Systems XvBA backend for VA-API - 0.8.0" it should say "AMD MMD 1.0" or something like that.

Offline

#4 2015-06-06 18:49:44

Median
Member
Registered: 2011-06-03
Posts: 60

Re: [SOLVED] Faulty video output with mpv/mplayer, vaapi

Gusar wrote:

Uninstall libva-xvba-driver and do

export LIBVA_DRIVER_NAME=fglrx

Now try vainfo again. Instead of "Splitted-Desktop Systems XvBA backend for VA-API - 0.8.0" it should say "AMD MMD 1.0" or something like that.

Thanks, now VA-API at least gives me an output - but the video just flashes in fullscreen. I think another thing to notice here is that the video only plays correctly (gives me an output), if I play it on monitor 1 (I use three monitors) - but I can't get rid of the screen flashing.

EDIT: Fullscreen only flashes when I use mpv, with smplayer (+mpv) it works ok - but it lags from time to time. mplayer-vaapi won't give me a smooth playback either with -vo and -va as vaapi, and the screen also flashes when I'm using it.
Any idea on what's wrong? Is it my use of three monitors? This is really, really annoying.

Last edited by Median (2015-06-06 18:51:40)

Offline

#5 2015-06-06 19:17:29

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

Re: [SOLVED] Faulty video output with mpv/mplayer, vaapi

I'd say the crapiness of the catalyst driver is at fault. As it's a closed driver, not much can be done when something doesn't work. Especially in this case, catalyst doesn't actually have vaapi support, it's an internal wrapper to xvba.

Switch to the open driver, install mesa-vdpau, configure your players to use vdpau and enjoy proper support. Ok, before that, you can try mpv with --hwdec=vaapi-copy, but this eliminates a lot of the benefits of hardware decoding, as the system will consume significant resources copying decoded frames from the GPU to the CPU.

Last edited by Gusar (2015-06-06 19:17:59)

Offline

#6 2015-06-06 20:02:41

Median
Member
Registered: 2011-06-03
Posts: 60

Re: [SOLVED] Faulty video output with mpv/mplayer, vaapi

Gusar wrote:

I'd say the crapiness of the catalyst driver is at fault. As it's a closed driver, not much can be done when something doesn't work. Especially in this case, catalyst doesn't actually have vaapi support, it's an internal wrapper to xvba.

Switch to the open driver, install mesa-vdpau, configure your players to use vdpau and enjoy proper support. Ok, before that, you can try mpv with --hwdec=vaapi-copy, but this eliminates a lot of the benefits of hardware decoding, as the system will consume significant resources copying decoded frames from the GPU to the CPU.

I actually tried the open source driver first, but I didn't know how (or find info) on how to configure for a triple-head set up. I will give it a shot again and try to configure it as I would configure a dual-head setup, but just with another third monitor. Thanks!

Offline

#7 2015-06-06 21:04:06

Median
Member
Registered: 2011-06-03
Posts: 60

Re: [SOLVED] Faulty video output with mpv/mplayer, vaapi

The open-source drivers works absolutely *fantastic* and solved  a bunch of other issues as well. Proprietary sucks.

Thanks!

Offline

Board footer

Powered by FluxBB