Using the jetcam library on a Jetson orin nano device(headful mode) to interface with a USB camera. When capturing an image, I get the following GStreamer warning after the line of code"camera = USBCamera(width=224, height=224, capture_width=640, capture_height=480, capture_device=0)".
WARN:0@1.072] global cap_gstreamer.cpp:1728 open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
Additionally, the image displayed is a black screen. Camera is Logitech C720.
Full code is below,
"!ls -ltrh /dev/video*
from jetcam.usb_camera import USBCamera
#TODO change capture_device if incorrect for your system
camera = USBCamera(width=224, height=224, capture_width=640, capture_height=480, capture_device=0)
image = camera.read()
print(image.shape)
print(camera.value.shape)
import ipywidgets
from IPython.display import display
from jetcam.utils import bgr8_to_jpeg
image_widget = ipywidgets.Image(format=‘jpeg’)
image_widget.value = bgr8_to_jpeg(image)
display(image_widget)"
Please help on any suggestions to fix the GStreamer warning and black screen issue? I’ve ensured drivers are updated and camera is recognized.
Hello DaneLLL, Thanks for the response. I tried “$ gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,format=YUY2,width=640,height=480,framerate=30/1 ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=NV12’ ! nvoverlaysink” and it is giving a warning "WARNING: erroneous pipeline: no element “nvoverlaysink” "
Supported formats are,
~$ v4l2-ctl -d /dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
This is for Jetson Nano/Jetpack 4. If your platform is Orin Nano, it is possible that it doesn’t work properly. Please confirm which platform you are using. The camera source is good and it seems like the platform is not compatible with the application.