Jetson Nano Tutorial Camera Issues

I’ve set up the Jetson Nano and can successfully use both the CSI and USB cameras on it (which I’ve tested with programs such as the Cheese webcam app and OpenCV code.

But when I try to execute either the CSI-Camera or the USB Camera python programs in the tutorial, they both fail. (Yes, I did add the second device to the Docker command.)

The error messages don’t really tell me anything useful. Any idea why this would be happening or how I could troubleshoot the issue?


Hi @roy.a.wilsker, which tutorial / container are you running?

Can you provide the command line you are using to launch the container, and the error you recieve?

Also can you post the output of ls /dev/video*? Thanks!

[Getting Started with AI on Jetson Nano][Setting up your Jetson Nano]
[Headless Device Mode]

Output of ls /dev/video*
/dev/video0 /dev/video1

To launch the Docker container:

Contents of docker_dli_run,sh:
sudo docker run --runtime nvidia -it --rm --network host --volume ~/nvdli-data:/nvdli-nano/data --device /dev/video0 --device /dev/video1

Error occurs with running csi_camera.ipynb or usb_camera.ipynb

Command [ls -ltrh /dev/video*] returns
crw-rw---- 1 root video 81, 4 Oct 9 18:44 /dev/video1
crw-rw---- 1 root video 81, 0 Oct 9 18:44 /dev/video0
(Should that last “-” be a “+”? I don’t know how to fix that. Some varian of chmod?)

Next command:
from jetcam.csi_camera import CSICamera
camera = CSICamera(width=224, height=224)
“RuntimeError: Could not initialize camera. Please see error trace.”

(Are there some different parameters I need in the call to CSICamera? Can’t find any documentation for that.)

In the usb_camera.ipynb, the corresponding code is:
from jetcam.usb_camera import USBCamera

camera = USBCamera(width=224, height=224, capture_width=640, capture_height=480, capture_device=0)

Which give the same error.

Appreciate any help you can provide. I’m experienced with Python and Jupyter, but new to the Nano, so my feelings won’t be hurt if you tell me I’m misunderstanding something basic.

This may not be a meaningful answer… I have very poor experience with Docker containers, but you may lack a binding to /tmp/argus_socket that is used by nvarguscamerasrc gstreamer plugin.
Searching this forum you may find the appropriate setting.

1 Like

You are my hero. Adding that parameter to the docker file made everything work!

For the record, after a Google search, I added:
-v /tmp/argus_socket:/tmp/argus_socket

(I don’t know if it needs to be in twice. I’ll try it with just one /tmp/argus_socket)

Now both CSI_camera and USB_camera work perfectly. (I did have to change capture_device=0 to capture_device=1 in the USB routine.)

Thank you!

1 Like

I had exactly the same problem!
“-v /tmp/argus_socket:/tmp/argus_socket”
to solved it.

Thank you very much!