Error from Video program

Hi,
Please try this sample and see if it works:
OpenCV Video Capture with GStreamer doesn't work on ROS-melodic - #3 by DaneLLL

And may try gst-launch-1.0 command to ensure the streamer pipeline is valid:

$ gst-launch-1.0 -v nvarguscamerasrc ! "video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080,format=(string)NV12, framerate=(fraction)30/1" ! nvvidconv ! "video/x-raw, format=(string)BGRx" ! videoconvert ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0