We are trying to capture 2x 4k@30fps H264 video either from a file or from a rtsp source.Using gst-launch with the pipeline below it gives us excellent performance with hardware acceleration. But using OpenCV even a single video uses %100 CPU on all cores and no GPU at all and just videoCapture takes 45ms without imshow or anything.
gst-launch-1.0 filesrc location=<filename.mp4> ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! nveglglessink -e
It’s apparent that OpenCV uses gstreamer for videoIO but somehow does not use hardware acceleration at all.
Gstreamer version is 1.8.3 and OpenCV is compiled with Gstreamer support with the same version. And we are developing the software on C++.
We even tried compiling NvPipe but it requires nvcuvid which is abandoned on Jetson in lieu of gstreamer and v4l.
Is it possible to leverage hardware acceleration in any way and pass the frame mat to OpenCV?