Issue when try to use v4l2loopback and nvv4l2camerasrc

Hi,
I built v4l2loopback from Makefile in the repo.
I also installed v4l2loopback using dkms, but still got the same errors.
As I aforementioned, v4l2 source at /dev/video0 has information like below:
image
After creating a v4l2loopback virtual device at /dev/video2 by

  • gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-raw' ! v4l2sink device=/dev/video2
  • or gst-launch-1.0 nvv4l2camerasrc device=/dev/video0 ! 'video/x-raw(memory:NVMM), format=UYVY' ! nvvidconv ! identity drop-allocation=true ! queue ! v4l2sink device=/dev/video2

The information of virtual device at /dev/video2 is:
image
And I get the errors below when running the command gst-launch-1.0 nvv4l2camerasrc device=/dev/video2 ! 'video/x-raw(memory:NVMM), format=UYVY' ! nvvideoconvert ! fpsdisplaysink video-sink=fakesink --verbose :

Setting pipeline to PAUSED ā€¦
Pipeline is live and does not need PREROLL ā€¦
0:00:00.177551872 8545 0xaaaae6d13ea0 FIXME default gstutils.c:3980:gst_pad_create_stream_id_internal:nvv4l2camerasrc0:src Creating random stream-id, consider implementing a deterministic way of creating a stream-id
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0: sync = false
Setting pipeline to PLAYING ā€¦
New clock: GstSystemClock
0:00:00.179955616 8545 0xaaaae6d13ea0 WARN nvv4l2camerasrc gstnvv4l2camerasrc.cpp:684:gst_nv_v4l2_camera_fixate: Unable to fixate caps structure
0:00:00.180369312 8545 0xaaaae6d13ea0 ERROR nvv4l2camerasrc gstnvv4l2camerasrc.cpp:844:gst_nv_v4l2_camera_set_caps: VIDIOC_REQBUFS on /dev/video2 device
0:00:00.180536704 8545 0xaaaae6d13ea0 WARN basesrc gstbasesrc.c:3072:gst_base_src_loop: error: Internal data stream error.
0:00:00.180591328 8545 0xaaaae6d13ea0 WARN basesrc gstbasesrc.c:3072:gst_base_src_loop: error: streaming stopped, reason not-negotiated (-4)
ERROR: from element /GstPipeline:pipeline0/GstNvV4l2CameraSrc:nvv4l2camerasrc0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstNvV4l2CameraSrc:nvv4l2camerasrc0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.001828544
Setting pipeline to NULL ā€¦
Freeing pipeline ā€¦

I consider those above information is able to answer your question or not. Actually, Iā€™m not sure what ā€˜sensor/connection/driverā€™ you mentioned is.

The VIDIOC_REQBUFS error could be v4l2sink unable support V4L2_MEMORY_DMABUF you can download the source code of nvv4l2camerasrc to figure it out.

1 Like

Hi @ShaneCCC ,
Could you please tell me where I can get the source code of nvv4l2camerasrc? I find in the Deepstream installer tar file but could not see it.
And as you said, ā€œThe VIDIOC_REQBUFS error could be v4l2sink unable support V4L2_MEMORY_DMABUFā€, so does the error come from v4l2sinkā€™s side or nvv4l2camerasrcā€™s side ?
Pls give me a guide how to custom code to make v4l2sink support V4L2_MEMORY_DMABUF so that I can rebuilt it later.

Check below link. Should be in the Driver Package sources.

v4l2sink may be in gstreamer plugins-good repo. Not sure, but the issue may also be related to v4l2loopback.

1 Like

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