Jetpack 6.2 RTSP Stream Enable Nvidia Decoder

Hi,
I try theese pipeline work is ok.

gst_str = ('rtspsrc location={} latency={} ! '
                   'rtph264depay ! h264parse ! avdec_h264 ! '
                   'videoconvert ! appsink drop=true').format(uri, latency)

How Can I use Gstreamer with opencv enable nvv4l2decoder?
Thanks!

Jetson Info

Software part of jetson-stats 4.3.1 - (c) 2024, Raffaello Bonghi
Model: NVIDIA Jetson Orin NX Engineering Reference Developer Kit - Jetpack 6.2 [L4T 36.4.3]
NV Power Mode[0]: MAXN
Serial Number: [XXX Show with: jetson_release -s XXX]
Hardware:
 - P-Number: XXXXXX
 - Module: NVIDIA Jetson Orin NX (16GB ram)
Platform:
 - Distribution: Ubuntu 22.04 Jammy Jellyfish
 - Release: 5.15.148-tegra
jtop:
 - Version: 4.3.1
 - Service: Active
Libraries:
 - CUDA: 12.6.68
 - cuDNN: 9.3.0.75
 - TensorRT: 10.3.0.30
 - VPI: 3.2.4
 - OpenCV: 4.10.0 - with CUDA: YES

cuda status:

nvidia element info:

s070@ubuntu:~/workspaces/ml-truck-pc$ gst-inspect-1.0 | grep nvv
nvv4l2camerasrc:  nvv4l2camerasrc: NvV4l2CameraSrc
nvvidconv:  nvvidconv: NvVidConv Plugin
nvvideo4linux2:  nvv4l2av1enc: V4L2 AV1 Encoder
nvvideo4linux2:  nvv4l2decoder: NVIDIA v4l2 video decoder
nvvideo4linux2:  nvv4l2h264enc: V4L2 H.264 Encoder
nvvideo4linux2:  nvv4l2h265enc: V4L2 H.265 Encoder
nvvideo4linux2:  nvv4l2vp9enc: V4L2 VP9 Encoder
nvvideoconvert:  nvvideoconvert: NvVidConv Plugin
nvvideosink:  nvvideosink: nVidia Video Sink
nvvideosinks:  nv3dsink: Nvidia 3D sink

torch info:

s070@ubuntu:~/workspaces/ml-truck-pc$ pip list | grep torch
torch                 2.5.0a0+872d972e41.nv24.8
torchvision           0.20.0a0+afc54f7

Hi,
Please refer to the samples and give it a try:
Doesn't work nvv4l2decoder for decoding RTSP in gstreamer + opencv - #3 by DaneLLL
Displaying to the screen with OpenCV and GStreamer - #9 by DaneLLL

1 Like

Theese look likes work ,but performance not very better.

if 'nvv4l2decoder'in gst_elements:
        gst_str = ("rtspsrc location={} latency={} ! rtph264depay !"
                   " h264parse ! nvv4l2decoder ! nvvidconv ! video/x-raw, format=(string)BGRx ! videoconvert !"
                   " video/x-raw,format=BGR ! appsink drop=true").format(uri, latency)

Hi,
Please try
Jetson AGX Orin device receive Network video streaming delay optimization - #7 by DaneLLL

And also run $ sudo jetson_clocks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.