微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在 jetson nano 上使用 gstreamer 进行 RTSP 流传输时出错

如何解决在 jetson nano 上使用 gstreamer 进行 RTSP 流传输时出错

我正在做这个项目:

https://www.hackster.io/jonmendenhall/jetson-nano-search-and-rescue-ai-uav-9ca547

在某些时候,我需要将我的相机(waveshare;IMX219-77IR)安装在无人机的顶部,我想在 Windows 或 Linux 上使用 vlc 而不是 nomachine(因为我已经在 nano 上安装了 nomachine 服务器,并且Windows 上的客户端,因为它将在无头模式下运行),以显示无人机飞行时相机看到的内容。出于这个原因,我尝试使用 RTSP 配置 gstreamer,以在我安装在 jetson nano 上的 Ubuntu 18.04 上启动流媒体服务器。

下面你可以看到我发出的命令是什么:

$ ./test-launch "videotestsrc ! nvvidconv ! nvv4l2h264enc ! h264parse ! rtph264pay name=pay0 pt=96"

在同一个 Jetson Nano 上,我打开了另一个控制台,在那里我运行这个管道来解码 RTSP 流:

gst-launch-1.0 uridecodebin uri=rtsp://127.0.0.1:8554/test ! nvoverlaysink

我看到这张照片:

enter image description here

图片来自videotestsrc插件。我想用我的视频源替换 videotestsrc,但我不知道该怎么做。

我尝试了这些组合,但没有一个奏效:

./test-launch "v4l2src device=/dev/video0 ! nvvidconv ! nvv4l2h264enc ! h264parse ! queue ! rtph264pay name=pay0 pt=96"

./test-launch "device=/dev/video0 ! nvvidconv ! nvv4l2h264enc ! h264parse ! queue ! rtph264pay name=pay0 pt=96"

错误仍然相同:

Setting pipeline to PAUSED ...
Pipeline is live and does not need preroll ...
Progress: (open) opening Stream
Progress: (connect) Connecting to rtsp://127.0.0.1:8554/test
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
ERROR: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source: Could not read from resource.
Additional debug info:
gstrtspsrc.c(5917): gst_rtsp_src_receive_response (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source:
Could not receive message. (Timeout while waiting for server response)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

但是为什么?我确信我的相机(型号 waveshare;IMX219-77IR)创建了一个名为 /dev/video0 的设备,我确信它可以工作,因为这个命令能够在屏幕上显示我的脸:

disPLAY=:0.0 gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=3280,height=2464,format=(string)NV12,framerate=(fraction)20/1' ! nvoverlaysink -e

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。