连接到tcp://?timeout = 0失败:连接被拒绝,如何从Openvino流传输RTSP

时间:2019-04-25 12:55:41

标签: python opencv raspberry-pi rtsp openvino

我尝试在this tutorial上使用视频流方法

当我尝试使用连接的相机时效果很好,但是当我使用它通过RTSP通过另一个命令从另一个树莓派中传输视频时,它显示错误:

raspivid -o - -t 0 -w 300 -h 300 -fps 30 -rot 270 | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8000/}' :demux=h264

# initialize the video stream, allow the cammera sensor to warmup,
# and initialize the FPS counter
print("[INFO] starting video stream...")
rtsp = "rtsp://10.252.173.196:8000/"
#vs = VideoStream(usePiCamera=True).start()
vs = VideoStream(rtsp).start()
#cv2.VideoCapture vid(rtsp)
time.sleep(2.0)
fps = FPS().start()

# loop over the frames from the video stream
while True:

python openvino_real_time_object_detection.py --prototxt MobileNetSSD_deploy.prototxt \--model MobileNetSSD_deploy.caffemodel

[INFO] loading model...
[INFO] starting video stream...
[rtsp @ 0x26ed350] method SETUP failed: 461 Client error

(python:1863): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed
Traceback (most recent call last):
  File "openvino_real_time_object_detection.py", line 63, in <module>
    net.setInput(blob)
NameError: name 'blob' is not defined

有人知道如何解决吗?

0 个答案:

没有答案