Hey everyone, I’m having trouble getting the IMX519 autofocus camera working with my Jetson Orin Nano running JetPack 6.2 (kernel 5.15.148-tegra-36.4.3).
Here’s what I’ve done so far:
Installed the Arducam kernel driver package: arducam-nvidia-l4t-kernel-t234-nx-5.15.148-tegra-36.4.3-20250205154605_arm64_imx519.deb
During install I got this warning, but I think it’s unrelated since it’s about the IMX477:
ls: cannot access 'nv_imx477.ko.bak': No such file or directory
The camera shows up in the system:
$ ls /dev/video*
/dev/video0
$ v4l2-ctl --list-devices
NVIDIA Tegra Video Input Device (platform:tegra-camrtc-ca):
/dev/media0
vi-output, imx519 9-001a (platform:tegra-capture-vi:2):
/dev/video0
GStreamer capture works perfectly with nvarguscamerasrc — I can see the video feed at 1920x1080. So the hardware and kernel driver seem fine.
But when I try to run the Python focuser script (FocuserExample.py), it fails with “Failed to open camera!”. The script uses a JetsonCamera.py class that wraps OpenCV. I’m stuck — not sure if this is a script bug or something wrong with my environment. Any ideas?
Thanks for the detailed breakdown. The fact that GStreamer with nvarguscamerasrc works is actually great news — it confirms your IMX519 hardware, the I2C connection, and the Arducam kernel driver are all functioning correctly. The nv_imx477.ko.bak warning during install is indeed harmless and unrelated.
So the problem is isolated to the Python layer, specifically how JetsonCamera.py is opening the camera. A couple of questions:
Where did you get your copy of FocuserExample.py and JetsonCamera.py? Are they from the official ArduCAM GitHub repo, or did they come from somewhere else?
Could you share the full traceback you’re seeing? That’ll help narrow down where in open_camera() it’s failing.
Yeah, I was relieved that GStreamer worked — at least the camera isn’t DOA!
Here’s the full traceback:
Frame size 0 x 0 FPS : 0.0
Traceback (most recent call last):
File "/home/jetson_user/Source Code/FocuserExample.py", line 193, in <module>
main()
File "/home/jetson_user/Source Code/FocuserExample.py", line 181, in main
camera = Camera()
File "/home/jetson_user/Source Code/JetsonCamera.py", line 138, in __init__
self.open_camera(width, height)
File "/home/jetson_user/Source Code/JetsonCamera.py", line 166, in open_camera
raise RuntimeError("Failed to open camera!")
RuntimeError: Failed to open camera!
The “Frame size 0 x 0 FPS : 0.0” bit looks suspicious — seems like it’s not getting any resolution info back.
These scripts came from the ArduCAM docs/reference I was following (the 16MP IMX519 quick start guide). They’re in a local folder on my Jetson. I haven’t tried pulling from the GitHub repo yet — should I grab the official Jetson_IMX519_Focus_Example repo instead?
That “Frame size 0 x 0 FPS : 0.0” is definitely the smoking gun. It means cv2.VideoCapture is opening but not actually pulling frames through the GStreamer pipeline — which suggests OpenCV on your system may not have been built with GStreamer support.
Yes, definitely grab the official repo first to rule out any local script issues:
Clone that and try running the focus example from there. But I suspect even the official scripts will hit the same wall if OpenCV can’t talk to GStreamer.
Next thing to check: run this and see if GStreamer shows up in the OpenCV build configuration:
Well, there it is. OpenCV was compiled without GStreamer support. That explains why nvarguscamerasrc works fine from the command line (native GStreamer) but the Python/OpenCV path fails — cv2 can’t pipe frames through GStreamer at all.
Is there a way to fix this without nuking the whole system? Or am I looking at a JetPack reinstall?
That confirms it — OpenCV without GStreamer support on Jetson is basically crippled for camera work.
You could try building OpenCV from source with GStreamer enabled, but honestly on JetPack that’s pretty involved — you’d need to make sure all the right flags are set, the Tegra-specific patches are applied, CUDA support lines up, etc. It’s easy to end up in a worse state.
The cleanest path is to re-flash JetPack 6.2 from scratch. The stock OpenCV build that ships with JetPack should have GStreamer enabled out of the box. Something likely went sideways during your original flash or an upgrade step got skipped.
After a fresh flash, before installing anything else, run that same OpenCV build info check to confirm GStreamer: YES. Then install the Arducam kernel driver and you should be good to go.
Reinstalled the Arducam imx519 kernel driver, cloned the official Jetson_IMX519_Focus_Example repo, and the focuser script opens the camera without any issues now. Frame size is reported correctly and the autofocus controls all work.
So to summarize for anyone hitting the same thing:
If nvarguscamerasrc works in GStreamer but Python/OpenCV fails with “Failed to open camera”, check cv2.getBuildInformation() for GStreamer: YES
If GStreamer is missing from OpenCV, something went wrong with your JetPack image — a full reflash is the most reliable fix