Building VA support

Following https://gstreamer.freedesktop.org/documentation/installing/building-from-source-using-meson.html?gi-language=c I’ve done the following

git clone https://gitlab.freedesktop.org/gstreamer/gstreamer.git
cd gstreamer
meson setup ./builddir

Which prints out at the end of the log

FFmpeg| Library va skipped: feature vaapi disabled

Going ahead anyway…

cd builddir
ninja
cd ../
./gst-env.py
[main] gst-inspect-1.0 va
No such element or plugin 'va'

vainfo reports

vainfo
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.12.0)
vainfo: Driver version: Mesa Gallium driver 25.2.8-0ubuntu0.24.04.1 for AMD Ryzen 9 7950X3D 16-Core Processor (radeonsi, raphael_mendocino, LLVM 20.1.2, DRM 3.64, 6.17.0-14-generic)
vainfo: Supported profile and entrypoints
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileAV1Profile0 : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc

I cannot understand why it’s disabled or how to enable it.

How to build the va plugins vah264enc element? - #9 by vjaquez seems similar but there’s no solution and nothing there helps me.

We don’t use the FFmpeg VA support, so it is expected that it is disabled.

We have a “standalone” VA plugin, currently in gst-plugins-bad.

Maybe share the meson log file here?

Check the logs in ./builddir/meson-logs/meson-log.txt . You’ll need development package for libva and udev.

Dependency libva found: YES 1.22.0
Dependency libva-drm found: YES 1.22.0
Dependency gudev-1.0 found: YES 238 

I think those 3 depenencies are installed. I see

Run-time dependency libva found: YES 1.20.0

Run-time dependency libva-drm found: YES 1.20.0

Dependency gudev-1.0 found: YES 238 (cached)

I’ve uploaded the logs to

And in your build dir you see no libgstva.so file?

If you have it, inspect it, that might give some hints. gst-inspect-1.0 path/to/libgstva.so

I do.

/home/matthew/Desktop/gstreamer/gstreamer/builddir/subprojects/gst-plugins-bad/sys/va

[1.28] Terminal:~/Desktop/gstreamer/gstreamer$ gst-inspect-1.0 builddir/subprojects/gst-plugins-bad/sys/va/libgstva.so
Plugin Details:
Name                     va
Description              VA-API codecs plugin
Filename                 builddir/subprojects/gst-plugins-bad/sys/va/libgstva.so
Version                  1.28.0.1
License                  LGPL
Source module            gst-plugins-bad
Documentation            https://gstreamer.freedesktop.org/documentation/va/
Binary package           GStreamer Bad Plug-ins git
Origin URL               Unknown package origin

vaav1dec: VA-API AV1 Decoder in AMD Ryzen 9 7950X3D 16-Core Processor
vacompositor: VA-API Video Compositor in AMD Ryzen 9 7950X3D 16-Core Processor
vadeinterlace: VA-API Deinterlacer in AMD Ryzen 9 7950X3D 16-Core Processor
vah264dec: VA-API H.264 Decoder in AMD Ryzen 9 7950X3D 16-Core Processor
vah264enc: VA-API H.264 Encoder in AMD Ryzen 9 7950X3D 16-Core Processor
vah265dec: VA-API H.265 Decoder in AMD Ryzen 9 7950X3D 16-Core Processor
vah265enc: VA-API H.265 Encoder in AMD Ryzen 9 7950X3D 16-Core Processor
vajpegdec: VA-API JPEG Decoder in AMD Ryzen 9 7950X3D 16-Core Processor
vapostproc: VA-API Video Postprocessor in AMD Ryzen 9 7950X3D 16-Core Processor
vavp9alphadecodebin: VA-API VP9 Alpha Decoder
vavp9dec: VA-API VP9 Decoder in AMD Ryzen 9 7950X3D 16-Core Processor

11 features:
±- 11 elements

[1.28] Terminal:~/Desktop/gstreamer/gstreamer$

I was under the impression that that gst-env.py script would automatically set my GST_PLUGIN_PATH but maybe it’s just not or it’s being overwritten by my local path. When run inside the gst environment

echo $GST_PLUGIN_PATH
/usr/local/lib/x86_64-linux-gnu/gstreamer-1.0

I’ll have to experiment more later. I’m still getting used to this whole build process and installing updated versions locally.