I am trying to run the code on a Jetson TX2 with the on-board camera as well as trying it with a USB camera.
v4l2-ctl --list-devices
gives the following output:
vi-output, ov5693 2-0036 (platform:15700000.vi:2):
/dev/video0
EyeToy USB camera Namtai (usb-3530000.xhci-2.2):
/dev/video1
The following works when I execute in the terminal:
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=3820, height=2464, framerate=21/1, format=NV12' ! nvvidconv flip-method=0 ! 'video/x-raw,width=960, height=616' ! nvvidconv ! nvegltransform ! nveglglessink -e
However I am running into this error, when I tried with nvarguscamerasrc inside a docker:
(darknet:80): GStreamer-CRITICAL **: 22:29:48.583: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed
VIDEOIO ERROR: V4L: device nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=3820, height=2464, framerate=21/1, format=NV12' ! nvvidconv flip-method=0 ! 'video/x-raw,width=960, height=616' ! nvvidconv ! nvegltransform ! nveglglessink -e: Unable to query number of channels
When I tried with v4l2src, I get the following error:
GStreamer-CRITICAL **: 16:12:31.784: gst_element_get_state: assertion ‘GST_IS_ELEMENT (element)’ failed
VIDEOIO ERROR: V4L: device v4l2src device=/dev/video0 ! video/x-raw, framerate=30/1, width=640, height=360 ! videoconvert ! appsink: Unable to query number of channels```
Any help is greatly appreciated.