Hi,
Hardware decoding/encoding is not enabled in OpenCV. For using hardware codec, woudl need to run like the samples:
Doesn't work nvv4l2decoder for decoding RTSP in gstreamer + opencv - #3 by DaneLLL
Displaying to the screen with OpenCV and GStreamer - #9 by DaneLLL
To run gstreamer command in cv2.VideoCapture() or cv2.VideoWriter(),
Or may try this solution:
Nano not using GPU with gstreamer/python. Slow FPS, dropped frames - #8 by DaneLLL
To run a gstreamer command and map the buffer to cv::gpu::gpuMat.