Hi, I notice the original code used gstreamer to read video frame into cv::Mat :
videoCaptureBackend = cv::CAP_GSTREAMER; videoSource = "filesrc location=\"" + addressIn + "\" ! decodebin ! videoconvert ! appsink"; video_cap = cv::VideoCapture(videoSource, videoCaptureBackend);
However, if I want to used the nvidia hardware accelerator to faster performance, I will need to used nvdecode:
videoSource = "filesrc location=\"" + addressIn + "\" ! qtdemux ! queue ! h264parse ! nvh264dec ! cudadownload ! appsink";
This way, data is read using nvidia decode and transfer back to cpu memory cvMat, yield a slower performace than cpu only read code.
Is there any way/ sample code that used gstreamer pipeline that could load video frame directly into gpuMat ?