Python:使用OpenCV无法识别Panasonic网络流



我正在尝试使用Python和openCV从松下网络相机(WV SFV481(读取流。然而,由于cap.isOpened()返回False,所以流似乎没有被识别。以下是我尝试过的(关闭的线路是我试图捕捉流的不同地址(:

import cv2
#cap = cv2.VideoCapture('http://169.254.5.128:581/1')
#cap = cv2.VideoCapture('admin:12345@169.254.5.128:581/1')
#cap = cv2.VideoCapture('admin:12345@http://169.254.5.128:581/1')
#cap = cv2.VideoCapture('http://169.254.5.128:581/live/index.html?Language=9')
#cap = cv2.VideoCapture('admin:12345@169.254.5.128:581/live/index.html?Language=9')
#cap = cv2.VideoCapture('admin:12345@http://169.254.5.128:581/live/index.html?Language=9')
if cap.isOpened() == False:
print("Error File Not Found")
while cap.isOpened():
ret, frame = cap.read()

if ret == True:
cv2.imshow('frame',frame)

if cv2.waitKey(1) & 0xFF ==ord('q'):
break

else:
break
cap.release()
cv2.destroyAllWindows()

谢谢你,我真的很感激你的帮助!

这就是它最终的工作方式:cap_1 = cv2.VideoCapture('http://169.254.5.128:581/cgi-bin/camera')。在这里,你可以检查你需要在链接中使用哪些扩展来访问你的网络摄像头:https://www.ispyconnect.com/

最新更新