0

I have code which decode live h264 camera stream and dispay. I have use ffmpeg dxvae decoder.

Problems : avcodec_send_packet return negative error code.

What I have Tried :

  1. I have dump stream packet and save in h264 file. then ffmpeg.exe -hwaccel dxva2 -threads 1 -i output.h264 -f null - -benchmark command verify and it throws error Failed setup for format dxva2_vld: hwaccel initialisation returned error.

  2. I have found h264 file has baseline profile. does baseline profile not supported by dxva2 decoder?

  3. I am able to play file with vlc player.

Also I had decode high profile h264 video using above command and its works fine.

please help to fix this. thanks in advance.

Chintan Patel
  • 173
  • 3
  • 14
  • If vlc player is able to play the file, it doesn't mean it plays the file using hardware decoding. vlc fallbacks to software decoding on some h264 file. i encountered some h264 files like that, in general some old mp4. I could take a look at those files caracteristics to see why hardware decoding can't be used – mofo77 Aug 18 '18 at 18:25

1 Answers1

1

It depends on your GPU hardware capabalities. For example, here is NVidia capabilities (from june 2016 codec sdk) :

enter image description here

Also, for NVidia, if you check this link Nvidia PureVideo , some widths can't be decode :

Note that all Feature Set B hardware cannot decode H.264 for the following widths: 769-784, 849-864, 929-944, 1009-1024, 1793-1808, 1873-1888, 1953-1968, 2033-2048 pixels.

mofo77
  • 1,447
  • 9
  • 17