I am trying to use the gstreamer pipeline for hardware decoding since my USB camera output format is MJPEG. Using CPU to decode the JPEG would cause lag and makes the video stream not real-time. Besides, the clock is already set to MAXN mode which means all 6 cores running at 2GHz. Thus I would like to utilize the hardware decoder for real-time purposes.
I can definitely acquire frames by using gst-launch-1.0. Here is the command.
Hello DaneLLL, the jetpack version is 4.3. Also, I realize that there is a typo on the OpenCV pipeline string. It is actually /dev/video1 which refers to the USB camera.
Also, I tried the multimedia sample 12. It works fine, however, I cannot find a way to use the multimedia API outside the sample code. I expect the code to be build in a cmake environment.
I would definitely look into that. However, is there any solution for the bus error since I prefer using the pipeline in the OpenCV. The issue is the plugin nvjpeg.
Actually, I think that might be the libjpeg that is conlict to libnvjpeg. I tried to include the libnvjpeg as the jpeg library for the OpenCV. However, building from the source would show error
[ 58%] Built target opencv_calib3d
[ 58%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/torch/THFile.cpp.o
[ 58%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/torch/THGeneral.cpp.o
[ 58%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/torch/torch_importer.cpp.o
[ 58%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/opencl_kernels_dnn.cpp.o
[ 58%] Linking CXX shared library ../../lib/libopencv_dnn.so
[ 58%] Built target opencv_dnn
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
Is there any modified OpenCV that I can use with jetson hardware acceleration?
You are not able to use jpeg hardware decoding in OpenCV because libjpeg and libnvjpeg cannot co-exist. In running gstreamer pipeline in OpenCV, please use jpegdec plugin, or have v4l2src output in other formats such as UYVY or YUYV. Please follow this to show all formats the source can support.
Hi,
Please check cuda_postprocess() in 12_camera_v4l2_cuda. It demonstrates cuda processing through NvBuffer APIs. The APIs are defined in nvbuf_utils.h