DeepStream 6.3 Installation Error: Addressing Issues with GStreamer and nvv4l2h264enc

Hello NVIDIA Developers,

I’m currently working on installing DeepStream 6.3 on my local Ubuntu system. My pipeline is set up as follows:

gst-launch-1.0 -e -vvv  videotestsrc ! nvvideoconvert  ! \
     nvv4l2h264enc ! h264parse ! \
     rtph264pay config-interval=1 pt=96 ! \
     udpsink host=192.168.55.100 port=1234 sync=false

This pipeline operates as expected on a Jetson device and within the DeepStream 6.3 Triton container. However, while running on my machine, GStreamer produces this error:

Failed to query video capabilities: Invalid argument
libv4l2: error getting capabilities: Invalid argument
ERROR: from element /GstPipeline:pipeline0/nvv4l2h264enc:nvv4l2h264enc0: 
Error getting capabilities for device '/dev/v4l2-nvenc':
It isn't a v4l2 driver. Check if it is a v4l1 driver.
Additional debug info:
v4l2_calls.c(94): gst_v4l2_get_capabilities (): /GstPipeline:pipeline0/nvv4l2h264enc:nvv4l2h264enc0:

I’ve used strace, which indicates that the ioctl call on /dev/nvidia0 is failing (Notice the difference between the device name in the error and in the trace):

openat(AT_FDCWD, "/dev/nvidia0", O_RDWR) = 23
ioctl(23, VIDIOC_QUERYCAP, 0x7ffffffcf190) = -1 EINVAL (Invalid argument)

I’ve noticed that within the docker container, VIDIOC_QUERYCAP is not being utilized at all. So, I’m left wondering, how should I configure nvv4l2h264enc on a native system in order to use the correct v4l device?

I’d greatly appreciate any guidance or recommendations.

Best regards,

Serafin

Edit: My local setup

Hp Laptop with a A4500 in discrete only mode and ubunut 22.04

nvidia-smi 
Mon Apr 15 14:12:43 2024       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 545.29.06              Driver Version: 545.29.06    CUDA Version: 12.3     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA RTX A4500 Laptop GPU    Off | 00000000:01:00.0  On |                  Off |
| N/A   45C    P8              21W /  80W |   1477MiB / 16384MiB |      9%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      3324      G   /usr/lib/xorg/Xorg                          363MiB |
|    0   N/A  N/A      3538      G   /usr/bin/gnome-shell                        229MiB |
|    0   N/A  N/A     44608      G   ...irefox/4090/usr/lib/firefox/firefox      596MiB |
|    0   N/A  N/A    386609      G   ...yOnDemand --variations-seed-version      137MiB |
+---------------------------------------------------------------------------------------+

Can you elaborate on how you installed DeepStream? Not sure if you follow the installation guide from here: Quickstart Guide — DeepStream 6.3 Release documentation (nvidia.com).
Both the driver version and CUDA version are not the same with that from the guide:

  • Ubuntu 20.04
  • GStreamer 1.16.3
  • NVIDIA driver 525.125.06
  • CUDA 12.1
  • TensorRT 8.5.3.1

You may follow the installation guide to install it again, or alternatively, you can also use docker from DeepStream | NVIDIA NGC.

Hi

The installation is a custom one. Goal is to have a unified toolchain that is the same on developer laptop as well on the jetson. So I am in the step of trying to evaluate our toolchain.

Basically we just unpack the deepstream deb package and make sure all the dependencies are available.

May I know the purpose of the same toolchain on toolchain from laptop to Jetson? The binaries created on laptop cannot work on Jetson, and vice versa.

Basically Jetson and dGPU have different dependencies. For example with Jetpack 5.1.3, CUDA version is 11.4, while the CUDA version on laptop is 12.1. The driver version is different between Jetson and dGPU too.

If your goal is to develop DeepStream based application on laptop and then run it on Jetson, you can simply ensure the version of DeepStream is the same on laptop & Jetson, but please also note that some plugins are different between Jetson and dGPU, need more careful when developing on laptop.

Well we have a multitude of requirements that lead to this decision. Generally L4T is not customizable and deterministic enough for our product. We need to be in control of our own dependencies.

But regardless of how I install my deepstream my question stand on how I am supposed to configure the v4l encoder device used by the nvidia plugings on a dGPU? There seem to be some magic happening in the selection of the device which I can find nor documentation for.

Basically, It depends on the correct driver version, the right CUDA version, the libv4l2.
Can you refer to our Guide to reinstall DeepStream and see if it works? Maybe your custom installation is missing something.

I don’t thionk this will help my problem at all. I am fully aware that deepstream works in general (as I have tested with the docker). But this is not something we will be able to ship with our product.

I try to get it running on my custom setup. And at least the error messages from deepstream are / wrong, so I don`t know how to fix it.

Let me reformualte my Question.

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

This process has not yet run into the nvenc code. It is currently in the open source of Gstreamer that reported the error. So please make sure that the v4l2 module and the Gstreamer on your host are installed properly. You can refer to the source code v4l2_calls.c.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.