You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

萤石IP摄像头Python OpenCV流访问报错及RTSP地址问题求助

萤石IP摄像头RTSP访问报错与流媒体URL问题

报错信息

cv2.error: OpenCV(4.8.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:971: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'.

附加问题

尝试在EZVIZ Studio的「Access Configuration」菜单中查找流媒体URL时,页面无法加载,怀疑流媒体URL有误,但不确定具体问题所在。

当前使用的Python代码

import cv2

img = cv2.VideoCapture("rtsp://admin:password@192.168.1.12:554/h264_stream")

while True:
    ret, frame = img.read()
    cv2.imshow('Video', frame)
    if cv2.waitKey(1) & 0xFF == ord("q"):
        break

img.release()
cv2.destroyAllWindows()

不确定的参数细节

  • 填写admin是参考他人建议,但不清楚该账号的修改位置及具体含义;
  • password为机身上的6位摄像头访问码(例如:ABCDEF);
  • 已尝试过192.168.1.12:554、192.168.1.12、192.168.1.12:8000作为RTSP通道IP;
  • h264_stream是参考摄像头型号信息填写,但不确定是否正确。

内容的提问来源于stack exchange,提问作者Raulito17

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.11 22:15:00