Can nvurisrcbin be used for opening USB cameras?

Is it possible to open device avialable under /deb/video0 using nvurisrcbin?
This one is supposed do be universal plugin for opening videos, a I think it could also handle cameras.

Example pipeline:

gst-launch-1.0 nvurisrcbin \
uri=usb://dev/video0 ! \
m.sink_0 nvstreammux name=m width=1280 height=720 batch-size=1 ! nvmultistreamtiler ! nveglglessink

Yes. Please refer to the FAQ.

I have already checked Deepstream docs about nvurisrcbin, but there is nothing about opening camera devices.

https://docs.nvidia.com/metropolis/deepstream/6.2/dev-guide/text/DS_plugin_gst-nvurisrcbin.html

I only know that file:// uri does not work

gst-launch-1.0 nvurisrcbin uri=file:///dev/video0 ! m.sink_0 nvstreammux name=m w
idth=1280 height=720 batch-size=1 ! nvmultistreamtiler ! nveglglessink
Setting pipeline to PAUSED ...

Using winsys: x11 
Pipeline is PREROLLING ...
Got context from element 'eglglessink0': gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
ERROR: from element /GstPipeline:pipeline0/GstDsNvUriSrcBin:dsnvurisrcbin0/GstURIDecodeBin:nvurisrc_bin_src_elem/GstFileSrc:source: Could not read from resource.
Additional debug info:
gstfilesrc.c(403): gst_file_src_fill (): /GstPipeline:pipeline0/GstDsNvUriSrcBin:dsnvurisrcbin0/GstURIDecodeBin:nvurisrc_bin_src_elem/GstFileSrc:source:
system error: Invalid argument
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

Please finish reading the FAQ I posted. At the end, we have introduced similar use cases.

using uridecodebin to connect the camera.
1 Like

Thanks, I just went straight to the docs in the mentioned link, I did not scroll further in that thread.
My fault.

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