Not able to use nvv4l2 decoders/encoders

I installed latest Deepstream sdk in docker built from nvidia/cuda:10.1-devel-ubuntu18.04 with GStreamer 1.16.1 built from sources. Not able to run simple pipelines with nvv4l2 decoders/encoders.

gst-launch-1.0 v4l2src device=/dev/video0 ! image/jpeg,width=1280,height=720 ! nvv4l2decoder ! nvvideoconvert ! fpsdisplaysink text-overlay=true

Setting pipeline to PAUSED …
Failed to query video capabilities: Invalid argument
libv4l2: error getting capabilities: Invalid argument
ERROR: Pipeline doesn’t want to pause.
ERROR: from element /GstPipeline:pipeline0/nvv4l2decoder:nvv4l2decoder0: Error getting capabilities for device ‘/dev/nvhost-nvdec’: It isn’t a v4l2 driver. Check if it is a v4l1 driver.
Additional debug info:
v4l2_calls.c(98): gst_v4l2_get_capabilities (): /GstPipeline:pipeline0/nvv4l2decoder:nvv4l2decoder0:
system error: Invalid argument
Setting pipeline to NULL …
Freeing pipeline …

Any help appreciated. Thanks.

1 Like

I ran into the same issue, fixed by installing the video4linux support libraries with :

apt install libv4l-dev

and then re-installing the deepstream sdk

Thanks for the reply. I already had latest libv4l-dev. This did not help.

I have the same issue and same error message when running the sample applications included in the DeepStream SDK 4.0.1 on the sample video files (specifically deepstream-test1).

I’m using the Docker image base nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04. I can provide more information if needed, please let me know.

Edit: Why is this an accepted answer? I haven’t resolved the problem at all.

Yes, I haven’t solved it yet. Please help with other things I can check.

still waiting on a response from NVIDIA!

May I know why you use GST 1.16 version,for x86 DS is based on GST 1.14, I would suggest to use the same env as the DS development guidance, refer DeepStream Development Guide

yeah, using GST 1.16 version for webrtc enhancements and stats. Will it not work?

I would suggest to use GST 1.14, and maybe we can do some WAR for the features 1.16 support but not 1.14.

check if “/usr/lib/nvidia-/libnvcuvid.so” or “/usr/lib/x86_64-linux-gnu/libnvcuvid.so*” exist ?
if not, you may try copy libnvcuvid.so* from host’s “/usr/lib/x86_64-linux-gnu/” to container’s [i]“/usr/lib/x86_64-linux-gnu/” or rerun the docker image with command:

docker run -it --runtime nvidia -e NVIDIA_DRIVER_CAPABILITIES=video,compute,utility nvidia/cuda:10.0-runtime-ubuntu16.04 sh -c ‘ldconfig -p | grep cuvid’ libnvcuvid.so.1 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libnvcuvid.so.1
[/i]

ref https://github.com/NVIDIA/nvidia-docker/issues/1001 https://github.com/NVIDIA/nvidia-docker/issues/1001 (I did not test)

I also have the same issue and same error message when running the sample applications included in the DeepStream SDK 4.0.1 on the sample video files[deepstream-app]

0:00:01.631031231 18807 0x7f463c074680 WARN qtdemux qtdemux.c:3031:qtdemux_parse_trex: failed to find fragment defaults for stream 1
0:00:01.631093307 18807 0x7f463c074680 WARN qtdemux qtdemux.c:3031:qtdemux_parse_trex: failed to find fragment defaults for stream 2
Failed to query video capabilities: Invalid argument
libv4l2: error getting capabilities: Invalid argument
0:00:01.666634955 18807 0x7f4634012ed0 WARN v4l2 v4l2_calls.c:98:gst_v4l2_get_capabilities: error: Error getting capabilities for device ‘/dev/nvhost-nvdec’: It isn’t a v4l2 driver. Check if it is a v4l1 driver.
0:00:01.666642978 18807 0x7f4634012ed0 WARN v4l2 v4l2_calls.c:98:gst_v4l2_get_capabilities: error: system error: Invalid argument
0:00:01.666716360 18807 0x7f4634012ed0 WARN videodecoder gstvideodecoder.c:2535:gst_video_decoder_change_state: error: Failed to open decoder
0:00:01.666731992 18807 0x7f4634012ed0 WARN decodebin gstdecodebin2.c:2325:connect_pad: Couldn’t set nvv4l2decoder0 to READY
0:00:01.687836177 18807 0x562239f424f0 WARN nvstreammux gstnvstreammux.c:309:gst_nvstreammux_chain:<src_bin_muxer> error: Input buffer number of surfaces (2054847098) must be equal to mux->num_surfaces_per_frame (1)
Set nvstreammux property num-surfaces-per-frame appropriately

ERROR from src_bin_muxer: Input buffer number of surfaces (2054847098) must be equal to mux->num_surfaces_per_frame (1)
Set nvstreammux property num-surfaces-per-frame appropriately

Debug info: gstnvstreammux.c(309): gst_nvstreammux_chain (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstNvStreamMux:src_bin_muxer
Creating LL OSD context new
0:00:01.691490795 18807 0x7f463c074680 WARN qtdemux qtdemux.c:6073:gst_qtdemux_loop: error: Internal data stream error.
0:00:01.691507444 18807 0x7f463c074680 WARN qtdemux qtdemux.c:6073:gst_qtdemux_loop: error: streaming stopped, reason error (-5)
ERROR from qtdemux0: Internal data stream error.
Debug info: qtdemux.c(6073): gst_qtdemux_loop (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin0/GstURIDecodeBin:src_elem/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0:
streaming stopped, reason error (-5)
Quitting
App run failed

Hi liangjia1989,

Please help to open a new topic. Thanks

I think I have the same issue, I wasn’t sure so I opened a post here.