在jetson Xavier nx ubuntu20.04版本安装了4.8.0版本带cuda的OpenCV,按照前辈经验jtop中显示cuda yes。
在我的测试过程中可以用:
gst-launch-1.0 videotestsrc ! autovideosink
来测试GStreamer管道,用:
gst-launch-1.0 rtspsrc location=rtsp://192.168.0.211/0 ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink
来测试读取rtsp流的读取。
以上采用cpu软解,无法验证是否采用了nvdec硬件加速。
在一些教程中提到
rtph265depay ! h265parse ! omxh265dec
omx插件,但是在新的jetson已经不支持。
验证使用NVIDIA 加速解码本地的test.mp4
gst-launch-1.0 filesrc location=./test.mp4 ! qtdemux ! queue ! h264parse ! nvv4l2decoder ! nv3dsink -e