运行:
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插件会影响到,会发送一些头部,大华摄像机这边识别不了,拒绝服务。