pythonic-cv icon indicating copy to clipboard operation
pythonic-cv copied to clipboard

Grab image from IP not USB camera

Open yevgeniyclaudio opened this issue 2 years ago • 1 comments

Is it possible to get video from ip camera? Camera(0) works fine but Camera('rtsp://admin:[email protected]') doesnt work((

yevgeniyclaudio avatar Feb 02 '23 08:02 yevgeniyclaudio

Hi @yevgeniyclaudio,

I don’t have experience with IP cameras, but the pcv.vidIO.Camera class in this library is a convenience wrapper around a standard cv2.VideoCapture, just with some extra features. Accordingly, if your rtsp stream works with a standard cv2.VideoCapture instance I expect it should also work with the Camera class here, and if it doesn’t work with VideoCapture (e.g. due to an incorrect IP, or invalid credentials, or a firewall, or a cv2 backend that doesn’t support rtsp) then it also won’t work with Camera.

If it does work with VideoCapture but not Camera I’d appreciate if you can provide some more information. In particular, in which way is it not working (e.g. is it connecting but not returning frames and/or is there an error of some sort)?

ES-Alexander avatar Feb 05 '23 10:02 ES-Alexander