Pipeline multi-stream hardware decoder RTSP with jetson nano

Hi guys,
I want to do pipeline multi-stream decoder on jetson nano using H264 hardware decoder.
when I run directly this function:

def stream_rtsp(uri, width, height, latency):
gst_str = ('rtspsrc location={} latency={} ! ’
'rtph264depay ! h264parse ! omxh264dec ! ’
'nvvidconv ! ’
'video/x-raw, width=(int){}, height=(int){}, ’
'format=(string)BGRx ! videoconvert ! ’
‘appsink’).format(uri, latency, width, height)

then I check to use NVDEC ro not with sudo tegrastats, I see NVDEC is active and the cpu usage is 15%, but when I put this function and run as threading, the NVDEC is became inactive and cpu usage reach to 50%, It turn out that in this state use cpu decoding. How to solve this problem?

Hi,
We have explained this is expected in using python + OpenCV.


For using python, your pipeline is optimal.