USB Camera won't work on Jetson Nano

Hi,

Just got my new Jetson nano B01 so new to it.

I can’t get the USB camera to work (Logitech, Inc. Webcam C270), either by command line or via applications such as cheese. Cheese just opens and closes. When trying to run in the command line I just get an error. I have tried a clean install and updating but nothing has worked.

It recognises the webcam as seen below…

dee@dee-desktop:~$ ls /dev/video*
/dev/video0
dee@dee-desktop:~$ lsusb
Bus 002 Device 002: ID 0bda:0411 Realtek Semiconductor Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 001 Device 005: ID 04d9:0006 Holtek Semiconductor, Inc.
Bus 001 Device 004: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 007: ID 046d:0825 Logitech, Inc. Webcam C270
Bus 001 Device 002: ID 0bda:5411 Realtek Semiconductor Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

But get this error…

dee@dee-desktop:~$ nvgstcapture-1.0 --mode=2 --camsrc=0 --cap-dev-node=/dev/video0
Encoder null, cannot set bitrate!
Encoder Profile = High
/dev/video/dev/video0 does not exist
Runtime USB Camera Commands:

Help : ‘h’
Quit : ‘q’
Set Capture Mode:
mo:
(1): image
(2): video
Get Capture Mode:
gmo
Capture: enter ‘j’ OR
followed by a timer (e.g., jx5000, capture after 5 seconds) OR
followed by multishot count (e.g., j:6, capture 6 images)
timer/multihot values are optional, capture defaults to single shot with timer=0s
Start Recording : enter ‘1’
Stop Recording : enter ‘0’
Set Preview Resolution:
pcr: e.g., pcr:2
(0) : 176x144
(1) : 320x240
(2) : 640x480
(3) : 1280x720
(4) : 1920x1080
NOTE: Preview/Encode resolution will be same as Capture resolution for USB-Camera
Get Preview Resolution:
gpcr
Get Image Capture Resolution:
gicr
Get Video Capture Resolution:
gvcr
Set Capture Device Node:
cdn: e.g., cdn:0
(0): /dev/video0
(1): /dev/video1
(2): /dev/video2
Get Capture Device Node:
gcdn

Runtime encoder configuration options:

Set Encoding Bit-rate(in bytes):
br: e.g., br:4000000
Get Encoding Bit-rate(in bytes):
gbr
Set Encoding Profile(only for H.264):
ep: e.g., ep:1
(0): Baseline
(1): Main
(2): High
Get Encoding Profile(only for H.264):
gep
Force IDR Frame on video Encoder(only for H.264):
Enter ‘f’

bitrate = 4000000
Encoder Profile = High
Encoder control-rate = 1
Encoder EnableTwopassCBR = 0
Opening in BLOCKING MODE
Opening in BLOCKING MODE
Opening in BLOCKING MODE
Segmentation fault (core dumped)

Any ideas?

Thanks,

Dee

Could you check v4l2-ctl --list-devices and try v4l2-ctl to capture if working you can try gst-launch-1.0 v4l2src …

Hi Shane,

I installed v4l utils and can get gst-launch-1.0 v4l3src ! xvimageslink to display the webcam.

I can also get nvgstcapture-1.0 --camsrc=0 --cap-dev-node=/dev/video0 to work in mode 1 but not in mode 2 for video (can only use for still images), I still get the error above.

I also noticed on boot up the error the imx219_board_setup: error during i2c read probe (-121), is this related? Is my board faulty?

I’m getting a v2 raspberry pi camera in the next couple of days so will try that but guessing I may run into the same problem.

I also tried an earlier version of jet pack (4.4) and Cheese worked with the webcam and the commands tried above including for video. Unfortunately I ran into problems while updating, the l4t bootloader failed
to fully install so have had nothing but issues so far so have reverted back to the latest version with another clean install.

The camera also isn’t recognised in VPI Demos v1.0.

Thanks for your help.
upload

What’s the v4l2-ctl --list-devices and v4l2-ctl --all show?

Hi Shane,

Here’s the output…

dee@dee-desktop:~$ v4l2-ctl --list-devices

UVC Camera (046d:0825) (usb-70090000.xusb-2.3):
/dev/video0

dee@dee-desktop:~$ v4l2-ctl --all 

Driver Info (not using libv4l2):
Driver name : uvcvideo
Card type : UVC Camera (046d:0825)
Bus info : usb-70090000.xusb-2.3
Driver version: 4.9.201
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
Width/Height : 640/480
Pixel Format : ‘YUYV’
Field : None
Bytes per Line : 1280
Size Image : 614400
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Limited Range)
Flags :
Crop Capability Video Capture:
Bounds : Left 0, Top 0, Width 640, Height 480
Default : Left 0, Top 0, Width 640, Height 480
Pixel Aspect: 1/1
Selection: crop_default, Left 0, Top 0, Width 640, Height 480
Selection: crop_bounds, Left 0, Top 0, Width 640, Height 480
Streaming Parameters Video Capture:
Capabilities : timeperframe
Frames per second: 30.000 (30/1)
Read buffers : 0
brightness 0x00980900 (int) : min=0 max=255 step=1 default=128 value=128
contrast 0x00980901 (int) : min=0 max=255 step=1 default=32 value=32
saturation 0x00980902 (int) : min=0 max=255 step=1 default=32 value=32
white_balance_temperature_auto 0x0098090c (bool) : default=1 value=1
gain 0x00980913 (int) : min=0 max=255 step=1 default=64 value=64
power_line_frequency 0x00980918 (menu) : min=0 max=2 default=2 value=2
white_balance_temperature 0x0098091a (int) : min=0 max=10000 step=10 default=4000 value=4000 flags=inactive
sharpness 0x0098091b (int) : min=0 max=255 step=1 default=24 value=24
backlight_compensation 0x0098091c (int) : min=0 max=1 step=1 default=0 value=0
exposure_auto 0x009a0901 (menu) : min=0 max=3 default=3 value=3
exposure_absolute 0x009a0902 (int) : min=1 max=10000 step=1 default=166 value=166 flags=inactive
exposure_auto_priority 0x009a0903 (bool) : default=0 value=1

Thanks,

Dee

Looks like system only found USB camera. The CSI camera maybe HW connection or something wrong cause i2c failed to gen video node.