Hi, I am trying to get my IMX219-160 IR camera to record a video stream on Jetson Orin Nano 8Gb for an object detection model. I’m currently working with JetPack 5.1.2. The camera is connected via MIPI CSI connector on the dev kit using a 15pin to 22pin CSI cable. I know that camera is functional because I was able to record video on an old Jetson Nano. But the camera doesn’t work on the Orin Nano.
Keep in mind I am a beginner when it comes to Jetson devkits.
All the following attempts have been made with jetsonI/O CSI settings to “IMX-219 Dual mode” in the menu accessible by the following terminal command:
$ sudo /opt/nvidia/jetson-io/jetson-io.py
I tried using the opencv python library to capture footage. I have the following python script:
import cv2
camera = cv2.VideoCapture(0)
print("videocapture")
success, image = camera.read()#check if the capture is successful and get camera image
if success:
print("capture successful")
cv2.imshow("image", image)#display the image
camera.release()
cv2.destroyAllWindows()
I get the following error message:
[ WARN:0@10.076] global cap_v4l.cpp:1119 tryIoctl VIDEOIO(V4L2:/dev/video0): select() timeout.
I updated the cv2 package but I can’t seem to get the capture event to work right. I can’t figure out what this error means either.
I checked the device list through v4l2 with:
$ v4l2-ctl --list-devices
I can see the imx219 in the output:
NVIDIA Tegra Video Input Device (platform:tegra-camrtc-ca):
/dev/media0
vi-output, imx219 9-0010 (platform:tegra-capture-vi:1):
/dev/video0
I tried another approach by using a Gstreamer pipeline to connect to the camera.
I used to launch the camera on the old nano with the following terminal command :
$ gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! nvoverlaysink
It doesn’t work anymore (nvoverlaysink was deprecated). I tried with nveglglessink but it didn’t work either:
- nveglglessink:
input:
$ gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! nveglglessink
output:
Setting pipeline to PAUSED ...
Using winsys: x11
Pipeline is live and does not need PREROLL ...
Got context from element 'eglglessink0': gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3280 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: 3280 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: 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.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:694 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:247 (propagating)
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: CANCELLED
Additional debug info:
Argus Error Status
Execution ended after 0:00:03.010078874
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
Freeing pipeline ...
(gst-launch-1.0:13931): GStreamer-WARNING **: 14:16:08.638: The default memory allocator was freed!
(gst-launch-1.0:13931): GStreamer-CRITICAL **: 14:16:08.639: gst_object_unref: assertion '((GObject *) object)->ref_count > 0' failed
I also tried by using v4l2 directly with the following command:
$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=3080,height=2464,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test.raw
When I run this the terminal just freezes and I don’t get any output.
If anyone has any idea what could be wrong I am open to any and all suggestions, any help would be greatly appreciated. Just keep in mind I am new to Jetson hardware.
Thank you.
Jad.