I trying create capture RTSP stream by my ip camera. It is good working in VLC player, but not work in python 3.6 with OpenCV package.
I run this code:
import cv2
sUrl = 'rtsp://admin:*****@**.***.***.***:554/onvif1'
vcap = cv2.VideoCapture(sUrl)
while(1):
ret, frame = vcap.read()
cv2.imshow('frame', frame)
cv2.waitKey(1)
and get this error:
error
Traceback (most recent call last) in () 8 while(1): 9 ret, frame = vcap.read() ---> 10 cv2.imshow('frame', frame) 11 cv2.waitKey(1)error: OpenCV(3.4.1) C:\Miniconda3\conda-bld\opencv-suite_1533128839831\work\modules\highgui\src\window.cpp:356: error: (-215) size.width>0 && size.height>0 in function cv::imshow
after, I check capture
vcap.isOpened()
and I get False
value
Python version - 3.6 OS - Windows 10 OpenCV version - 2.4.12
Thank you!