i re-compile opencv + opencv_contrib 4.5.1, with CUDA on, then i install *.so into /usr/local/, everything is ok.
BUT! my c++ program use videocapture to open a rtsp url stream, like this:
the c++ code:
then i get the ERROR, the process never go , it is hang!
nvidia jetpack origin opencv is 4.1.1, but not have contrib module, so i uninstall origin, i re-compile opencv, orgin opencv it work ok with same code, but i compiled opencv not work!
my cmake cmd like this:
cmake -D OPENCV_GENERATE_PKGCONFIG=ON -D OPENCV_EXTRA_MODULES_PATH=…/…/opencv_contrib-4.5.1/modules -D WITH_GSTREAMER=ON -D WITH_GSTREAMER_0_10=OFF -D WITH_LIBV4L=ON -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_EXAMPLES=OFF -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local …
It looks to be an issue in gstreamer instead of OpenCV. Looks like the stream cannot be well decoded. If it is decodable, you should see video playback in running uridecodebin ! nvoverlaysink. We would suggest try H265 if your source can output H265 stream.