CSI-Camera icon indicating copy to clipboard operation
CSI-Camera copied to clipboard

[BUG] can't start the camera

Open KevorkSulahian opened this issue 4 years ago • 23 comments

Describe the issue I simply can't start the camera

What version of L4T/JetPack L4T/JetPack version: nvidia-l4t-core 32.5.0-20210115145440

What version of OpenCV OpenCV version: 4.1.1

Python Version Python version if applicable: 3.6.9

To Reproduce Steps to reproduce the behavior: run the sample .py code

Expected behavior A clear and concise description of what you expected to happen. run the code ad open the camera

Additional context Add any other context about the problem here.

this is the error

nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)60/1 ! nvvidconv flip-method=0 ! video/x-raw, width=(int)1280, height=(int)720, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink GST_ARGUS: Creating output stream CONSUMER: Waiting until producer is connected... GST_ARGUS: Available Sensor modes : GST_ARGUS: 3264 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3264 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings: Camera index = 0 Camera mode = 5 Output Stream W = 1280 H = 720 seconds to Run = 0 Frame Rate = 120.000005 GST_ARGUS: Setup Complete, Starting captures for 0 seconds GST_ARGUS: Starting repeat capture requests. CONSUMER: Producer has connected; continuing. nvbuf_utils: dmabuf_fd -1 mapped entry NOT found nvbuf_utils: Can not get HW buffer from FD... Exiting... [ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (1757) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module nvarguscamerasrc0 reported: CANCELLED

(python3:9699): GStreamer-CRITICAL **: 22:47:20.231: gst_mini_object_set_qdata: assertion 'object != NULL' failed (Argus) Error EndOfFile: Unexpected error in reading socket (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 266) (Argus) Error EndOfFile: Receive worker failure, notifying 1 waiting threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 340) (Argus) Error InvalidState: Argus client is exiting with 1 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 357) (Argus) Error EndOfFile: Client thread received an error from socket (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 145) (Argus) Error EndOfFile: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 87) (Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 96) (Argus) Error InvalidState: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 87) GST_ARGUS: Cleaning up (Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 96) (Argus) Error InvalidState: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 87) Segmentation fault (core dumped)

KevorkSulahian avatar Feb 06 '21 18:02 KevorkSulahian

Hello @KevorkSulahian I am facing the same issue, did you solve it?

init-22 avatar Mar 23 '21 17:03 init-22

Hey @isaac-223 I unfortunately did not, if you do please make sure to write to me I will really appreciate it

KevorkSulahian avatar Mar 23 '21 18:03 KevorkSulahian

@KevorkSulahian so the error was related to camera which didn't have proper setup; I changed the camera and it worked!

init-22 avatar Mar 25 '21 13:03 init-22

I ran into the same issue and stuck for several days, I would be appreciated if someone can help. It shows the same issue on both CSI and USB camera.

carlinl avatar Apr 12 '21 09:04 carlinl

Apparently you have to change the camera

On Mon, Apr 12, 2021, 1:20 PM JIHUI(sarah) LIANG @.***> wrote:

I ran into the same issue and stuck for several days, I would be appreciated if someone can help. It shows the same issue on both CSI and USB camera.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JetsonHacksNano/CSI-Camera/issues/36#issuecomment-817642654, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEZMY25ANPX7Y3SIQPR3WQDTIK3PPANCNFSM4XGR6KCQ .

KevorkSulahian avatar Apr 12 '21 09:04 KevorkSulahian

Honestly, I don't think it's because of the camera, cuz both of them got the same error, and I tested USB camera on my MAC, it worked fine, also the type of the camera is compatible with Jetson Nano. Thanks anyway :P I'll comment out if I have any progress.

carlinl avatar Apr 12 '21 11:04 carlinl

Hope you're right and if you find a fix for it let me know because I can't use mine

On Mon, Apr 12, 2021, 3:32 PM JIHUI(sarah) LIANG @.***> wrote:

Honestly, I don't think it's because of the camera, cuz both of them got the same error, and I tested USB camera on my MAC, it worked fine, also the type of the camera is compatible with Jetson Nano. Thanks anyway :P

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JetsonHacksNano/CSI-Camera/issues/36#issuecomment-817734402, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEZMY2YGRYL2HCF34Q43HVTTILK33ANCNFSM4XGR6KCQ .

KevorkSulahian avatar Apr 12 '21 11:04 KevorkSulahian

I solve this problem by reinstall the older version of the Jetson Nano image on SD-card. I tested the usb camera by installing camorama and cheese, after running cheese command it worked fine. I guess it might because there's some unsolved issue on latest version of image.

carlinl avatar Apr 13 '21 03:04 carlinl

Hi @carlinl I am also stuck on this problem with Jetpack 4.5.0. Could you please tell me which older version of Jetpack image you installed?

stephentandjiria avatar Apr 22 '21 14:04 stephentandjiria

I've installed Jetpack 4.4

carlinl avatar Apr 23 '21 04:04 carlinl

@carlinl thankyou, I really appreciate it!

Though for anyone reading this, at this point I still can't confirm Jetpack 4.4 works because my download for both 4.4 and 4.4.1 zip files are corrupted for unknown reasons, but I believe it's worth to try.

stephentandjiria avatar Apr 23 '21 11:04 stephentandjiria

@KevorkSulahian so the error was related to camera which didn't have proper setup; I changed the camera and it worked!

I am facing the same issue with Jetson Nano, Jetpack 4.5.1 & raspi v2 camera.

@init-22 could you explain which camera were you using initially & what did you replace it with? Also what steps did you follow for the "setup" of your new camera?

I will also try out the method suggested by @carlinl, but wanted to see if there is any quick fix for it.

KavitShah1998 avatar May 12 '21 16:05 KavitShah1998

@KavitShah1998 I was using Waveshare IMX219-160 and then I switched to Arducom IMX291. Hope this helps

init-22 avatar May 13 '21 12:05 init-22

@init-22 I am using waveshare IMX219-160 and it worked in the past.Now it did not work. I am waiting for my Arducom IMX291.

ghost avatar Aug 20 '21 15:08 ghost

You certainely make a shortcut with your camera in the heatsink so now your camera module is broken

AlexandreBourrieau avatar Aug 27 '21 14:08 AlexandreBourrieau

ave to change the camera

I have tried three cameras, one from Arducam (B0342) and two from Waveshare (IMX219-160). I get the same error for all three cameras. Did anyone find a solution to this problem? I am using Jetpack 4.6.

radhen avatar Jan 07 '22 21:01 radhen

I solve this problem by reinstall the older version of the Jetson Nano image on SD-card. I tested the usb camera by installing camorama and cheese, after running cheese command it worked fine. I guess it might because there's some unsolved issue on latest version of image.

@carlinl , which JetPack version work for you?

radhen avatar Jan 07 '22 21:01 radhen

I have the same issue, and it doesn't seem to be a camera issue : using gst-launch-1.0 nvarguscamerasrc ! nvegltransform ! nveglglessink works, but using the nvvidconv ! videoconvert pipeline doesn't. This seems to be a configuration issue somewhere. Furthermore, the nvvidconv ! videoconvert pipeline worked before I used it in opencv, where it only worked once... Has anyone gotten more insights into this issue since the last post ?

Moddingear avatar Apr 27 '22 14:04 Moddingear

I have the same issue, and it doesn't seem to be a camera issue : using gst-launch-1.0 nvarguscamerasrc ! nvegltransform ! nveglglessink works, but using the nvvidconv ! videoconvert pipeline doesn't. This seems to be a configuration issue somewhere. Furthermore, the nvvidconv ! videoconvert pipeline worked before I used it in opencv, where it only worked once... Has anyone gotten more insights into this issue since the last post ?

Could you please share your full gsteamer pipelines? Both with nvvidconv ! videoconvert and with gst-launch-1.0 nvarguscamerasrc ! nvegltransform ! nveglglessink.

dleporis avatar Oct 25 '22 11:10 dleporis

I have the same issue, and it doesn't seem to be a camera issue : using gst-launch-1.0 nvarguscamerasrc ! nvegltransform ! nveglglessink works, but using the nvvidconv ! videoconvert pipeline doesn't. This seems to be a configuration issue somewhere. Furthermore, the nvvidconv ! videoconvert pipeline worked before I used it in opencv, where it only worked once... Has anyone gotten more insights into this issue since the last post ?

Could you please share your full gsteamer pipelines? Both with nvvidconv ! videoconvert and with gst-launch-1.0 nvarguscamerasrc ! nvegltransform ! nveglglessink.

In the end I got opencv working : I was using a library that listed v4l2 devices that interacted incorrectly with the drivers for nvargus. Updating the library or removing it fixed the issue.

Moddingear avatar Oct 25 '22 11:10 Moddingear

Hi, @Moddingear , I have met the save problem. Could you tell me what library did you update or remove?

UUUUUUsername avatar Nov 27 '22 08:11 UUUUUUsername

Hi, @Moddingear , I have met the save problem. Could you tell me what library did you update or remove?

It was this library : https://github.com/doleron/v4l2-list-devices The 9 June 2022 version works, the earlier ones don't.

Moddingear avatar Nov 27 '22 11:11 Moddingear

Hi, @Moddingear , I have met the save problem. Could you tell me what library did you update or remove?

It was this library : https://github.com/doleron/v4l2-list-devices The 9 June 2022 version works, the earlier ones don't.

Thank you for your reply! I just figured that the problem is that I did not add -D WITH_GSTREAMER when installing opencv.

UUUUUUsername avatar Nov 27 '22 11:11 UUUUUUsername