Hi,
The OpenCV package in SDK components have gstreamer enabled. You may install the package and give it a try.
May also try this script:
Jetson AGX Orin FAQ
OpenCV 4.1.1 is old and uncertain whether it works with Jetpack 6.2. Would suggest use later version.