VAAPI Hardware Acceleration support for video decoding with FFmpeg Producer

I’ve been working on getting VAAPI support to work with the FFmpeg producer, following this example from the official FFmpeg source.

The changes I’ve made can be seen under this commit (they’re relatively minor).

At this point I’m able to build and run the server, although when I play a H264 encoded video (other encodings will not work since the VAAPI support is currently hard-coded), I get no output.

Logging the value for the pts attribute for each received frame shows it is stuck with the AV_NOPTS_VALUE flag value, which I’m pretty sure is not the expected behavior, though I don’t know how close this is to the source of the problem, being possible that it’s simply a loosely related side effect.

I assume there are no hardware issues, since I’m able to decode the same video using the ffmpeg -hwaccel vaapi ... command.

Are these adjustments close to what would be required to get the hardware acceleration to work, or are there other major changes that would be needed in the source code?

Privacy Policy   Terms of Service