Optimizing opencv gstreamer with mipi and usb uvc cameras

Probably your camera does not support UYVY format. You may refer to FAQ
Q: I have a USB camera. How can I lauch it on Jetson Nano?
to configure the source correctly.

We don’t indicate path of the samples.My apology for this. If you consider to use jetson_multimedia_api, you can check 12_camera_v4l2_cuda for USB cameras, and 10_camera_recording for Bayer sensors(through Argus).