# Jetson Nano Tutorial Camera Issues

**URL:** <https://forums.developer.nvidia.com/t/jetson-nano-tutorial-camera-issues/156696>\
**Category:** Jetson Nano\
**Tags:** ai-training, camera\
**Created:** [October 9, 2020, 1:53pm UTC](https://forums.developer.nvidia.com/t/jetson-nano-tutorial-camera-issues/156696 "2020-10-09T13:53:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![roy.a.wilsker](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/roy.a.wilsker/32/39667_2.png) [@roy.a.wilsker](https://forums.developer.nvidia.com/u/roy.a.wilsker)\
**Post date:** [October 9, 2020, 1:53pm UTC](https://forums.developer.nvidia.com/t/jetson-nano-tutorial-camera-issues/156696/1 "2020-10-09T13:53:55Z")

</div>

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?

Thanks.

---

<div class="post-metadata">

**Author:** ![dusty\_nv](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/dusty_nv/32/14043_2.png) [@dusty\_nv](https://forums.developer.nvidia.com/u/dusty_nv)\
**Post date:** [October 9, 2020, 5:50pm UTC](https://forums.developer.nvidia.com/t/jetson-nano-tutorial-camera-issues/156696/2 "2020-10-09T17:50:46Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![roy.a.wilsker](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/roy.a.wilsker/32/39667_2.png) [@roy.a.wilsker](https://forums.developer.nvidia.com/u/roy.a.wilsker)\
**Post date:** [October 9, 2020, 6:54pm UTC](https://forums.developer.nvidia.com/t/jetson-nano-tutorial-camera-issues/156696/3 "2020-10-09T18:54:57Z")

</div>

[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:  
./docker\_dli\_run.sh

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 [nvcr.io/nvidia/dli/dli-nano-ai:v2.0.0-r32.4.3](http://nvcr.io/nvidia/dli/dli-nano-ai:v2.0.0-r32.4.3)

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)  
Returns:  
“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.

---

<div class="post-metadata">

**Author:** ![Honey\_Patouceul](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/honey_patouceul/32/389777_2.png) [@Honey\_Patouceul](https://forums.developer.nvidia.com/u/Honey_Patouceul)\
**Post date:** [October 9, 2020, 7:01pm UTC](https://forums.developer.nvidia.com/t/jetson-nano-tutorial-camera-issues/156696/4 "2020-10-09T19:01:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![roy.a.wilsker](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/roy.a.wilsker/32/39667_2.png) [@roy.a.wilsker](https://forums.developer.nvidia.com/u/roy.a.wilsker)\
**Post date:** [October 9, 2020, 7:20pm UTC](https://forums.developer.nvidia.com/t/jetson-nano-tutorial-camera-issues/156696/5 "2020-10-09T19:20:54Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![yi.dong](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@yi.dong](https://forums.developer.nvidia.com/u/yi.dong)\
**Post date:** [October 9, 2020, 8:38pm UTC](https://forums.developer.nvidia.com/t/jetson-nano-tutorial-camera-issues/156696/6 "2020-10-09T20:38:48Z")

</div>

I had exactly the same problem!  
adding  
“-v /tmp/argus\_socket:/tmp/argus\_socket”  
to docker\_dli\_run.sh solved it.

Thank you very much!

---

<div class="post-metadata">

**Author:** ![nadeemm](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nadeemm/32/367020_2.png) [@nadeemm](https://forums.developer.nvidia.com/u/nadeemm)\
**Post date:** [October 15, 2021, 4:11pm UTC](https://forums.developer.nvidia.com/t/jetson-nano-tutorial-camera-issues/156696/7 "2021-10-15T16:11:31Z")

</div>

Closed on October 15, 2021, 4:11pm UTC


