[FFmpeg-devel] Recent regression in VA-API compatibility (assertion in H.264 encode)

Devin Heitmueller dheitmueller at ltnglobal.com
Fri Dec 1 18:48:39 EET 2017


It looks like a recent patch causes VA-API H.264 encode to stop working and an assertion to be thrown.  I ran a git bisect and narrowed it down to the following commit:

32a618a948c20f18db102d0b0976790222a57105 is the first bad commit
commit 32a618a948c20f18db102d0b0976790222a57105
Author: Mark Thompson <sw at jkqxz.net>
Date:   Wed Oct 18 19:46:53 2017 +0100

    vaapi_h264: Do not use deprecated header type
    SEI headers should be inserted as generic raw data (the old specific
    type has been deprecated in libva2).

When run with the above patch, I get the following output:

[h264_vaapi @ 0x37d0a20] Warning: some packed headers are not supported (want 0xd, got 0xb).
[h264_vaapi @ 0x37d0a20] The encode compression level option is not supported with this VAAPI version.
ffmpeg: i965_drv_video.c:352: va_enc_packed_type_to_idx: Assertion `0' failed.

Here’s the vainfo output which provides the version info for the driver, va-api version, etc.  This is on a Haswell system running Centos 7.

libva info: VA-API version 0.34.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_34
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.34 (libva 1.2.1)
vainfo: Driver version: Intel i965 driver - 1.2.2

I’m using the following command line for testing:

./ffmpeg -y -vaapi_device /dev/dri/card0 -i /home/devin/inputfile.ts -vf 'format=nv12,hwupload' -c:v h264_vaapi out.mp4

Any suggestions that could be offered would be greatly appreciated.  Likewise please let me know if there is any other information I can provide that would assist in getting this resolved.


Devin Heitmueller

More information about the ffmpeg-devel mailing list