我需要在 NVIDIA Jetson-AGX 设备上使用 gst-play-1.0 和/或 gst-launch-1.0 命令显示 RTSP 流。
这些是我迄今为止尝试过的命令:
1。 gst-播放-1.0
$ gst-play-1.0 rtsp://192.168.1.xxx:8554/main.264
在这种情况下,终端仍然卡在:
Press 'k' to see a list of keyboard shortcuts.
Now playing rtsp://192.168.1.xxx:8554/main.264
Pipeline is live.
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
Prerolled.
2。 gst-launch-1.0
$ gst-launch-1.0 rtspsrc location=rtsp://192.168.1.xxx:8554/main.264 latency=0 buffer-mode=auto ! queue ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! videoscale ! video/x-raw,width=1920,height=1080 ! autovideosink
在这种情况下,终端仍然卡在:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://192.168.1.xxx:8554/main.264
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
Progress: (request) SETUP stream 0
Progress: (open) Opened Stream
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Progress: (request) Sending PLAY request
Progress: (request) Sending PLAY request
Progress: (request) Sent PLAY request
按 Ctrl+C 后:
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:02.188911578
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
URL 通常采用以下格式:
rtsp://192.168.1.xxx:8554/main.264
rtsp://username:[email protected]:554
我可以在装有 Ubuntu 20.04 和 Gstreamer 1.16.3 的 x86 PC 上使用这些命令。所以,相机本身就很好。
但是,这些命令在 Jetson 设备上不起作用。
NVIDIA Jetson-AGX 设备信息:
L4T 32.6.1 [JetPack 4.6]
Ubuntu 18.04.6 LTS
内核版本:4.9.253-tegra
GStreamer 1.14.5
CUDA 10.2.300
CUDA架构:无
OpenCV版本:4.1.1
OpenCV Cuda:否
CUDNN:8.2.1.32
张量RT:8.0.1.6
愿景作品:1.6.0.501
VPI:12.1.1
火神:1.2.70
感谢您浏览该帖子。任何提示或指导将不胜感激。
谢谢你。 :)
编辑: 我按照@SeB的建议尝试了以下命令:
gst-launch-1.0 rtspsrc location=rtsp://username:[email protected]:554 latency=500 ! queue ! rtph264depay ! h264parse ! nvv4l2decoder ! nvvidconv ! 'video/x-raw(memory:NVMM),width=1920,height=1080' ! nvvidconv ! autovideosink
终端显示如下:
Setting pipeline to PAUSED ...
Opening in BLOCKING MODE
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://username:[email protected]:554
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
Progress: (request) SETUP stream 0
Progress: (open) Opened Stream
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Progress: (request) Sending PLAY request
Progress: (request) Sending PLAY request
Progress: (request) Sent PLAY request
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
(gst-launch-1.0:14920): GStreamer-CRITICAL **: 21:59:35.771: gst_mini_object_unref: assertion 'mini_object != NULL' failed
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
编辑#2:
来自
gst-discoverer-1.0 rtsp://username:[email protected]:554
的输出,按照@SeB的建议
Analyzing rtsp://username:[email protected]:554
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
Done discovering rtsp://username:[email protected]:554
Topology:
unknown: application/x-rtp
video: H.264 (Main Profile)
Properties:
Duration: 99:99:99.999999999
Seekable: no
Live: yes
Tags:
video codec: H.264 (Main Profile)
感谢您对我的询问感兴趣。
我也在NVIDIA的官方论坛上发布了这个问题(answer),也咨询了一些其他人。
看来这两个命令应该有效:
$ gst-launch-1.0 rtspsrc location=rtsp://username:[email protected]:554 latency=500 ! queue ! rtph264depay ! h264parse ! nvv4l2decoder ! nvvidconv ! 'video/x-raw(memory:NVMM)' ! nv3dsink sync=0
$ gst-launch-1.0 -v uridecodebin uri=rtsp://username:[email protected]:554 ! nvvidconv ! nvegltransform ! nveglglessink
基本上,建议在 Jetson 设备上使用 NVIDIA 特定的 GStreamer 插件(前缀为 nv)。