Failed to allocate required memory for USB cam in jetson nano

I am using two CSI Camera Arducam IMX 477 connected via 2.0 USB converter with the cv2 gstreamer pipeline. Resolution is 640*480

usb_pipeline = (
f’v4l2src device=/dev/video{sensor_id} ! ’
f’image/jpeg, width={config.camera_resolution[0]}, height={config.camera_resolution[1]}, framerate=80/1 ! ’
'jpegdec ! ’
'videoconvert ! ’
‘appsink’
)

It works fine, but after a day or two, one of the two cameras starts throwing the Failed to allocate memory error, while the second camera works perfectly fine.

We have tried the following approaches

  • Reconnect the USB camera and it works
  • unmount and mount the camera but it didn’t work.

I am looking for solution that works without reconnecting the camera manually with jetson.

Hi @soniaakbar

Have you tried using a different USB port or with only the failing camera?
Also, have you tried a simple pipelines like “v4l2src + fakesink”?

Regards,

Enrique Ramirez
Embedded SW Engineer at RidgeRun
Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com
Website: www.ridgerun.com

I have tried all the USB ports, and we face the same issue (The camera stopped working after some time).
But after getting the error when I switched the port, the camera started working again.

I have also tried the simple pipeline with Fakesink.

Hi,
It seems to be memory leak. Pleaser try to run the two cameras in gst-launc-1.0 commands and see if the issue is still present. The command may be like:

gst-launch-1.0 v4l2src device=/dev/video0 ! jpegdec ! nvideoconvert ! fakesink sync=0 v4l2src device=/dev/video1 ! jpegdec ! nvideoconvert ! fakesink sync=0

Just another suggestion in case the gst-launch-1.10 suggested command still not working. Maybe you should check if the power adapter could be the problem:

https://forums.developer.nvidia.com/t/power-supply-considerations-for-jetson-nano-developer-kit/71637

1 Like

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