运行:

gst-launch-1.0 rtspsrc latency=0 location= "rtsp://admin:L21CF489@192.168.117.9:554/cam/realmonitor?channel=1&subtype=0" latency=0  !  rtph264depay ! avdec_h264 ! videoconvert ! videoscale ! ximagesink name=videosink

报错:

root@ubuntu:/home/book/filebeat-8.5.0-linux-x86_64# gst-launch-1.0 rtspsrc latency=0 location= "rtsp://admin:L21CF489@192.168.117.9:554/cam/realmonitor?channel=1&subtype=0" latency=0  !  rtph264depay ! avdec_h264 ! videoconvert ! videoscale ! ximagesink name=videosink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://admin:L21CF489@192.168.117.9:554/cam/realmonitor?channel=1&subtype=0
Progress: (open) Retrieving server options
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not read from resource.
Additional debug info:
gstrtspsrc.c(5917): gst_rtsp_src_receive_response (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
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 ...

解决:

sudo apt-get remove gstreamer1.0-plugins-ugly

卸载这个插件即可。因为gstreamer1.0-plugins-ugly插件会影响到,会发送一些头部,大华摄像机这边识别不了,拒绝服务。

通过下面链接找到的RTSP Gstreamer Simple Recieve and Store in File - Jetson & Embedded Systems / Jetson Nano - NVIDIA Developer Forums

Logo

GitCode 天启AI是一款由 GitCode 团队打造的智能助手,基于先进的LLM(大语言模型)与多智能体 Agent 技术构建,致力于为用户提供高效、智能、多模态的创作与开发支持。它不仅支持自然语言对话,还具备处理文件、生成 PPT、撰写分析报告、开发 Web 应用等多项能力,真正做到“一句话,让 Al帮你完成复杂任务”。

更多推荐