Using logitech webcam C510 on Jetson nano with Gstreamer and OpenCV

Hi,

I am using a raspberry pi cam on my nano with gstreamer and opencv, for that my init string is:

nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)60/1 ! nvvidconv flip-method=0 ! video/x-raw, width=(int)1280, height=(int)720, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink

This is working fine for the raspberry pi. Before getting deeper in the details, I would like to know if anybody knows which is the proper init string to use, this cam has the same resolution 1280x720.

Thanks

Hi roberto_car,

Can you try following command on Jetson Nano terminal?

gst-launch-1.0 v4l2src device="/dev/video0" name=e ! 'video/x-raw, width=640, height=480' ! videoconvert ! 'video/x-raw, width=640, height=480, format=(string)YUY2' ! xvimagesink

To find device name: in terminal execute following command, after connecting your webcam:

$ls /dev/video*

If this works, you can integrate in python using following string (define capture_device, capture_width, capture_height parameters:

'v4l2src device=/dev/video{} ! video/x-raw, width=(int){}, height=(int){}, framerate=(fraction)30/1 ! videoconvert !  video/x-raw, , format=(string)BGR ! appsink'.format(capture_device, capture_width, capture_height)

We also have Jupyter Notebook dedicated for camera purposes.

Please let me know if this answers your question.

Does Jetson nano support Runcam2 ?

Hi AK-NV,

Thanks for your prompt reply, it helps me a lot.
I have entered the command on the terminal and it worked perfectly, activating the logitech C510 webcam, excellent!

I have tried the string on python and it didnt’ work but it was too late yesterday so surely I made some mistake. Will let you know asap.

Have had a quick look to the notebooks, they are really useful, nice work!
By the way, do you know how to use the integrated microphone of this webcam?

Thanks!

Hi roberto_car

I have not tried logitech C510, but following can be a first step.
Try listing sound devices:

arecord -l

If you see device listed, then follow this link https://www.geeksforgeeks.org/arecord-command-in-linux-with-examples/
Check if you can record using mic.

Please let me know.

I have not personally tested it. However, I would suggest to try below mentioned steps after enabling runcam2 in webcam mode.

Hi AK-NV,

Finally, what worked for me to make Logitech C510 work is:

‘v4l2src device=/dev/video0 ! video/x-raw, width=(int)1280, height=(int)720 ! videoconvert ! appsink’

It was the only camera on board so vide0 works in this case. Thanks for your help.

Do you have a pointer to documentation on these Gstreamer parameters? I would like to know more details on how to use them but could not find the docs yet. Thanks