USB camera stops in the middle of runnning (Jetson Nano 4GB)

Hello.

capture = cv2.VideoCapture(0)
while(True):
ret, frame = capture.read()
cv2.imshow(‘frame’,frame)
if cv2.waitKey(30) & 0xFF == ord(‘q’):
break
capture.release()
cv2.destroyAllWindows()

I run this program.
But,3 min later, cv2window got dark and program stopped suddenly.

I use 5V 4A power supply and jetson can afford to use a CPU and GPU according to the jtop.
jetson _ clocks is valid.

My camera specs shown below

ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: ‘YUYV’
Name : YUYV 4:2:2
Size: Discrete 640x480
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.111s (9.000 fps)
Size: Discrete 1280x1024
Interval: Discrete 0.111s (9.000 fps)
Size: Discrete 352x288
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 320x240
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 176x144
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 160x120
Interval: Discrete 0.033s (30.000 fps)

So, please help me why I can’t use this camera.

Hi,
Please try gst-launch-1.0 command and check if the issue is present. Would like to know if it is specific to using OpenCV or not. Please follow the steps:
Jetson Nano FAQ
[Q: I have a USB camera. How can I launch it on Jetson Nano?]

I tried gst-launch-1.0 command and I checked for the same problem.

The camera window did not dark, but it is frozen.

Hi,
Are you able to cross-check with other USB cameras or Jetson Nanos? Would like to know if it happens to specific Jetson Nano module, or specific cameras. From the symptom, it looks to be instability in hardware devices instead of software.

Hi,
I tyed another camera and Another camera of the same type.

same type is frozen.
But another camera is not frozen.

So,I think the USB camera is bad.
Is this problem caused by compatibility?

How about test your USB camera with specific format?
e.g 640x480 @ 30

Thank you for your advice.
I tried 640×480 @30.40 … 100,200

But results are same. Camera window is frozen.

Did you check Jetson Power mode?

Yes I did.
I always check in jtop.

I met some low-price USB webcams have issues to init. They copied Logitech products. Among 10+ devices, 2~3 cameras have these issues.

Though we have different status, USB webcam might have some issues.
G’Luck

Thank you.
I will buy a good camera.

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