# How to build the va plugins vah264enc element?

**URL:** https://discourse.gstreamer.org/t/how-to-build-the-va-plugins-vah264enc-element/4327
**Category:** General Discussion
**Created:** [March 19, 2025, 12:39pm UTC](https://discourse.gstreamer.org/t/how-to-build-the-va-plugins-vah264enc-element/4327 "2025-03-19T12:39:59Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![mangodan2003](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/mangodan2003/32/1223_2.png) [@mangodan2003](https://discourse.gstreamer.org/u/mangodan2003)
#### Post date: [March 19, 2025, 12:39pm UTC](https://discourse.gstreamer.org/t/how-to-build-the-va-plugins-vah264enc-element/4327/1 "2025-03-19T12:39:59Z")

</div>

As per the topic, how do I get a build that includes vah264enc? by default (meson setup build) its not getting built. I also tried with -Dvaapi but suspect this is relating to the old vappi stuff - its not obvious whats what in this regard.

```auto
[1.24] dan@melon ~/tmp/gstreamer/build $ gst-inspect-1.0 va
Xlib: extension "DRI2" missing on display ":1".
Plugin Details:
  Name va
  Description VA-API codecs plugin
  Filename /home/dan/tmp/gstreamer/build/subprojects/gst-plugins-bad/sys/va/libgstva.so
  Version 1.24.12.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

  0 features:

[1.24] dan@melon ~/tmp/gstreamer/build $ gst-inspect-1.0 vah264enc
No such element or plugin 'vah264enc'

```

I cant see anything in the output of the setup phase that looks relevant re why it might not be getting built, but then i don’t really know what to look for other than vah264enc, vaapi, va-api etc.

---

<div class="post-metadata">

### Author: ![axuwon](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/axuwon/32/1225_2.png) [@axuwon](https://discourse.gstreamer.org/u/axuwon)
#### Post date: [March 19, 2025, 1:25pm UTC](https://discourse.gstreamer.org/t/how-to-build-the-va-plugins-vah264enc-element/4327/2 "2025-03-19T13:25:57Z")

</div>

The same question here. I also need to use vah264enc. But couldn’t get it neither from precompiled binaries nor compiling from the source code.

@mangodan2003 show, please, your build script.

---

<div class="post-metadata">

### Author: ![mangodan2003](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/mangodan2003/32/1223_2.png) [@mangodan2003](https://discourse.gstreamer.org/u/mangodan2003)
#### Post date: [March 19, 2025, 1:38pm UTC](https://discourse.gstreamer.org/t/how-to-build-the-va-plugins-vah264enc-element/4327/3 "2025-03-19T13:38:45Z")

</div>

For the purposes of obtaining the above, and to rule out any other factors, the above was simply a completely manual:

```auto
git clone https://gitlab.freedesktop.org/gstreamer/gstreamer
cd gstreamer
git checkout 1.24
meson setup build
cd build
ninja

```

Or are you requesting the output of the `meson setup build` step?

Edit: Just a comment to add that I have libva installed and this is on a Gentoo system so that includes the development headers.  
I notice that as well as libva there is also a `libva-intel-media-driver` - it feels a bit like guess work but I tried installing this too to no avail.

---

<div class="post-metadata">

### Author: ![vjaquez](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/vjaquez/32/35_2.png) [@vjaquez](https://discourse.gstreamer.org/u/vjaquez)
#### Post date: [March 20, 2025, 4:46pm UTC](https://discourse.gstreamer.org/t/how-to-build-the-va-plugins-vah264enc-element/4327/4 "2025-03-20T16:46:57Z")

</div>

When registering the plugin’s elements, gstva queries the VA-API driver for what it profiles and entry points supports, and elements are registered accordingly.

If your setup doesn’t show any feature is either because either isn’t a useful driver installed, or perhaps the hardware doesn’t support VA-API at all.

To check that you can run the VA-API utility command `vainfo`.

---

<div class="post-metadata">

### Author: ![mangodan2003](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/mangodan2003/32/1223_2.png) [@mangodan2003](https://discourse.gstreamer.org/u/mangodan2003)
#### Post date: [March 21, 2025, 10:57am UTC](https://discourse.gstreamer.org/t/how-to-build-the-va-plugins-vah264enc-element/4327/5 "2025-03-21T10:57:40Z")

</div>

Thanks for the reply, that gives me something to investigate. I was not expecting the list of available plugin elements to be as dynamic as that. I assumed they were either built or not built and the results would reflect that.

Is there any documentation specifically for va and the va-api requirements? Anything I find seems to relate to the older gstreamer-vaapi. There is a link for va-api e.g. at the top of the vah264enc docs but it seems to just be a corporate/marketing looking home page.

[https://gstreamer.freedesktop.org/documentation/va/index.html?gi-language=c](https://gstreamer.freedesktop.org/documentation/va/index.html?gi-language=c)

[https://gstreamer.freedesktop.org/documentation/va/vah264enc.html?gi-language=c#vah264enc](https://gstreamer.freedesktop.org/documentation/va/vah264enc.html?gi-language=c#vah264enc)

---

<div class="post-metadata">

### Author: ![axuwon](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/axuwon/32/1225_2.png) [@axuwon](https://discourse.gstreamer.org/u/axuwon)
#### Post date: [March 21, 2025, 11:09am UTC](https://discourse.gstreamer.org/t/how-to-build-the-va-plugins-vah264enc-element/4327/6 "2025-03-21T11:09:06Z")

</div>

> [@mangodan2003](#):
>
> `gst-inspect-1.0 va`

Hi, again! Kind people helped me to find that if you run `sudo gst-inspect-1.0 va` you will get the encoder!  
What a heck, isn`t 🙂

Now I’m trying to find out how to run it without sudo but straight under the $USER.

---

<div class="post-metadata">

### Author: ![mangodan2003](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/mangodan2003/32/1223_2.png) [@mangodan2003](https://discourse.gstreamer.org/u/mangodan2003)
#### Post date: [March 21, 2025, 11:12am UTC](https://discourse.gstreamer.org/t/how-to-build-the-va-plugins-vah264enc-element/4327/7 "2025-03-21T11:12:26Z")

</div>

That is one of the first things I tried here, so I have something else missing / incorrect.  
Try checking if your user is in the video (or equivelant) group - I’m assuming you are not running in a UI / Desktop environment.

---

<div class="post-metadata">

### Author: ![axuwon](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/axuwon/32/1225_2.png) [@axuwon](https://discourse.gstreamer.org/u/axuwon)
#### Post date: [March 21, 2025, 11:17am UTC](https://discourse.gstreamer.org/t/how-to-build-the-va-plugins-vah264enc-element/4327/8 "2025-03-21T11:17:36Z")

</div>

Well I have several environments. The sudo worked for me while running in UI environment and my $USER neither in render nor in video group. I’ve add the $USER to the render and video group but it haven’t solved the issue.

The another environment is a docker container, and there is no root user, so i’ve just scratching my head to find out how to run hardware encoder there.

---

<div class="post-metadata">

### Author: ![vjaquez](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/vjaquez/32/35_2.png) [@vjaquez](https://discourse.gstreamer.org/u/vjaquez)
#### Post date: [March 21, 2025, 11:21am UTC](https://discourse.gstreamer.org/t/how-to-build-the-va-plugins-vah264enc-element/4327/9 "2025-03-21T11:21:03Z")

</div>

Rergarding requirements, they are the same as gstreamer-vaapi or any other VA-API based application, since they use the same library and API: libva.

I agree: we’ll need to open an issue fo gstva documentation, particularly explaining its dynamic register of elements.

---

<div class="post-metadata">

### Author: ![vjaquez](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/vjaquez/32/35_2.png) [@vjaquez](https://discourse.gstreamer.org/u/vjaquez)
#### Post date: [March 21, 2025, 11:23am UTC](https://discourse.gstreamer.org/t/how-to-build-the-va-plugins-vah264enc-element/4327/10 "2025-03-21T11:23:08Z")

</div>

for example, this troubleshooting post for GStreamer-VAAPI also helps to understand GstVA

> **[GStreamer VA-API Troubleshooting](https://blogs.igalia.com/vjaquez/gstreamer-va-api-troubleshooting/)**
>
> GStreamer VA-API Troubleshooting 28 March 2018 gstreamer vaapi GStreamer VA-API is not a trivial piece of software. Even though, in my opinion it is a bit over-engineered, the complexity relies on...

---

<div class="post-metadata">

### Author: ![mangodan2003](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/mangodan2003/32/1223_2.png) [@mangodan2003](https://discourse.gstreamer.org/u/mangodan2003)
#### Post date: [March 21, 2025, 11:31am UTC](https://discourse.gstreamer.org/t/how-to-build-the-va-plugins-vah264enc-element/4327/11 "2025-03-21T11:31:03Z")

</div>

This is an interesting data point as the old vaapih264enc element works.

---

<div class="post-metadata">

### Author: ![mangodan2003](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/mangodan2003/32/1223_2.png) [@mangodan2003](https://discourse.gstreamer.org/u/mangodan2003)
#### Post date: [March 21, 2025, 11:33am UTC](https://discourse.gstreamer.org/t/how-to-build-the-va-plugins-vah264enc-element/4327/12 "2025-03-21T11:33:37Z")

</div>

Have you restarted or used nwgrp / a new session etc/ since adding your user to the required groups? Check the permissions on your video devices (found under /dev/dri).

---

<div class="post-metadata">

### Author: ![axuwon](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/axuwon/32/1225_2.png) [@axuwon](https://discourse.gstreamer.org/u/axuwon)
#### Post date: [March 21, 2025, 11:38am UTC](https://discourse.gstreamer.org/t/how-to-build-the-va-plugins-vah264enc-element/4327/13 "2025-03-21T11:38:15Z")

</div>

I’ve add $USER to video and render group. I’ve log out but still it haven’t worked form me.  
Here is the permissions for video devices

 ![image](https://discourse.gstreamer.org/uploads/default/original/2X/3/319b3068341c6e71cfef7597d0778d3c3c510e27.png)

---

<div class="post-metadata">

### Author: ![vjaquez](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/vjaquez/32/35_2.png) [@vjaquez](https://discourse.gstreamer.org/u/vjaquez)
#### Post date: [March 21, 2025, 12:13pm UTC](https://discourse.gstreamer.org/t/how-to-build-the-va-plugins-vah264enc-element/4327/14 "2025-03-21T12:13:25Z")

</div>

you can run

```auto
GST_REGISTRY= gst-inspect-1.0 --gst-disable-registry-fork --gst-debug=va*:8 va

```

to check the logs while registering the plugin’s elements

---

<div class="post-metadata">

### Author: ![axuwon](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/axuwon/32/1225_2.png) [@axuwon](https://discourse.gstreamer.org/u/axuwon)
#### Post date: [March 21, 2025, 1:30pm UTC](https://discourse.gstreamer.org/t/how-to-build-the-va-plugins-vah264enc-element/4327/15 "2025-03-21T13:30:03Z")

</div>

> [@vjaquez](#):
>
> `GST_REGISTRY= gst-inspect --gst-disable-registry-fork --gst-debug=va*:8 va`

I’m not sure what do you mean by run the line above? Could you elaborate more.

---

<div class="post-metadata">

### Author: ![vjaquez](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/vjaquez/32/35_2.png) [@vjaquez](https://discourse.gstreamer.org/u/vjaquez)
#### Post date: [March 21, 2025, 2:04pm UTC](https://discourse.gstreamer.org/t/how-to-build-the-va-plugins-vah264enc-element/4327/16 "2025-03-21T14:04:57Z")

</div>

I meant gst-inspect-1.0 command
