Skip to content

vulkan: add h26x encoders support

Stéphane Cerveau requested to merge dabrain34/gstreamer:dab_vkencode_h26x into main

Introduction

This work intends to provide support to final specifications allowing to encode media content using Vulkan API. See https://www.khronos.org/blog/khronos-finalizes-vulkan-video-extensions-for-accelerated-h.264-and-h.265-encode?mc_cid=e4afdbcd22&mc_eid=47d3c1b7bb

This MR is now complete and can encode video content in h264 and h265 with I, P and B frames.

Tt has been tested on both Windows and Linux with compatible drivers to the KHR extensions.

Compatible drivers

How to build it

As the official Vulkan SDK does not support the latest encoder final specs, you need:

  1. install it through https://www.lunarg.com/vulkan-sdk/
  2. Download and build/install the Vulkan Header fron here
  3. Build GStreamer using -Dgst-plugins-bad:vulkan-sdk-path=/path/to/vulkan/headers/install
$ meson setup builddir -Dgst-plugins-bad:vulkan-video=enabled -Dgst-plugins-bad:vulkan-sdk-path=/path/to/vulkan/headers/install

$ ninja -C builddir

Missing features

  • H264 b-frames support.
  • H265 b-frames support.

Test

  • Need Vulkan SDK >= 1.3.274 and suitable IHV drivers.
Edited by Stéphane Cerveau

Merge request reports