Issues with raspberry pi camera on jetson nano in headless mode

When I tried running programs from this repository GitHub - JetsonHacksNano/CSI-Camera: Simple example of using a CSI-Camera (like the Raspberry Pi Version 2 camera) with the NVIDIA Jetson Developer Kit,
it works when I connect the jetson nano to a monitor but doesn’t work when I connect the jetson nano to my laptop via putty. This is output I get when I run face_detect.py.

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 = 2
Output Stream W = 1920 H = 1080
seconds to Run = 0
Frame Rate = 29.999999
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (933) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1

(python:6757): Gtk-WARNING **: 23:07:45.308: cannot open display:
CONSUMER: Done Success
(Argus) Error InvalidState: Argus client is exiting with 2 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 357)
WARNING Argus: 6 client objects still exist during shutdown:
548222573856 (0x7f50000ee0)
548227818160 (0x7f50000c70)
548227818512 (0x7f50001ff0)
548227824464 (0x7f50002100)
548227825600 (0x7f50003c80)
548227833912 (0x7f50003d98)

I am using a raspberry pi camera V2.1. I have verified that it works when I connect it with a monitor setup but it only seems to have this error in the headless mode setup.

Did you test X11 forwarding?

Connection - SSH - X11 ‘X11 forwarding’

Hi,
In the sample, it calls the function for creating a window for video display:

cv2.namedWindow(window_title, cv2.WINDOW_AUTOSIZE)
cv2.imshow(window_title, camera_images)

For headless mode, you would need to customize the sample to remove the function calls. May refer to this transcoding sample and try to save to a video file:
Displaying to the screen with OpenCV and GStreamer - #9 by DaneLLL

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