About the NVCUVID opencv build on AGX & NX

I recently tried to use OpenCV CUDA to decode rtsp streams on Jetson AGX, but I got the ERROR in the end as follows

This blog is where I found the relevant solution but he has to change the AGX ARCH as follows
https://blog.csdn.net/u013230291/article/details/121810138

QDateTime(2022-07-16 14:25:23.726 CST Qt::TimeSpec(LocalTime)) , Message : “OpenCV(4.4.0) /home/yian/opencv_contrib-4.4.0/modules/cudacodec/src/video_reader.cpp:99: error: (-217:Gpu API call) Unknown error code [Code = 479239672] in function ‘VideoReaderImpl’\n”

Here is the opencv build information

“General configuration for OpenCV 4.4.0 =====================================”
" Version control: unknown"
“”
" Extra modules:"
" Location (extra): /home/yian/opencv_contrib-4.4.0/modules"
" Version control (extra): unknown"
“”
" Platform:"
" Timestamp: 2022-07-15T08:19:47Z"
" Host: Linux 4.9.201-tegra aarch64"
" CMake: 3.10.2"
" CMake generator: Unix Makefiles"
" CMake build tool: /usr/bin/make"
" Configuration: RELEASE"
“”
" CPU/HW features:"
" Baseline: NEON FP16"
" required: NEON"
" disabled: VFPV3"
“”
" C/C++:"
" Built as dynamic libs?: YES"
" C++ standard: 11"
" C++ Compiler: /usr/bin/c++ (ver 7.5.0)"
" C++ flags (Release): -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG"
" C++ flags (Debug): -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG"
" C Compiler: /usr/bin/cc"
" C flags (Release): -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG"
" C flags (Debug): -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG"
" Linker flags (Release): -Wl,–gc-sections -Wl,–as-needed "
" Linker flags (Debug): -Wl,–gc-sections -Wl,–as-needed "
" ccache: NO"
" Precompiled headers: NO"
" Extra dependencies: m pthread /usr/lib/aarch64-linux-gnu/libGL.so /usr/lib/aarch64-linux-gnu/libGLU.so cudart_static -lpthread dl rt nppc nppial nppicc nppicom nppidei nppif nppig nppim nppist nppisu nppitc npps cublas cudnn cufft -L/usr/local/cuda-10.2/lib64 -L/usr/lib/aarch64-linux-gnu"
" 3rdparty dependencies:"
“”
" OpenCV modules:"
" To be built: alphamat aruco bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv datasets dnn dnn_objdetect dnn_superres dpm face features2d flann freetype fuzzy gapi hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor ml objdetect optflow phase_unwrapping photo plot python2 python3 quality rapid reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking video videoio videostab xfeatures2d ximgproc xobjdetect xphoto"
" Disabled: world"
" Disabled by dependency: -"
" Unavailable: cnn_3dobj hdf java js julia matlab ovis sfm ts viz"
" Applications: apps"
" Documentation: NO"
" Non-free algorithms: NO"
“”
" GUI: "
" QT: YES (ver 5.9.5)"
" QT OpenGL support: YES (Qt5::OpenGL 5.9.5)"
" GTK+: NO"
" OpenGL support: YES (/usr/lib/aarch64-linux-gnu/libGL.so /usr/lib/aarch64-linux-gnu/libGLU.so)"
" VTK support: NO"
“”
" Media I/O: "
" ZLib: /usr/lib/aarch64-linux-gnu/libz.so (ver 1.2.11)"
" JPEG: libjpeg-turbo (ver 2.0.5-62)"
" WEBP: build (ver encoder: 0x020f)"
" PNG: /usr/lib/aarch64-linux-gnu/libpng.so (ver 1.6.34)"
" TIFF: build (ver 42 - 4.0.10)"
" JPEG 2000: build Jasper (ver 1.900.1)"
" OpenEXR: build (ver 2.3.0)"
" HDR: YES"
" SUNRASTER: YES"
" PXM: YES"
" PFM: YES"
“”
" Video I/O:"
" DC1394: NO"
" FFMPEG: YES"
" avcodec: YES (57.107.100)"
" avformat: YES (57.83.100)"
" avutil: YES (55.78.100)"
" swscale: YES (4.8.100)"
" avresample: NO"
" GStreamer: YES (1.14.5)"
" v4l/v4l2: YES (linux/videodev2.h)"
“”
" Parallel framework: TBB (ver 2020.2 interface 11102)"
“”
" Trace: YES (with Intel ITT)"
“”
" Other third-party libraries:"
" Lapack: NO"
" Eigen: YES (ver 3.3.4)"
" Custom HAL: YES (carotene (ver 0.0.1))"
" Protobuf: build (3.5.1)"
“”
" NVIDIA CUDA: YES (ver 10.2, CUFFT CUBLAS NVCUVID FAST_MATH)"
" NVIDIA GPU arch: 70"
" NVIDIA PTX archs:"
“”
" cuDNN: YES (ver 8.0.0)"
“”
" OpenCL: YES (no extra features)"
" Include path: /home/yian/opencv-4.4.0/3rdparty/include/opencl/1.2"
" Link libraries: Dynamic load"
“”
" Python 2:"
" Interpreter: /usr/bin/python2.7 (ver 2.7.17)"
" Libraries: /usr/lib/aarch64-linux-gnu/libpython2.7.so (ver 2.7.17)"
" numpy: /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.13.3)"
" install path: lib/python2.7/dist-packages/cv2/python-2.7"
“”
" Python 3:"
" Interpreter: /usr/bin/python3 (ver 3.6.9)"
" Libraries: /usr/lib/aarch64-linux-gnu/libpython3.6m.so (ver 3.6.9)"
" numpy: /usr/lib/python3/dist-packages/numpy/core/include (ver 1.13.3)"
" install path: lib/python3.6/dist-packages/cv2/python-3.6"
“”
" Python (for build): /usr/bin/python2.7"
“”
" Java: "
" ant: NO"
" JNI: NO"
" Java wrappers: NO"
" Java tests: NO"
“”
" Install to: /usr/local"
“-----------------------------------------------------------------”
“”
“”

Hi,
Please share which Jetpack release you are using. 4.6.2 or 5.0.1 DP?

image

4.5.1 :P