Hi,
It seems like you manually update OpenCV package which does not enable gstreamer. If you use the package installed through SDKManager, it should work. We would suggest re-flash the system and install SDK Components through SDKManager. And try again.
You may also try the samples:
[Gstreamer] nvvidconv, BGR as INPUT - #4 by DaneLLL
OpenCV Video Capture with GStreamer doesn't work on ROS-melodic - #3 by DaneLLL