Exception: jetson.utils -- failed to create gstCamera device

Hello,

I am currently developing myself in object detection but there is an error that I couldn’t solve.

I use jetson.utils.gstCamera for execute my Raspberry Cam and so this is not working.

Here my code shown down below:

import jetson.inference
import jetson.utils
import time
import cv2
import numpy as np 

timeStamp=time.time()
fpsFilt=0
net=jetson.inference.detectNet('ssd-mobilenet-v2',threshold=.5)
dispW=1280
dispH=720
flip=2
font=cv2.FONT_HERSHEY_SIMPLEX

camSet='nvarguscamerasrc wbmode=3 tnr-mode=2 tnr-strength=1 ee-mode=2 ee-strength=1 ! video/x-raw(memory:NVMM), width=3264, height=2464, format=NV12, framerate=21/1 ! nvvidconv flip-method='+str(flip)+' ! video/x-raw, width='+str(dispW)+', height='+str(dispH)+', format=BGRx ! videoconvert ! video/x-raw, format=BGR ! videobalance contrast=1.5 brightness=-.2 saturation=1.2 ! appsink'
cam=cv2.VideoCapture(camSet)
cam=jetson.utils.gstCamera(dispW,dispH,'csi://0')

After I run this code everytime I get this errors:

[gstreamer] gstCamera failed to create pipeline
[gstreamer]    (could not link nvarguscamerasrc0 to nvvconv0, neither element can handle caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(string)21/130/1, format=(string)NV12)
[gstreamer] gstCamera -- failed to create device csi://0

Exception: jetson.utils -- failed to create gstCamera device

Could anyone help me please?
Thanks.

Hi,
It looks like the frame rate is not correctly set:

Please look at the source code:
jetson-utils/gstCamera.cpp at master · dusty-nv/jetson-utils · GitHub
And check if mOptions.frameRate is correctly set.

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