Can I use "Jetson Linux Multimedia API" without EGL / X11?

Hello everyone,
Some time ago I managed to write working code (on Jetpack) that makes use of NvVideoEncoder (and NvBuffer) to generate some H264 encoded video files.

Unfortunately, to make things work libnvbuf_utils.so is required, which has EGL as a dependency.
As far as I understand, neither the V4L2 interface nor the low level driver seem to require EGL (but some functions on libnvbuf_utils do).
Since I’ve been working for quite some time on a minimal (less than 200MB) image, I would like to avoid EGL and especially X11 or Wayland as dependencies.

Would it be possible to get a version of libnvbuf_utils without this EGL dependencies (since as far as I have seen there is no source code available)?
If not, is there any way to satisfy the EGL requirement without requiring X11 / Wayland / etc (and without runtime errors)?

Best Regards,
Juan Pablo.

Hi,
It can work without X11 or Wayland. We have a DRM sample:

Please try and see if it meets your requirements.

Hi @DaneLLL,
I used that sample as base form my code (months ago), so the example doesn’t help me at all.
Your confirmation that it can work without X11 did help me though.

In the end I managed to find the problem.
First part of the problem was that libv4l was compiled without plugin support (for the binary plugins provided by Nvidia).
Second part of the problem was that since the plugins were loaded by dlopen, they would fail silently if there was a missing dependency.

Additionally, I still had to compile libglvnd (without X11 support) so that some of those libraries would not complain about missing EGL symbols (like libnvbuf_utils).

Now I can finally use the hardware encoder on a small rootfs.

Best Regards,
Juan Pablo.

1 Like