H.265 V4L Encoder

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
RTX 5000, x86-64 RHEL
• DeepStream Version
6.0 (nvidia_deepstream:6.0-devel)
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)


I am trying to use the V4l2 H.265 encoder (nvv4l2h265enc) in the DeepStream 6.0 container. See example below:
gst-launch-1.0 -v videotestsrc ! nvvideoconvert ! ‘video/x-raw(memory:NVMM)’ ! nvv4l2h265enc bitrate=1000000 ! fakesink

I get the following error
Setting pipeline to PAUSED …
Failed to query video capabilities: Invalid argument
libv4l2: error getting capabilities: Invalid argument
ERROR: from element /GstPipeline:pipeline0/nvv4l2h265enc:nvv4l2h265enc0: Error getting capabilities for device ‘/dev/nvhost-msenc’: It isn’t a v4l2 driver. Check if it is a v4l1 driver.
Additional debug info:
v4l2_calls.c(97): gst_v4l2_get_capabilities (): /GstPipeline:pipeline0/nvv4l2h265enc:nvv4l2h265enc0:
system error: Invalid argument
ERROR: pipeline doesn’t want to preroll.
ERROR: from element /GstPipeline:pipeline0/nvv4l2h265enc:nvv4l2h265enc0: Could not initialize supporting library.
Additional debug info:
…/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideoencoder.c(1775): gst_video_encoder_change_state (): /GstPipeline:pipeline0/nvv4l2h265enc:nvv4l2h265enc0:
Failed to open encoder
ERROR: pipeline doesn’t want to preroll.
Failed to set pipeline to PAUSED.
Setting pipeline to NULL …
Freeing pipeline …

/dev/nvhost-msenc appears to be related to Xavier. This appears to be the default device setting for the nvv4l2h265enc plugin. I only have /dev/nvidia0 and /dev/nvidia1 since I am using dGPU. I attempt to set the device property for nvv4l2h265enc, but it says that this property is read-only

device : Device location
flags: readable
String. Default: “/dev/nvhost-msenc”

How can I change the device in use for the nvv4l2h265enc plugin?

Yes, /dev/nvhost-msenc is for Jetson.
Can you find libnvidia-encode.so.*** in the container?

Yes, it matches the driver version (470.57.02). There is one for 64-bit and one for 32-bit:

| NVIDIA-SMI 470.57.02 Driver Version: 470.57.02 CUDA Version: 11.4 |
| 0 Quadro RTX 5000 Off | 00000000:15:00.0 On | Off |
| 1 Quadro RTX 5000 Off | 00000000:2D:00.0 On | Off |

Did soft link libnvidia-encode.so exist?

/usr/lib/x86_64-linux-gnu/libnvidia-encode.so → /usr/lib/x86_64-linux-gnu/libnvidia-encode.so.1
/usr/lib/x86_64-linux-gnu/libnvidia-encode.so.1 → libnvidia-encode.so.470.57.02
although none for 32-bit:
/usr/lib/i386-linux-gnu/libnvidia-encode.so.1 (no link destination)

I am using a source build of gstreamer to upgrade the version. This seems to be the only plugin giving me issues though. Could this be related to the source build of gstreamer?

It looks like these 2 libraries distributed with DeepStream 6.0 maybe be direct dependencies to the GStreamer version (1.14). Do you have newer versions of these compiled libraries for newer GStreamer versions (1.16, 1.18+)? Or is there source available for compilation?
libnvv4l2 1.14.0
libgstnvvideo4linux2.so 1.14.0

Deepstream 6.0 builds on gstreamer 1.14
Upcoming release builds on gstreamer 1.16

1 Like

Ok, I will revert to the supported version. Looking forward to the next DeepStream release, thank you

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