if __name__ == "__main__":
cap = cv2.VideoCapture("http://admin::Admin123@192.168.0.10/cgi-bin/mjpeg?stream=1")
while (cap.isOpened()):
ret, frame = cap.read()
cv2.imshow('frame', frame)
k = cv2.waitKey(1)
if k == 27:
cap.release()
cv2.destroyAllWindows()
我已经成功设法获取了流并显示了它,但是如果我退出脚本并尝试再次运行它,我将得到BSOD(Windows蓝屏死机)
我怀疑opencv释放方法无法释放rtsp连接
有人遇到此问题并设法解决? 谢谢!