Author Topic: "Cannot initialize LIBVA"  (Read 6752 times)

pchristy

  • Full Member
  • ***
  • Posts: 129
"Cannot initialize LIBVA"
« on: June 03, 2015, 07:44:39 AM »
Avidemux version: 2.6.9
Hardware: Intel Corporation Haswell Integrated Graphics Controller (rev 06) (as reported by lspci)
OS: Slackware64-current
Libva: libva info: VA-API version 0.37.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_37
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.37 (libva 1.5.1)
vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Desktop - 1.5.1

Mpv media player works fine with this libva, and ffmpeg doesn't complain about it, but trying to open a file with Avidemux results in the following error:

"Cannot initialize LIBVA, make sure it is not already used by another application.
Switching to default decoder."

Avidemux compiled just fine and seemed to recognise libva where appropriate during the build process.

The error message appears even after a reboot, when no media players or other software should be using libva.

Any suggestions?

Cheers,

--
Pete


--
Pete

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6051
Re: "Cannot initialize LIBVA"
« Reply #1 on: June 03, 2015, 08:38:23 AM »
VDPAU backend not installed?
Code: [Select]
vainfo
Quote
libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_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.0)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.3
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :   VAEntrypointVLD
      VAProfileMPEG2Main              :   VAEntrypointVLD
      VAProfileMPEG4Simple            :   VAEntrypointVLD
      VAProfileMPEG4AdvancedSimple    :   VAEntrypointVLD
      VAProfileH264Main               :   VAEntrypointVLD
      VAProfileH264High               :   VAEntrypointVLD
      VAProfileVC1Simple              :   VAEntrypointVLD
      VAProfileVC1Main                :   VAEntrypointVLD
      VAProfileVC1Advanced            :   VAEntrypointVLD
« Last Edit: June 03, 2015, 05:03:14 PM by Jan Gruuthuse »

pchristy

  • Full Member
  • ***
  • Posts: 129
Re: "Cannot initialize LIBVA"
« Reply #2 on: June 03, 2015, 12:49:24 PM »
Does it need the vdpau back-end? Its been working OK without it in the past. However, that was with 2.6.8, and I have done some major upgrades recently - including upgrading to libva-1.5.1 and avidemux-2.6.9. And I would have thought that if it needed the vdpau backend, it would have complained during compilation. At each of the relevant stages it said "libvdpau - no, libva - yes", so it knew libva was there and that vdpau wasn't and didn't complain.

I was under the impression that although libva support was a low priority (does Mean have the necessary hardware?), it was nontheless in there, and its certainly worked in the past.

But thanks for the suggestion!   ;)

--
Pete
--
Pete

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6051
Re: "Cannot initialize LIBVA"
« Reply #3 on: June 03, 2015, 01:50:24 PM »
I'm not familiar with Slackware64. So it could be vdpau-backend is solution for nvidia gpu.

When you start avidemux 2.6.9 it also opens a terminal window. Use the search window of that terminal window and use search parameter: libva. This would probably shed more light on your situation.

Quote
Probing for LIBVA...
 [init]  [LIBVA] Initializing LibVA library ...
libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
  [init]  VA 0.37, Vendor = Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.3
...
« Last Edit: June 03, 2015, 05:04:44 PM by Jan Gruuthuse »

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10974
Re: "Cannot initialize LIBVA"
« Reply #4 on: June 03, 2015, 04:46:34 PM »
No you dont need vdpau
Could you post the full log ?

pchristy

  • Full Member
  • ***
  • Posts: 129
Re: "Cannot initialize LIBVA"
« Reply #5 on: June 03, 2015, 05:54:22 PM »
No you dont need vdpau
Could you post the full log ?

No problem - but where do I find it?

I've just run it from a command prompt and found this (if it helps):

Searching decoder in plugins                                                                           
  [tryCreatingVideoDecoder]  No decoder found in plugin                                                 
  [ADM_getDecoder]  Searching decoder in libva (1920 x 1080, extradataSize:0)...                       
  [ADM_getDecoder]  This is libva compatible                                                           
 [lavc] Build: 3676772                                                                                 
 [paintGL]  Painting dummy openGl widget                                                               
  [paintGL]  Painting dummy openGl widget                                                               
  [displayXError]  LibVA Error : <vaDestroyContext(ADM_coreLibVA::display,session):invalid VAContextID>
  [ADM_getDecoder]  Searching decoder in coreVideoCodec(1920 x 1080, extradataSize:0)...
  [ADM_coreCodecGetDecoder]  Searching decoder in coreVideoCodec(1920 x 1080, extradataSize:0)...       
 [lavc] Build: 3676772                                                                                 
 [decoderFFH264]  [lavc] Initializing H264 decoder with 0 extradata                                     
  [adm_lavLogCallback]  [lavc] The 'vismv' option is deprecated, see the codecview filter instead.     
 [lavc] Decoder init: CODEC_ID_H264 video decoder initialized! (H.264 / AVC / MPEG-4 AVC / MPEG-4 part 1


Doesn't mean much to me, but it looks relevant!

:-)
« Last Edit: June 03, 2015, 05:59:07 PM by pchristy »
--
Pete

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10974
Re: "Cannot initialize LIBVA"
« Reply #6 on: June 03, 2015, 05:57:10 PM »
on the console, you could use something like
avidemux3_qt4 >& /tmp/log.txt


pchristy

  • Full Member
  • ***
  • Posts: 129
Re: "Cannot initialize LIBVA"
« Reply #7 on: June 03, 2015, 07:45:14 PM »
OK, here's a log file. I was opening a file generated by my camcorder (h265 1920x1080 MTS). The error box that comes up refers to decoding. Decoding works fine with other applications (mpv, ffmpeg).

Cheers,
--
Pete

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10974
Re: "Cannot initialize LIBVA"
« Reply #8 on: June 04, 2015, 05:31:10 AM »
Display seems ok with libVa, is that correct ?

pchristy

  • Full Member
  • ***
  • Posts: 129
Re: "Cannot initialize LIBVA"
« Reply #9 on: June 04, 2015, 07:43:49 AM »
I'm not quite sure what you are asking, but I've selected libva in the display options, and also  in the HWAccel menu. Checking the box marked "...it is better to use the matching display driver" results in it unchecking itself when that window is re-opened. I think this is normal, as I recall earlier versions doing this too.

Switching the display options to OpenGL or XVideo doesn't help, nor does unchecking the "enable opengl" option.

With "libva" selected for the video display, and "enable opengl" selected, the video display is fine. But whenever I select a HD file, which would normally require the libva hardware acceleration, then the error box pops up. Avidemux still works (it drops back to libavcodec), but the CPU usage increases dramatically. My system has enough horsepower to cope with this, provided it is not doing anything else, but clearly it would be preferable to take advantage of hardware acceleration.

Cheers,
--
Pete

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6051
Re: "Cannot initialize LIBVA"
« Reply #10 on: June 04, 2015, 08:22:47 AM »
>8>8 OK, here's a log file. I was opening a file generated by my camcorder (h265 1920x1080 MTS). The error box that comes up refers to decoding. Decoding works fine with other applications (mpv, ffmpeg). >8>8
>8>8 But whenever I select a HD file, which would normally require the libva hardware acceleration, then the error box pops up. Avidemux still works (it drops back to libavcodec) >8 >8

When I load a HEVC (H265) video into avidemux the video decoder switches back from video decoder vpdau to Lavcodec.
This is not the case with H264, avidemux stays with video decoder VDPAU.

My understanding h265 hw playback acceleration in avidemux is not yet supported. This for VDPAU, XVBA or LIBVA.

Could you confirm you have this issue only when loading H265 video?
« Last Edit: June 04, 2015, 08:26:01 AM by Jan Gruuthuse »

pchristy

  • Full Member
  • ***
  • Posts: 129
Re: "Cannot initialize LIBVA"
« Reply #11 on: June 04, 2015, 12:48:54 PM »
Ooops! That was a typo! It should have read H264........

:-/

--
Pete

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10974
Re: "Cannot initialize LIBVA"
« Reply #12 on: June 04, 2015, 08:20:26 PM »
Does it fail with all h264 content or only with the ones from your camera ?

pchristy

  • Full Member
  • ***
  • Posts: 129
Re: "Cannot initialize LIBVA"
« Reply #13 on: June 05, 2015, 08:21:51 AM »
It does it with all the H264 files I've tried - camera, 'phone, dash-cam and even some SD material created in an earlier version of avidemux from a VHS source!

The x264 I'm using was compiled from the 20141127 snapshot.
--
Pete