How can I quickly decode rtsp video streams in code using hardware decoders?

I have tried many ways, such as

gst-launch-1.0 rtspsrc location="rtsp://admin:xxxxxx.@192.168.211.61/Streaming/Channels/101" latency=200 ! queue ! rtph264depay ! nvv4l2decoder ! queue  !  filesink location=a.mkv

result like this


image

or jetson-utils

video-viewer rtsp://admin:xxxxxx.@192.168.211.61/Streaming/Channels/101 a.mp4


image

It seems that none of these methods can decode rtsp streams.

Jetpack 4.5.1 [L4T 32.5.1]
GStreamer 1.14.5

Hi,
Please try with fakesink:

$ gst-launch-1.0 rtspsrc location="rtsp://admin:xxxxxx.@192.168.211.61/Streaming/Channels/101" latency=200 ! queue ! rtph264depay ! nvv4l2decoder ! fakesink sync=0

And run sudo tegrastats to check if NVDEC is on.

Hi,

I recommend using a parser after the depay and nvvidconv after the decoder:

gst-launch-1.0 rtspsrc \
location="rtsp://admin:xxxxxx.@192.168.211.61/Streaming/Channels/101" latency=200 ! \
queue ! rtph264depay ! h264parse ! nvv4l2decoder ! queue  ! nvvidconv ! filesink location=a.mkv

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