How to use 12_camera_v4l2_cuda with Opencv in jetson nano?


@Andrey1984 @DaneLLL :)

I am using a Logitec Brio camera. I followed the below link to read and access the camera which works fine at 30 fps.

I could run the below only from the terminal.

$ ./camera_v4l2_cuda -d /dev/video0 -s 640x480 -f YUYV -n 30 -c

I want to use this with cv2.videocapture() in Opencv, so that I can integrate with my CNN code.

Kindly help me on how to use ‘camera_v4l2_cuda’ with cv2.


For hooking with OpenCV, we suggest use gstreamer pipeline. Please take a look at

1 Like

@DaneLLL : Thanks a lot. The Pipeline you provided works like a charm. Interested to understand the technique /method to construct this pipeline. Any document available to understand the pipeline construction ?

We have samples in C in the source code package:
L4T | NVIDIA Developer
L4T Driver Package (BSP) Sources


The python samples are based on the C samples.

1 Like