gstreamerv4l2gstreamer-1.0nvidia-jetson-nanousb-camera

Gstreamer can't capture video from USB-Camera


I have a HikVision MV-CA050-20UC USB-Camera(USB 3.0). I want to capture video from it on Nvidia Jetson Nano in Ubuntu by using gstreamer. After installing the drivers, /dev/video0 shows up after connecting the camera (it also vanishes once the camera is disconnected).

gst-launch-1.0 v4l2src device="/dev/video0" name=e ! 'video/x-raw, width=640, height=480' ! videoconvert ! 'video/x-raw, width=640, height=480, format=(string)YUY2' ! xvimagesink

or using this command

gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw,framerate=30/1,width=1280,height=720 ! xvimagesink

and it show me this message without any video:

Setting pipeline to PAUSED ...
ERROR: Pipeline doesnt want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Error getting capabilities for device /dev/video0: It isnt a v4l2 driver. Check if it is a v4l1 driver.
Additional debug info:
v4l2_calls.c(94): gst_v4l2_get_capabilities (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
system error: No such file or directory
Setting pipeline to NULL ...
Freeing pipeline ...

I am sure that v4l2 is installed correctly. But it could not detect plugged in usb camera.

v4l2-ctl --all


VIDIOC_QUERYCAP: failed: No such file or directory
/dev/video0: not a v4l2 node

or this result for 1050Ti system(another system):

Failed to query video capabilities: No such file or directory
libv4l2: error getting capabilities: No such file or directory
VIDIOC_QUERYCAP: failed: No such file or directory
/dev/video0: not a v4l2 node

also by running v4l2-ctl -d /dev/video0 --list-formats-ext I got same message.

Gstreamer version

gst-inspect-1.0 --version

gst-inspect-1.0 version 1.14.2
GStreamer 1.14.2
Unknown package origin

How could I resolve this problem. Thanks in advance.


Solution

  • Instead of using v4l2src I used Aravis A vision library for genicam based cameras and pylonsrc A gstreamer plugin for image capture from Basler's USB3 cameras. Please read the README before using and the problem was solved(As I used USB3 camera visions).